MCPcopy Index your code
hub / github.com/SortableJS/Sortable / calculateRealTime

Function calculateRealTime

src/Animation.js:170–175  ·  view source on GitHub ↗
(animatingRect, fromRect, toRect, options)

Source from the content-addressed store, hash-verified

168
169
170function calculateRealTime(animatingRect, fromRect, toRect, options) {
171 return (
172 Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) /
173 Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2))
174 ) * options.animation;
175}

Callers 1

animateAllFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…