MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / createRoot

Function createRoot

libs/echarts/echarts.simple.js:9468–9489  ·  view source on GitHub ↗
(width, height)

Source from the content-addressed store, hash-verified

9466}
9467
9468function createRoot(width, height) {
9469 var domRoot = document.createElement('div');
9470
9471 // domRoot.onselectstart = returnFalse; // Avoid page selected
9472 domRoot.style.cssText = [
9473 'position:relative',
9474 // IOS13 safari probably has a compositing bug (z order of the canvas and the consequent
9475 // dom does not act as expected) when some of the parent dom has
9476 // `-webkit-overflow-scrolling: touch;` and the webpage is longer than one screen and
9477 // the canvas is not at the top part of the page.
9478 // Check `https://bugs.webkit.org/show_bug.cgi?id=203681` for more details. We remove
9479 // this `overflow:hidden` to avoid the bug.
9480 // 'overflow:hidden',
9481 'width:' + width + 'px',
9482 'height:' + height + 'px',
9483 'padding:0',
9484 'margin:0',
9485 'border-width:0'
9486 ].join(';') + ';';
9487
9488 return domRoot;
9489}
9490
9491
9492/**

Callers 1

PainterFunction · 0.70

Calls 1

createElementMethod · 0.80

Tested by

no test coverage detected