Skip to content

Commit 50cee12

Browse files
author
Victor
committed
fix(mouse): allow touch events for normal drag operation
Fixed #353
1 parent acbdcf9 commit 50cee12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mind-elixir",
3-
"version": "5.3.4",
3+
"version": "5.3.5",
44
"type": "module",
55
"description": "Mind elixir is a free open source mind map core.",
66
"keywords": [

src/mouse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default function (mind: MindElixirInstance) {
152152
// 支持空格+左键拖拽
153153
const isSpaceDrag = mind.spacePressed && e.button === 0 && e.pointerType === 'mouse'
154154
const mouseMoveButton = mind.mouseSelectionButton === 0 ? 2 : 0
155-
const isNormalDrag = e.button === mouseMoveButton && e.pointerType === 'mouse'
155+
const isNormalDrag = (e.button === mouseMoveButton && e.pointerType === 'mouse') || e.pointerType === 'touch'
156156

157157
if (!isSpaceDrag && !isNormalDrag) return
158158

0 commit comments

Comments
 (0)