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

Crash when toggling layers in Vue3 #239

Open
Joebayld opened this issue May 30, 2024 · 3 comments
Open

Crash when toggling layers in Vue3 #239

Joebayld opened this issue May 30, 2024 · 3 comments

Comments

@Joebayld
Copy link

Joebayld commented May 30, 2024

I found a quite specific bug that I can't seem to solve and some of it might be a Vue3 bug. But essentially my app needs to enable/disable konva layers. The bug is that there's a crash that happens sometimes but it is only based on the stacking order of the layers. It's a weird one to explain but here's link to reproduce the issue.

Take note of the stack order. If you swap the order of layers one and two, the crash no longer happens. It seem to be only if you're toggling visibility of the first layer AND there is another layer under it.

https://codesandbox.io/p/sandbox/angry-hooks-7wwylm?file=%2Fsrc%2FApp.vue%3A11%2C15

@lavrton lavrton transferred this issue from konvajs/konva Jun 12, 2024
@lavrton
Copy link
Member

lavrton commented Jun 12, 2024

As a possible solution, use visible property on the layer instead of v-if.

@Joebayld
Copy link
Author

That was my workaround for some of it. But I still have some issues. All of this used to work fine in Vue2.

Is this a Konva bug or Vue? I'm worried I don't know how to get this resolved.

@lavrton
Copy link
Member

lavrton commented Jun 13, 2024

I think we have to do something in vue-konva package to fix that.

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

No branches or pull requests

2 participants