lib/core/Canvas.js
function createContainer(options) {

  options = assign({}, { width: '100%', height: '100%' }, options);

  var container = options.container || document.body;

  // create a <div> around the svg element with the respective size
  // this way we can always get the correct container size
  // (this is impossible for <svg> elements at the moment)
  var parent = document.createElement('div');
  parent.setAttribute('class', 'djs-container');

  assign(parent.style, {
    position: 'relative',
    overflow: 'hidden',
    width: ensurePx(options.width),
    height: ensurePx(options.height)
  });

  container.appendChild(parent);

  return parent;
}
function createContainer(options) {

  options = assign({}, { width: '100%', height: '100%' }, options);

  var container = options.container || document.body;

  // create a <div> around the svg element with the respective size
  // this way we can always get the correct container size
  // (this is impossible for <svg> elements at the moment)
  var parent = document.createElement('div');
  parent.setAttribute('class', 'djs-container');

  assign(parent.style, {
    position: 'relative',
    overflow: 'hidden',
    width: ensurePx(options.width),
    height: ensurePx(options.height)
  });

  container.appendChild(parent);

  return parent;
}
function createContainer ( options ) { options = assign ( { } , { width : '100%' , height : '100%' } , options ) ; var container = options . container || document . body ; // create a <div> around the svg element with the respective size // this way we can always get the correct container size // (this is impossible for <svg> elements at the moment) var parent = document . createElement ( 'div' ) ; parent . setAttribute ( 'class' , 'djs-container' ) ; assign ( parent . style , { position : 'relative' , overflow : 'hidden' , width : ensurePx ( options . width ) , height : ensurePx ( options . height ) } ) ; container . appendChild ( parent ) ; return parent ; }
Creates a HTML container element for a SVG element with
the given configuration

@param  {Object} options
@return {HTMLElement} the container element
Creates a HTML container element for a SVG element with the given configuration