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

Method triggerEvent

src/gridstack.ts:2976–2983  ·  view source on GitHub ↗

call given event callback on our main top-most grid (if we're nested)

(event: Event, target: GridItemHTMLElement)

Source from the content-addressed store, hash-verified

2974
2975 /** call given event callback on our main top-most grid (if we're nested) */
2976 protected triggerEvent(event: Event, target: GridItemHTMLElement) {
2977 // eslint-disable-next-line @typescript-eslint/no-this-alias
2978 let grid: GridStack = this;
2979 while (grid.parentGridNode) grid = grid.parentGridNode.grid;
2980 if (grid._gsEventHandler[event.type]) {
2981 grid._gsEventHandler[event.type](event, target);
2982 }
2983 }
2984
2985 /** @internal called when item leaving our area by either cursor dropout event
2986 * or shape is outside our boundaries. remove it from us, and mark temporary if this was

Callers 13

onStartMovingMethod · 0.95
onEndMovingMethod · 0.95
_dragOrResizeMethod · 0.95
_callDragMethod · 0.80
_mouseMoveMethod · 0.80
_mouseUpMethod · 0.80
_resizeStartMethod · 0.80
_resizingMethod · 0.80
_resizeStopMethod · 0.80
_mouseEnterMethod · 0.80
_mouseLeaveMethod · 0.80
dropMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected