MCPcopy Create free account
hub / github.com/TruthHun/BookStack / hasBadZoomedRects

Function hasBadZoomedRects

static/editor.md/lib/codemirror/lib/codemirror.js:8322–8328  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

8320
8321 var badZoomedRects = null;
8322 function hasBadZoomedRects(measure) {
8323 if (badZoomedRects != null) return badZoomedRects;
8324 var node = removeChildrenAndAdd(measure, elt("span", "x"));
8325 var normal = node.getBoundingClientRect();
8326 var fromRange = range(node, 0, 1).getBoundingClientRect();
8327 return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;
8328 }
8329
8330 // KEY NAMES
8331

Callers 1

Calls 2

removeChildrenAndAddFunction · 0.70
eltFunction · 0.70

Tested by

no test coverage detected