MCPcopy Index your code
hub / github.com/nodejs/node / getInViewCenterPoint

Function getInViewCenterPoint

test/fixtures/wpt/resources/testdriver.js:34–44  ·  view source on GitHub ↗
(rect)

Source from the content-addressed store, hash-verified

32 }
33
34 function getInViewCenterPoint(rect) {
35 var left = Math.max(0, rect.left);
36 var right = Math.min(window.innerWidth, rect.right);
37 var top = Math.max(0, rect.top);
38 var bottom = Math.min(window.innerHeight, rect.bottom);
39
40 var x = 0.5 * (left + right);
41 var y = 0.5 * (top + bottom);
42
43 return [x, y];
44 }
45
46 function getPointerInteractablePaintTree(element) {
47 let elementDocument = element.ownerDocument;

Callers 2

testdriver.jsFile · 0.85

Calls 2

maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected