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

Function maybeUpdateRectForZooming

samples/common/codehighlight/codemirror.js:2532–2540  ·  view source on GitHub ↗
(measure, rect)

Source from the content-addressed store, hash-verified

2530 // Work around problem with bounding client rects on ranges being
2531 // returned incorrectly when zoomed on IE10 and below.
2532 function maybeUpdateRectForZooming(measure, rect) {
2533 if (!window.screen || screen.logicalXDPI == null ||
2534 screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
2535 { return rect }
2536 var scaleX = screen.logicalXDPI / screen.deviceXDPI;
2537 var scaleY = screen.logicalYDPI / screen.deviceYDPI;
2538 return {left: rect.left * scaleX, right: rect.right * scaleX,
2539 top: rect.top * scaleY, bottom: rect.bottom * scaleY}
2540 }
2541
2542 function clearLineMeasurementCacheFor(lineView) {
2543 if (lineView.measure) {

Callers 1

measureCharInnerFunction · 0.85

Calls 1

hasBadZoomedRectsFunction · 0.85

Tested by

no test coverage detected