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

Function _positionElementRelative

docs/app/js/sanddance-app.js:32125–32133  ·  view source on GitHub ↗
(props, elementToPosition, boundingRect, previousPositions)

Source from the content-addressed store, hash-verified

32123 return maxHeight > 0 ? maxHeight : bounds.height;
32124}
32125function _positionElementRelative(props, elementToPosition, boundingRect, previousPositions) {
32126 var gap = props.gapSpace ? props.gapSpace : 0;
32127 var targetRect = _getTargetRect(boundingRect, props.target);
32128 var positionData = _getAlignmentData(_getPositionData(props.directionalHint, props.directionalHintForRTL, previousPositions), targetRect, boundingRect, props.coverTarget, props.alignTargetEdge);
32129 var positionedElement = _positionElementWithinBounds(_getRectangleFromElement(elementToPosition), targetRect, boundingRect, positionData, gap, props.directionalHintFixed, props.coverTarget);
32130 return (0, _tslib.__assign)((0, _tslib.__assign)({}, positionedElement), {
32131 targetRectangle: targetRect
32132 });
32133}
32134function _finalizePositionData(positionedElement, hostElement, bounds, coverTarget, doNotFinalizeReturnEdge) {
32135 var finalizedElement = _finalizeElementPosition(positionedElement.elementRectangle, hostElement, positionedElement.targetEdge, bounds, positionedElement.alignmentEdge, coverTarget, doNotFinalizeReturnEdge);
32136 return {

Callers 2

_positionElementFunction · 0.85
_positionCalloutFunction · 0.85

Calls 5

_getTargetRectFunction · 0.85
_getAlignmentDataFunction · 0.85
_getPositionDataFunction · 0.85
_getRectangleFromElementFunction · 0.85

Tested by

no test coverage detected