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

Function _alignEdges

docs/app/js/sanddance-app.js:31807–31810  ·  view source on GitHub ↗

* Aligns the edge on the passed in rect to the target. If there is a gap then it will have that space between the two.

(rect, target, edge, gap)

Source from the content-addressed store, hash-verified

31805/**
31806 * Aligns the edge on the passed in rect to the target. If there is a gap then it will have that space between the two.
31807 */ function _alignEdges(rect, target, edge, gap) {
31808 if (gap === void 0) gap = 0;
31809 return _moveEdge(rect, edge, _getEdgeValue(target, edge) + _getRelativeEdgeValue(edge, gap));
31810}
31811/**
31812 * Aligns the targetEdge on the passed in target to the rects corresponding opposite edge.
31813 * For instance if targetEdge is bottom, then the rects top will be moved to match it.

Callers 3

_alignOutOfBoundsEdgesFunction · 0.85
_estimatePositionFunction · 0.85
_positionBeakFunction · 0.85

Calls 3

_moveEdgeFunction · 0.85
_getEdgeValueFunction · 0.85
_getRelativeEdgeValueFunction · 0.85

Tested by

no test coverage detected