@leafer-ui/interaction 1.0.0-rc.24 → 1.0.0-rc.26
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 +4 -0
- package/src/config.ts +2 -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.26",
|
|
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.26",
|
|
26
|
+
"@leafer-ui/draw": "1.0.0-rc.26",
|
|
27
|
+
"@leafer-ui/event": "1.0.0-rc.26"
|
|
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.26",
|
|
31
|
+
"@leafer-ui/interface": "1.0.0-rc.26"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/Interaction.ts
CHANGED
|
@@ -235,6 +235,8 @@ export class InteractionBase implements IInteraction {
|
|
|
235
235
|
// key
|
|
236
236
|
|
|
237
237
|
public keyDown(data: IKeyEvent): void {
|
|
238
|
+
if (!this.config.keyEvent) return
|
|
239
|
+
|
|
238
240
|
const { code } = data
|
|
239
241
|
if (!this.downKeyMap[code]) {
|
|
240
242
|
this.downKeyMap[code] = true
|
|
@@ -250,6 +252,8 @@ export class InteractionBase implements IInteraction {
|
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
public keyUp(data: IKeyEvent): void {
|
|
255
|
+
if (!this.config.keyEvent) return
|
|
256
|
+
|
|
253
257
|
const { code } = data
|
|
254
258
|
this.downKeyMap[code] = false
|
|
255
259
|
Keyboard.setUpCode(code)
|