@leafer-ui/interaction-web 1.9.6 → 1.9.8
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 +4 -4
- package/src/Interaction.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/interaction-web",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
4
4
|
"description": "@leafer-ui/interaction-web",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.9.
|
|
26
|
-
"@leafer-ui/core": "1.9.
|
|
25
|
+
"@leafer/core": "1.9.8",
|
|
26
|
+
"@leafer-ui/core": "1.9.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@leafer/interface": "1.9.
|
|
29
|
+
"@leafer/interface": "1.9.8"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Interaction.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IObject, IPointData, ITimer, IKeepTouchData, ICursorType, IClientPointData } from '@leafer/interface'
|
|
1
|
+
import { IObject, IPointData, ITimer, IKeepTouchData, ICursorType, IClientPointData, IZoomEvent, IRotateEvent } from '@leafer/interface'
|
|
2
2
|
import { MathHelper, isArray, isObject, isString } from '@leafer/core'
|
|
3
3
|
import { InteractionBase, InteractionHelper, Cursor } from '@leafer-ui/core'
|
|
4
4
|
|
|
@@ -318,8 +318,8 @@ export class Interaction extends InteractionBase {
|
|
|
318
318
|
const scale = (e.scale / this.lastGestureScale)
|
|
319
319
|
const rotation = (e.rotation - this.lastGestureRotation) / Math.PI * 180 * (MathHelper.within(this.config.wheel.rotateSpeed, 0, 1) / 4 + 0.1)
|
|
320
320
|
|
|
321
|
-
this.zoom({ ...eventBase, scale: scale * scale })
|
|
322
|
-
this.rotate({ ...eventBase, rotation })
|
|
321
|
+
this.zoom({ ...eventBase, scale: scale * scale } as IZoomEvent)
|
|
322
|
+
this.rotate({ ...eventBase, rotation } as IRotateEvent)
|
|
323
323
|
|
|
324
324
|
this.lastGestureScale = e.scale
|
|
325
325
|
this.lastGestureRotation = e.rotation
|