svgMap icon indicating copy to clipboard operation
svgMap copied to clipboard

Issue loading from vue

Open entity opened this issue 3 years ago • 2 comments
trafficstars

Hey buddy,

Currently facing this issue (https://github.com/bumbu/svg-pan-zoom/issues/308), not sure if its something that you would amend in the library. It only happens when using v-show or v-if with vue (so not in sight until you click something).

app.js:82134 Uncaught (in promise) DOMException: Failed to execute 'inverse' on 'SVGMatrix': The matrix is not invertible.
    at SvgPanZoom.zoomAtPoint (http://analyse.net.test/js/app.js:82134:50)
    at SvgPanZoom.zoom (http://analyse.net.test/js/app.js:82154:8)
    at SvgPanZoom.publicZoom (http://analyse.net.test/js/app.js:82172:8)
    at Object.zoom (http://analyse.net.test/js/app.js:82659:14)
    at l.createMap (http://analyse.net.test/js/app.js:83497:12542)
    at l.init (http://analyse.net.test/js/app.js:83497:1452)
    at new l (http://analyse.net.test/js/app.js:83497:46)
    at Proxy.mounted (http://analyse.net.test/js/app.js:33980:5)
    at callWithErrorHandling (http://analyse.net.test/js/app.js:28364:22)
    at callWithAsyncErrorHandling (http://analyse.net.test/js/app.js:28373:21)

entity avatar Dec 08 '21 20:12 entity

I had the same issue. I solved it by setting position:static; in CSS for this wrapper .svgMap-map-image

devShamim avatar Jan 06 '22 10:01 devShamim

I add setTimeout as a workaround. I didn't have this issue with an older vue3 version.

onMounted(() => {
  setTimeout(() => {
    const map = new svgMap({
      // ...
    })
  }, 0)
})

ga676005 avatar Aug 10 '22 08:08 ga676005