File tree Expand file tree Collapse file tree 3 files changed +187
-176
lines changed Expand file tree Collapse file tree 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 ({
7272 onMouseDown : ( e , specialEvent = { } ) => {
7373 e . preventDefault ( )
7474
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+ )
7680 return changeDragging ( true )
7781
7882 const projMouse = mat . applyToPoint (
@@ -140,7 +144,11 @@ export default ({
140144 changeZoomStart ( null )
141145 changeZoomEnd ( null )
142146 }
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+ )
144152 return changeDragging ( false )
145153 if ( e . button === 0 ) {
146154 const { iw, ih } = layoutParams . current
@@ -152,6 +160,9 @@ export default ({
152160 zoomIn ( direction , mousePosition . current )
153161 // e.preventDefault()
154162 } ,
163+ onContextMenu : ( e ) => {
164+ e . preventDefault ( )
165+ } ,
155166 }
156167 return { mouseEvents, mousePosition }
157168}
You can’t perform that action at this time.
0 commit comments