MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / _itemRemoving

Method _itemRemoving

src/gridstack.ts:2683–2689  ·  view source on GitHub ↗

@internal mark item for removal

(el: GridItemHTMLElement, remove: boolean)

Source from the content-addressed store, hash-verified

2681
2682 /** @internal mark item for removal */
2683 private static _itemRemoving(el: GridItemHTMLElement, remove: boolean) {
2684 if (!el) return;
2685 const node = el ? el.gridstackNode : undefined;
2686 if (!node?.grid || el.classList.contains(node.grid.opts.removableOptions.decline)) return;
2687 remove ? node._isAboutToRemove = true : delete node._isAboutToRemove;
2688 remove ? el.classList.add('grid-stack-item-removing') : el.classList.remove('grid-stack-item-removing');
2689 }
2690
2691 /** @internal called to setup a trash drop zone if the user specifies it */
2692 protected _setupRemoveDrop(): GridStack {

Callers 4

cancelDragMethod · 0.80
_setupAcceptWidgetMethod · 0.80
_setupRemoveDropMethod · 0.80
_leaveMethod · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected