MCPcopy Index your code
hub / github.com/SortableJS/Sortable / getChildContainingRectFromElement

Function getChildContainingRectFromElement

modular/sortable.complete.esm.js:520–536  ·  view source on GitHub ↗
(container, options, ghostEl)

Source from the content-addressed store, hash-verified

518 css(el, 'height', '');
519}
520function getChildContainingRectFromElement(container, options, ghostEl) {
521 var rect = {};
522 Array.from(container.children).forEach(function (child) {
523 var _rect$left, _rect$top, _rect$right, _rect$bottom;
524 if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
525 var childRect = getRect(child);
526 rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
527 rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
528 rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
529 rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
530 });
531 rect.width = rect.right - rect.left;
532 rect.height = rect.bottom - rect.top;
533 rect.x = rect.left;
534 rect.y = rect.top;
535 return rect;
536}
537var expando = 'Sortable' + new Date().getTime();
538
539function AnimationStateManager() {

Callers 2

_ghostIsFirstFunction · 0.70
_ghostIsLastFunction · 0.70

Calls 2

closestFunction · 0.70
getRectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…