Initial commit

This commit is contained in:
2021-10-23 19:59:20 +10:00
commit ba4c9a7d7a
1851 changed files with 1250444 additions and 0 deletions

37
node_modules/konva/lib/PointerEvents.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import { Konva } from './Global.js';
const Captures = new Map();
const SUPPORT_POINTER_EVENTS = Konva._global['PointerEvent'] !== undefined;
export function getCapturedShape(pointerId) {
return Captures.get(pointerId);
}
export function createEvent(evt) {
return {
evt,
pointerId: evt.pointerId,
};
}
export function hasPointerCapture(pointerId, shape) {
return Captures.get(pointerId) === shape;
}
export function setPointerCapture(pointerId, shape) {
releaseCapture(pointerId);
const stage = shape.getStage();
if (!stage)
return;
Captures.set(pointerId, shape);
if (SUPPORT_POINTER_EVENTS) {
shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));
}
}
export function releaseCapture(pointerId, target) {
const shape = Captures.get(pointerId);
if (!shape)
return;
const stage = shape.getStage();
if (stage && stage.content) {
}
Captures.delete(pointerId);
if (SUPPORT_POINTER_EVENTS) {
shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));
}
}