Skip to content

Commit 3ccee28

Browse files
Adeams1805mboyaval
andauthored
fix: add touchmove event (#448)
Co-authored-by: Maeva <[email protected]>
1 parent 055342a commit 3ccee28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Tree/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ class Tree extends React.Component<TreeProps, TreeState> {
165165
return true;
166166
})
167167
.on('zoom', (event: any) => {
168-
if (!this.props.draggable && (event.sourceEvent.type === 'mousemove')) {
169-
return
168+
if (
169+
!this.props.draggable &&
170+
(event.sourceEvent.type === 'mousemove' || event.sourceEvent.type === 'touchmove')
171+
) {
172+
return;
170173
}
171174

172175
g.attr('transform', event.transform);

0 commit comments

Comments
 (0)