(container, options, ghostEl)
| 542 | } |
| 543 | |
| 544 | function getChildContainingRectFromElement(container, options, ghostEl) { |
| 545 | const rect = {}; |
| 546 | |
| 547 | Array.from(container.children).forEach(child => { |
| 548 | if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return; |
| 549 | const childRect = getRect(child); |
| 550 | rect.left = Math.min(rect.left ?? Infinity, childRect.left); |
| 551 | rect.top = Math.min(rect.top ?? Infinity, childRect.top); |
| 552 | rect.right = Math.max(rect.right ?? -Infinity, childRect.right); |
| 553 | rect.bottom = Math.max(rect.bottom ?? -Infinity, childRect.bottom); |
| 554 | }); |
| 555 | rect.width = rect.right - rect.left; |
| 556 | rect.height = rect.bottom - rect.top; |
| 557 | rect.x = rect.left; |
| 558 | rect.y = rect.top; |
| 559 | return rect; |
| 560 | } |
| 561 | |
| 562 | const expando = 'Sortable' + (new Date).getTime(); |
| 563 |
no test coverage detected
searching dependent graphs…