MCPcopy Index your code
hub / github.com/DHTMLX/gantt / hasBadBidiRects

Function hasBadBidiRects

samples/common/codehighlight/codemirror.js:653–661  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

651 // Feature-detect IE's crummy client rect reporting for bidi text
652 var badBidiRects;
653 function hasBadBidiRects(measure) {
654 if (badBidiRects != null) { return badBidiRects }
655 var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
656 var r0 = range(txt, 0, 1).getBoundingClientRect();
657 var r1 = range(txt, 1, 2).getBoundingClientRect();
658 removeChildren(measure);
659 if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
660 return badBidiRects = (r1.right - r0.right < 3)
661 }
662
663 // See if "".split is the broken IE version, if so, provide an
664 // alternative way to split lines.

Callers 1

buildLineContentFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
removeChildrenFunction · 0.85

Tested by

no test coverage detected