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

Function _alignOutOfBoundsEdges

docs/app/js/sanddance-app.js:31919–31925  ·  view source on GitHub ↗

* Iterates through a list of out of bounds edges and tries to nudge and align them. * @param outOfBoundsEdges - Array of edges that are out of bounds * @param elementEstimate - The current element positioning estimate * @param bounding - The current bounds

(outOfBoundsEdges, elementEstimate, bounding)

Source from the content-addressed store, hash-verified

31917 * @param elementEstimate - The current element positioning estimate
31918 * @param bounding - The current bounds
31919 */ function _alignOutOfBoundsEdges(outOfBoundsEdges, elementEstimate, bounding) {
31920 for(var _i = 0, outOfBoundsEdges_1 = outOfBoundsEdges; _i < outOfBoundsEdges_1.length; _i++){
31921 var direction = outOfBoundsEdges_1[_i];
31922 elementEstimate.elementRectangle = _alignEdges(elementEstimate.elementRectangle, bounding, direction);
31923 }
31924 return elementEstimate;
31925}
31926/**
31927 * Moves the middle point on an edge to the point given.
31928 * Only moves in one direction. For instance if a bottom edge is passed in, then

Callers 1

_adjustFitWithinBoundsFunction · 0.85

Calls 1

_alignEdgesFunction · 0.85

Tested by

no test coverage detected