MCPcopy Create free account
hub / github.com/adobe/Marinus / dragged

Function dragged

web_server/public/javascripts/draw_graph.js:271–279  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

269 .clamp(true);
270
271 function dragged(d) {
272 var threshold = graph.draggedThreshold(graph.simulation.alpha()),
273 dx = d.oldX - d.x,
274 dy = d.oldY - d.y;
275 if (Math.abs(dx) >= threshold || Math.abs(dy) >= threshold) {
276 d.dragged = true;
277 }
278 return d.dragged;
279 }
280
281 graph.drag = d3.drag()
282 .subject(function (d) { return d; })

Callers 1

drawGraphFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected