@leafer-ui/interaction 1.0.0-rc.27 → 1.0.0-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/Interaction.ts +3 -3
- package/src/config.ts +1 -1
- package/src/emit.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interaction",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.30",
|
|
4
4
|
"description": "@leafer-ui/interaction",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.0-rc.
|
|
26
|
-
"@leafer-ui/draw": "1.0.0-rc.
|
|
27
|
-
"@leafer-ui/event": "1.0.0-rc.
|
|
25
|
+
"@leafer/core": "1.0.0-rc.30",
|
|
26
|
+
"@leafer-ui/draw": "1.0.0-rc.30",
|
|
27
|
+
"@leafer-ui/event": "1.0.0-rc.30"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@leafer/interface": "1.0.0-rc.
|
|
31
|
-
"@leafer-ui/interface": "1.0.0-rc.
|
|
30
|
+
"@leafer/interface": "1.0.0-rc.30",
|
|
31
|
+
"@leafer-ui/interface": "1.0.0-rc.30"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/Interaction.ts
CHANGED
|
@@ -105,10 +105,10 @@ export class InteractionBase implements IInteraction {
|
|
|
105
105
|
if (PointerButton.left(data)) {
|
|
106
106
|
this.tapWait()
|
|
107
107
|
this.longPressWait(data)
|
|
108
|
-
} else if (PointerButton.right(data)) {
|
|
109
|
-
this.waitMenuTap = true
|
|
110
108
|
}
|
|
111
109
|
|
|
110
|
+
this.waitMenuTap = PointerButton.right(data)
|
|
111
|
+
|
|
112
112
|
this.dragger.setDragData(data) // must after down event
|
|
113
113
|
if (!this.isHoldRightKey) this.updateCursor(data)
|
|
114
114
|
}
|
|
@@ -421,7 +421,7 @@ export class InteractionBase implements IInteraction {
|
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
public updateCursor(data?: IPointerEvent): void {
|
|
424
|
-
if (this.config.cursor
|
|
424
|
+
if (!this.config.cursor || !this.config.pointer.hover) return
|
|
425
425
|
|
|
426
426
|
if (!data) {
|
|
427
427
|
this.updateHoverData()
|
package/src/config.ts
CHANGED
package/src/emit.ts
CHANGED
|
@@ -51,7 +51,7 @@ function emitAppChildren(leaf: ILeaf, type: string, data: IUIEvent, capture?: bo
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function emitEvent(leaf: ILeaf, type: string, data: IUIEvent, capture?: boolean, excludePath?: ILeafList): boolean {
|
|
54
|
-
if (leaf.destroyed) return
|
|
54
|
+
if (leaf.destroyed) return false
|
|
55
55
|
if (leaf.__.hitSelf && !exclude(leaf, excludePath)) {
|
|
56
56
|
|
|
57
57
|
if (State.updateEventStyle) State.updateEventStyle(leaf, type) // hoverStyle / pressStyle
|