Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught DOMException: Failed to execute 'inverse' on 'SVGMatrix': The matrix is not invertible. #308

Closed
yangdan8 opened this issue Aug 7, 2018 · 6 comments
Labels

Comments

@yangdan8
Copy link

yangdan8 commented Aug 7, 2018

这个bug比较难重现,我只能写个控制台报错内容,然后将错误的代码位置上传给你
This bug is hard to reproduce. I can only write a console to report the wrong content and upload the wrong code to you.
qq 20180807090526
qq 20180807090601

@bumbu bumbu added the bug label Aug 11, 2018
@bumbu
Copy link
Owner

bumbu commented Aug 11, 2018

Hi @yangdan8.
Does this happen when you call the destroy method? It seems so from the logs.
Do you do anything else prior to that? Maybe you unmount the SVG from the DOM and then call the destroy, but because the SVG doesn't exist anymore - it just fails?
It's really hard to understand what's going on without a proper description and an example.

@bumbu
Copy link
Owner

bumbu commented Aug 28, 2018

Closing as no details provided.

@bumbu bumbu closed this as completed Aug 28, 2018
@hermanbanken
Copy link

I'm seeing this as well. Either reset, or destroy.
Screenshot 2019-10-27 at 21 11 56

I'm using Chrome 77.

@hermanbanken
Copy link

The SVG is definitely not unmounted.

@hermanbanken
Copy link

Nevermind, I found that simply having multiple instances of SVGPanZoom on the same page causes this issue too! Fixed that by only rendering one at the same time.

@HammadManzoor
Copy link

Faced the same issue. The problem occurs when you try to use reset when the container for the svg is not visible on the viewport. I fixed it by checking for this before performing reset.

const divElement = this.el.nativeElement.querySelector( '#myContainer' ); if (divElement) { const viewportHeight = window.innerHeight; const divOffset = divElement.getBoundingClientRect().top; // Check if the div is in the viewport if (divOffset < viewportHeight) { this.svgPanZoom.resize(); this.svgPanZoom.reset(); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants