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

Function hasBadZoomedRects

static/mergely/lib/codemirror.js:8563–8569  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

8561
8562 var badZoomedRects = null;
8563 function hasBadZoomedRects(measure) {
8564 if (badZoomedRects != null) return badZoomedRects;
8565 var node = removeChildrenAndAdd(measure, elt("span", "x"));
8566 var normal = node.getBoundingClientRect();
8567 var fromRange = range(node, 0, 1).getBoundingClientRect();
8568 return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;
8569 }
8570
8571 // KEY NAMES
8572

Callers 1

Calls 2

removeChildrenAndAddFunction · 0.70
eltFunction · 0.70

Tested by

no test coverage detected