@pixi/events
Advanced tools
Comparing version 7.3.0-rc.2 to 7.3.0
@@ -89,4 +89,5 @@ "use strict"; | ||
onPointerDown(nativeEvent) { | ||
if (!this.features.click || (this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, this.supportsTouchEvents && nativeEvent.pointerType === "touch")) | ||
if (!this.features.click) | ||
return; | ||
this.rootBoundary.rootTarget = this.renderer.lastObjectRendered; | ||
const events = this.normalizeToPointerData(nativeEvent); | ||
@@ -105,5 +106,5 @@ this.autoPreventDefault && events[0].isNormalized && (nativeEvent.cancelable || !("cancelable" in nativeEvent)) && nativeEvent.preventDefault(); | ||
onPointerMove(nativeEvent) { | ||
if (!this.features.move || (this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, this.supportsTouchEvents && nativeEvent.pointerType === "touch")) | ||
if (!this.features.move) | ||
return; | ||
EventTicker.EventsTicker.pointerMoved(); | ||
this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, EventTicker.EventsTicker.pointerMoved(); | ||
const normalizedEvents = this.normalizeToPointerData(nativeEvent); | ||
@@ -121,4 +122,5 @@ for (let i = 0, j = normalizedEvents.length; i < j; i++) { | ||
onPointerUp(nativeEvent) { | ||
if (!this.features.click || (this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, this.supportsTouchEvents && nativeEvent.pointerType === "touch")) | ||
if (!this.features.click) | ||
return; | ||
this.rootBoundary.rootTarget = this.renderer.lastObjectRendered; | ||
let target = nativeEvent.target; | ||
@@ -138,4 +140,5 @@ nativeEvent.composedPath && nativeEvent.composedPath().length > 0 && (target = nativeEvent.composedPath()[0]); | ||
onPointerOverOut(nativeEvent) { | ||
if (!this.features.click || (this.rootBoundary.rootTarget = this.renderer.lastObjectRendered, this.supportsTouchEvents && nativeEvent.pointerType === "touch")) | ||
if (!this.features.click) | ||
return; | ||
this.rootBoundary.rootTarget = this.renderer.lastObjectRendered; | ||
const normalizedEvents = this.normalizeToPointerData(nativeEvent); | ||
@@ -173,3 +176,3 @@ for (let i = 0, j = normalizedEvents.length; i < j; i++) { | ||
const style = this.domElement.style; | ||
style && (globalThis.navigator.msPointerEnabled ? (style.msContentZooming = "none", style.msTouchAction = "none") : this.supportsPointerEvents && (style.touchAction = "none")), this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this.onPointerMove, !0), this.domElement.addEventListener("pointerdown", this.onPointerDown, !0), this.domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), this.domElement.addEventListener("pointerover", this.onPointerOverOut, !0), globalThis.addEventListener("pointerup", this.onPointerUp, !0)) : (globalThis.document.addEventListener("mousemove", this.onPointerMove, !0), this.domElement.addEventListener("mousedown", this.onPointerDown, !0), this.domElement.addEventListener("mouseout", this.onPointerOverOut, !0), this.domElement.addEventListener("mouseover", this.onPointerOverOut, !0), globalThis.addEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.domElement.addEventListener("touchstart", this.onPointerDown, !0), this.domElement.addEventListener("touchend", this.onPointerUp, !0), this.domElement.addEventListener("touchmove", this.onPointerMove, !0)), this.domElement.addEventListener("wheel", this.onWheel, { | ||
style && (globalThis.navigator.msPointerEnabled ? (style.msContentZooming = "none", style.msTouchAction = "none") : this.supportsPointerEvents && (style.touchAction = "none")), this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this.onPointerMove, !0), this.domElement.addEventListener("pointerdown", this.onPointerDown, !0), this.domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), this.domElement.addEventListener("pointerover", this.onPointerOverOut, !0), globalThis.addEventListener("pointerup", this.onPointerUp, !0)) : (globalThis.document.addEventListener("mousemove", this.onPointerMove, !0), this.domElement.addEventListener("mousedown", this.onPointerDown, !0), this.domElement.addEventListener("mouseout", this.onPointerOverOut, !0), this.domElement.addEventListener("mouseover", this.onPointerOverOut, !0), globalThis.addEventListener("mouseup", this.onPointerUp, !0), this.supportsTouchEvents && (this.domElement.addEventListener("touchstart", this.onPointerDown, !0), this.domElement.addEventListener("touchend", this.onPointerUp, !0), this.domElement.addEventListener("touchmove", this.onPointerMove, !0))), this.domElement.addEventListener("wheel", this.onWheel, { | ||
passive: !0, | ||
@@ -185,3 +188,3 @@ capture: !0 | ||
const style = this.domElement.style; | ||
globalThis.navigator.msPointerEnabled ? (style.msContentZooming = "", style.msTouchAction = "") : this.supportsPointerEvents && (style.touchAction = ""), this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this.onPointerMove, !0), this.domElement.removeEventListener("pointerdown", this.onPointerDown, !0), this.domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), this.domElement.removeEventListener("pointerover", this.onPointerOverOut, !0), globalThis.removeEventListener("pointerup", this.onPointerUp, !0)) : (globalThis.document.removeEventListener("mousemove", this.onPointerMove, !0), this.domElement.removeEventListener("mousedown", this.onPointerDown, !0), this.domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), this.domElement.removeEventListener("mouseover", this.onPointerOverOut, !0), globalThis.removeEventListener("mouseup", this.onPointerUp, !0)), this.supportsTouchEvents && (this.domElement.removeEventListener("touchstart", this.onPointerDown, !0), this.domElement.removeEventListener("touchend", this.onPointerUp, !0), this.domElement.removeEventListener("touchmove", this.onPointerMove, !0)), this.domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1; | ||
globalThis.navigator.msPointerEnabled ? (style.msContentZooming = "", style.msTouchAction = "") : this.supportsPointerEvents && (style.touchAction = ""), this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this.onPointerMove, !0), this.domElement.removeEventListener("pointerdown", this.onPointerDown, !0), this.domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), this.domElement.removeEventListener("pointerover", this.onPointerOverOut, !0), globalThis.removeEventListener("pointerup", this.onPointerUp, !0)) : (globalThis.document.removeEventListener("mousemove", this.onPointerMove, !0), this.domElement.removeEventListener("mousedown", this.onPointerDown, !0), this.domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), this.domElement.removeEventListener("mouseover", this.onPointerOverOut, !0), globalThis.removeEventListener("mouseup", this.onPointerUp, !0), this.supportsTouchEvents && (this.domElement.removeEventListener("touchstart", this.onPointerDown, !0), this.domElement.removeEventListener("touchend", this.onPointerUp, !0), this.domElement.removeEventListener("touchmove", this.onPointerMove, !0))), this.domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1; | ||
} | ||
@@ -188,0 +191,0 @@ /** |
@@ -361,8 +361,8 @@ "use strict"; | ||
* Enable interaction events for the DisplayObject. Touch, pointer and mouse. | ||
* This now replaces the `interactive` property | ||
* There is 5 types of interaction settings: | ||
* This now replaces the `interactive` property. | ||
* There are 5 types of interaction settings: | ||
* - `'none'`: Ignores all interaction events, even on its children. | ||
* - `'passive'`: Does not emit events and ignores all hit testing on itself and non-interactive children. | ||
* Interactive children will still emit events. | ||
* - `'auto'`: Does not emit events and but is hit tested if parent is interactive. Same as `interactive = false` in v7 | ||
* - `'auto'`: Does not emit events but is hit tested if parent is interactive. Same as `interactive = false` in v7 | ||
* - `'static'`: Emit events and is hit tested. Same as `interaction = true` in v7 | ||
@@ -369,0 +369,0 @@ * - `'dynamic'`: Emits events and is hit tested but will also receive mock interaction events fired from a ticker to |
{ | ||
"name": "@pixi/events", | ||
"version": "7.3.0-rc.2", | ||
"version": "7.3.0", | ||
"main": "lib/index.js", | ||
@@ -46,5 +46,5 @@ "module": "lib/index.mjs", | ||
"peerDependencies": { | ||
"@pixi/core": "7.3.0-rc.2", | ||
"@pixi/display": "7.3.0-rc.2" | ||
"@pixi/core": "7.3.0", | ||
"@pixi/display": "7.3.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5304
0
563863
51775