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
20
20
21
21
![ ] ( https://user-images.githubusercontent.com/1910070/97049707-2821d080-154a-11eb-8a58-fa6446e38ef6.png )
22
22
![ ] ( 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 = ({
21
21
const [ middleMouseDown , setMiddleMouseDown ] = useState ( false )
22
22
const [ toolMode ] = useToolMode ( )
23
23
const containerRef = useRef ( )
24
-
25
24
useEffect ( ( ) => {
26
25
const onKeyDown = ( e ) => {
27
26
if ( e . key === "Shift" ) {
@@ -149,9 +148,11 @@ export const MouseTransformHandler = ({
149
148
const containerMountCallback = useCallback ( ( ref ) => {
150
149
if ( ref === null ) {
151
150
containerRef . current . removeEventListener ( "wheel" , onWheel )
151
+ containerRef . current = ref
152
+ } else {
153
+ containerRef . current = ref
154
+ ref . addEventListener ( "wheel" , onWheel , { passive : false } )
152
155
}
153
- containerRef . current = ref
154
- ref . addEventListener ( "wheel" , onWheel , { passive : false } )
155
156
} , [ ] )
156
157
157
158
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"
5
5
6
6
ReactDOM . render (
7
7
< React . StrictMode >
8
8
< App />
9
9
</ 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:
15438
15438
dependencies:
15439
15439
punycode "^2.1.0"
15440
15440
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
-
15446
15441
trim-repeated@^1.0.0:
15447
15442
version "1.0.0"
15448
15443
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