@leafer-ui/interaction 1.0.0-rc.28 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/interaction",
3
- "version": "1.0.0-rc.28",
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.28",
26
- "@leafer-ui/draw": "1.0.0-rc.28",
27
- "@leafer-ui/event": "1.0.0-rc.28"
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.28",
31
- "@leafer-ui/interface": "1.0.0-rc.28"
30
+ "@leafer/interface": "1.0.0-rc.30",
31
+ "@leafer-ui/interface": "1.0.0-rc.30"
32
32
  }
33
33
  }
@@ -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
  }
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 true
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