* Moves the edge of a rectangle to the value given. It only moves the edge in a linear direction based on that edge. * For example, if it's a bottom edge it will only change y coordinates.
(rect, edge, newValue)
| 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. |
| 31799 | */ function _moveEdge(rect, edge, newValue) { |
| 31800 | var difference = _getEdgeValue(rect, edge) - newValue; |
| 31801 | rect = _setEdgeValue(rect, edge, newValue); |
| 31802 | rect = _setEdgeValue(rect, edge * -1, _getEdgeValue(rect, edge * -1) - difference); |
| 31803 | return rect; |
| 31804 | } |
| 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) { |
no test coverage detected