MCPcopy Create free account
hub / github.com/microsoft/SandDance / _getRelativeEdgeDifference

Function _getRelativeEdgeDifference

docs/app/js/sanddance-app.js:31792–31795  ·  view source on GitHub ↗
(rect, hostRect, edge)

Source from the content-addressed store, hash-verified

31790 return _getRelativeEdgeValue(edge, _getEdgeValue(rect, edge));
31791}
31792function _getRelativeEdgeDifference(rect, hostRect, edge) {
31793 var edgeDifference = _getEdgeValue(rect, edge) - _getEdgeValue(hostRect, edge);
31794 return _getRelativeEdgeValue(edge, edgeDifference);
31795}
31796/**
31797 * Moves the edge of a rectangle to the value given. It only moves the edge in a linear direction based on that edge.
31798 * For example, if it's a bottom edge it will only change y coordinates.

Callers 3

_finalizeReturnEdgeFunction · 0.85
_finalizeElementPositionFunction · 0.85
_finalizeBeakPositionFunction · 0.85

Calls 2

_getEdgeValueFunction · 0.85
_getRelativeEdgeValueFunction · 0.85

Tested by

no test coverage detected