File tree Expand file tree Collapse file tree 5 files changed +11
-16
lines changed
components/MouseTransformHandler Expand file tree Collapse file tree 5 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1+ { "semi": false }
Original file line number Diff line number Diff line change @@ -20,5 +20,3 @@ See [demos and example code here](https://universaldatatool.com/react-time-serie
2020
2121![ ] ( https://user-images.githubusercontent.com/1910070/97049707-2821d080-154a-11eb-8a58-fa6446e38ef6.png )
2222![ ] ( https://user-images.githubusercontent.com/1910070/97049705-2821d080-154a-11eb-87eb-97e3506d6e1b.png )
23-
24-
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ export const MouseTransformHandler = ({
2121 const [ middleMouseDown , setMiddleMouseDown ] = useState ( false )
2222 const [ toolMode ] = useToolMode ( )
2323 const containerRef = useRef ( )
24-
2524 useEffect ( ( ) => {
2625 const onKeyDown = ( e ) => {
2726 if ( e . key === "Shift" ) {
@@ -149,9 +148,11 @@ export const MouseTransformHandler = ({
149148 const containerMountCallback = useCallback ( ( ref ) => {
150149 if ( ref === null ) {
151150 containerRef . current . removeEventListener ( "wheel" , onWheel )
151+ containerRef . current = ref
152+ } else {
153+ containerRef . current = ref
154+ ref . addEventListener ( "wheel" , onWheel , { passive : false } )
152155 }
153- containerRef . current = ref
154- ref . addEventListener ( "wheel" , onWheel , { passive : false } )
155156 } , [ ] )
156157
157158 return (
Original file line number Diff line number Diff line change 1- import React from ' react' ;
2- import ReactDOM from ' react-dom' ;
3- import ' ./index.css' ;
4- import App from ' ./App' ;
1+ import React from " react"
2+ import ReactDOM from " react-dom"
3+ import " ./index.css"
4+ import App from " ./App"
55
66ReactDOM . render (
77 < React . StrictMode >
88 < App />
99 </ React . StrictMode > ,
10- document . getElementById ( ' root' )
11- ) ;
10+ document . getElementById ( " root" )
11+ )
Original file line number Diff line number Diff line change @@ -15438,11 +15438,6 @@ tr46@^1.0.1:
1543815438 dependencies:
1543915439 punycode "^2.1.0"
1544015440
15441- transformation-matrix-js@^2.7.6:
15442- version "2.7.6"
15443- resolved "https://registry.yarnpkg.com/transformation-matrix-js/-/transformation-matrix-js-2.7.6.tgz#25c7ff055c99b8528ffbd4c4a2684be6c9d5ef60"
15444- integrity sha512-1CxDIZmCQ3vA0GGnkdMQqxUXVm3xXAFmglPYRS1hr37LzSg22TC7QAWOT38OmdUvMEs/rqcnkFoAsqvzdiluDg==
15445-
1544615441trim-repeated@^1.0.0:
1544715442 version "1.0.0"
1544815443 resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
You can’t perform that action at this time.
0 commit comments