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

Method drop

src/dd-droppable.ts:146–153  ·  view source on GitHub ↗

item is being dropped on us - called by the drag mouseup handler - this calls the client drop event

(e: MouseEvent)

Source from the content-addressed store, hash-verified

144
145 /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */
146 public drop(e: MouseEvent): void {
147 e.preventDefault();
148 const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'drop' });
149 if (this.option.drop) {
150 this.option.drop(ev, this._ui(DDManager.dragElement))
151 }
152 this.triggerEvent('drop', ev);
153 }
154
155 /** @internal true if element matches the string/method accept option */
156 protected _canDrop(el: HTMLElement): boolean {

Callers 2

_mouseUpMethod · 0.80

Calls 3

_uiMethod · 0.95
initEventMethod · 0.80
triggerEventMethod · 0.80

Tested by

no test coverage detected