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

Function pointerleave

src/dd-touch.ts:153–166  ·  view source on GitHub ↗
(e: PointerEvent)

Source from the content-addressed store, hash-verified

151}
152
153export function pointerleave(e: PointerEvent): void {
154 // ignore the leave on ourself we get before releasing the mouse over ourself
155 // by delaying sending the event and having the up event cancel us
156 if (!DDManager.dragElement) {
157 // console.log('pointerleave ignored');
158 return;
159 }
160 if (e.pointerType === 'mouse') return;
161 DDTouch.pointerLeaveTimeout = window.setTimeout(() => {
162 delete DDTouch.pointerLeaveTimeout;
163 // console.log('pointerleave delayed');
164 simulatePointerMouseEvent(e, 'mouseleave');
165 }, 10);
166}
167

Callers 1

dd-touch-spec.tsFile · 0.90

Calls 1

Tested by

no test coverage detected