MCPcopy
hub / github.com/anvaka/VivaGraphJS / preciseCheck

Function preciseCheck

src/WebGL/webglInputEvents.js:104–114  ·  view source on GitHub ↗
(nodeUI, x, y)

Source from the content-addressed store, hash-verified

102 }
103
104 function preciseCheck(nodeUI, x, y) {
105 if (nodeUI && nodeUI.size) {
106 var pos = nodeUI.position,
107 half = nodeUI.size;
108
109 return pos.x - half < x && x < pos.x + half &&
110 pos.y - half < y && y < pos.y + half;
111 }
112
113 return true;
114 }
115
116 function getNodeAtClientPos(pos) {
117 return webglGraphics.getNodeAtClientPos(pos, preciseCheck);

Callers 1

webglGraphicsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected