MCPcopy
hub / github.com/dhotson/springy / fromScreen

Function fromScreen

springyui.js:71–76  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

69 };
70
71 var fromScreen = function(s) {
72 var size = currentBB.topright.subtract(currentBB.bottomleft);
73 var px = (s.x / canvas.width) * size.x + currentBB.bottomleft.x;
74 var py = (s.y / canvas.height) * size.y + currentBB.bottomleft.y;
75 return new Springy.Vector(px, py);
76 };
77
78 // half-assed drag and drop
79 var selected = null;

Callers 1

springyui.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected