* Flips only the alignment edge of an element rectangle. This is used instead of nudging the alignment edges * into position, when alignTargetEdge is specified.
(elementEstimate, target, gap, coverTarget)
| 31874 | * Flips only the alignment edge of an element rectangle. This is used instead of nudging the alignment edges |
| 31875 | * into position, when alignTargetEdge is specified. |
| 31876 | */ function _flipAlignmentEdge(elementEstimate, target, gap, coverTarget) { |
| 31877 | var alignmentEdge = elementEstimate.alignmentEdge, targetEdge = elementEstimate.targetEdge, elementRectangle = elementEstimate.elementRectangle; |
| 31878 | var oppositeEdge = alignmentEdge * -1; |
| 31879 | var newEstimate = _estimatePosition(elementRectangle, target, { |
| 31880 | targetEdge: targetEdge, |
| 31881 | alignmentEdge: oppositeEdge |
| 31882 | }, gap, coverTarget); |
| 31883 | return { |
| 31884 | elementRectangle: newEstimate, |
| 31885 | targetEdge: targetEdge, |
| 31886 | alignmentEdge: oppositeEdge |
| 31887 | }; |
| 31888 | } |
| 31889 | /** |
| 31890 | * Adjusts a element rectangle to fit within the bounds given. If directionalHintFixed or covertarget is passed in |
| 31891 | * then the element will not flip sides on the target. They will, however, be nudged to fit within the bounds given. |
no test coverage detected