pinchzoom icon indicating copy to clipboard operation
pinchzoom copied to clipboard

Uncaught TypeError: Cannot read properties of null (reading 'offsetWidth')

Open pySilver opened this issue 2 years ago • 1 comments

Hi! Not sure what I'm doing wrong here

this.instance = new PinchZoom(this.element, {});

gives:

pinch-zoom.js?0bd1:517 Uncaught TypeError: Cannot read properties of null (reading 'offsetWidth')
    at PinchZoom.getInitialZoomFactor (pinch-zoom.js?0bd1:517:1)
    at PinchZoom.eval (pinch-zoom.js?0bd1:702:1)
getInitialZoomFactor @ pinch-zoom.js?0bd1:517
eval @ pinch-zoom.js?0bd1:702
setTimeout (async)
update @ pinch-zoom.js?0bd1:699
PinchZoom @ pinch-zoom.js?0bd1:102
eval @ pinch_zoom_controller.js?538c:14
setTimeout (async)
connect @ pinch_zoom_controller.js?538c:13
connect @ stimulus.js?73bd:1086
connectContextForScope @ stimulus.js?73bd:1278
scopeConnected @ stimulus.js?73bd:1593
elementMatchedValue @ stimulus.js?73bd:1513
tokenMatched @ stimulus.js?73bd:804
tokenMatched @ stimulus.js?73bd:737
eval @ stimulus.js?73bd:731
tokensMatched @ stimulus.js?73bd:731
elementMatchedAttribute @ stimulus.js?73bd:720
elementMatched @ stimulus.js?73bd:498
addElement @ stimulus.js?73bd:446
refresh @ stimulus.js?73bd:367
start @ stimulus.js?73bd:337
start @ stimulus.js?73bd:474
start @ stimulus.js?73bd:702
start @ stimulus.js?73bd:785
start @ stimulus.js?73bd:1491
start @ stimulus.js?73bd:1561
start @ stimulus.js?73bd:1645
await in start (async)
start @ stimulus.js?73bd:1638
eval @ app.js?cd18:7
./src/js/app.js @ app.js:679
__webpack_require__ @ app.js:1019
(anonymous) @ app.js:1148
__webpack_require__.O @ app.js:1053
(anonymous) @ app.js:1150
(anonymous) @ app.js:1152
pinch-zoom.js?0bd1:633 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at PinchZoom.unsetContainerY (pinch-zoom.js?0bd1:633:1)
    at PinchZoom.updateAspectRatio (pinch-zoom.js?0bd1:508:1)
    at PinchZoom.update (pinch-zoom.js?0bd1:690:1)

pySilver avatar Aug 26 '22 19:08 pySilver

Hello Silver! Since this code is open-source, without anyone getting paid to work on it, it's difficult to satisfy help out with issues like this. I hope you understand! 🌻

But if you want to dig in and investigate what's causing this, maybe you can help out and improve the project?

sandstrom avatar Aug 27 '22 12:08 sandstrom