@playcanvas/react
Version:
A React renderer for PlayCanvas – build interactive 3D applications using React's declarative paradigm.
37 lines • 981 B
JavaScript
export class SyntheticPointerEvent {
nativeEvent;
hasStoppedPropagation = false;
type;
constructor(e) {
this.nativeEvent = e;
this.type = e.type;
Object.assign(this, e);
}
stopPropagation() {
this.hasStoppedPropagation = true;
this.nativeEvent.stopPropagation();
}
stopImmediatePropagation() {
this.hasStoppedPropagation = true;
this.nativeEvent.stopImmediatePropagation();
}
}
export class SyntheticMouseEvent {
nativeEvent;
hasStoppedPropagation = false;
type;
constructor(e) {
this.nativeEvent = e;
this.type = e.type;
Object.assign(this, e);
}
stopPropagation() {
this.hasStoppedPropagation = true;
this.nativeEvent.stopPropagation();
}
stopImmediatePropagation() {
this.hasStoppedPropagation = true;
this.nativeEvent.stopImmediatePropagation();
}
}
//# sourceMappingURL=synthetic-event.js.map