File tree 3 files changed +187
-176
lines changed
3 files changed +187
-176
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -72,7 +72,11 @@ export default ({
72
72
onMouseDown : ( e , specialEvent = { } ) => {
73
73
e . preventDefault ( )
74
74
75
- if ( e . button === 1 || ( e . button === 0 && dragWithPrimary ) )
75
+ if (
76
+ e . button === 1 ||
77
+ e . button === 2 ||
78
+ ( e . button === 0 && dragWithPrimary )
79
+ )
76
80
return changeDragging ( true )
77
81
78
82
const projMouse = mat . applyToPoint (
@@ -140,7 +144,11 @@ export default ({
140
144
changeZoomStart ( null )
141
145
changeZoomEnd ( null )
142
146
}
143
- if ( e . button === 1 || ( e . button === 0 && dragWithPrimary ) )
147
+ if (
148
+ e . button === 1 ||
149
+ e . button === 2 ||
150
+ ( e . button === 0 && dragWithPrimary )
151
+ )
144
152
return changeDragging ( false )
145
153
if ( e . button === 0 ) {
146
154
const { iw, ih } = layoutParams . current
@@ -152,6 +160,9 @@ export default ({
152
160
zoomIn ( direction , mousePosition . current )
153
161
// e.preventDefault()
154
162
} ,
163
+ onContextMenu : ( e ) => {
164
+ e . preventDefault ( )
165
+ } ,
155
166
}
156
167
return { mouseEvents, mousePosition }
157
168
}
You can’t perform that action at this time.
0 commit comments