-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Image occlusion mask editor only loads for the first created note #2596
Comments
Thanks, looks like an unintended side-effect of the Svelte refactoring. |
@dae Thanks for the quick fix! This works well when using the image selection button. However, now that I'm starting to tinker with programmatically launching the editor into IO mode, I'm finding that I'm running into the same issue as before. My code is using the updated python API in #2598, but I can also reproduce the issue on main. Essentially, I'm skipping the image selection step prompted for by the button and calling Given the fix above, the first thing I tried was adding the same reset to With that in mind, do you think there's another way we could approach this perhaps? Still getting up to speed on Svelte, so I don't have a full overview of how the rendering lifecycle works. |
resetIOImageLoaded() is called from AddCards upon adding notes Seems to fix the additional scenarios discussed in the ankitects#2596 comments
OK, nvm, I think #2599 should do the trick - writing things out always helps 😅 |
My guess as to what's happening here: if there's a delay between the mode being unset and set to a different value, the existing image occlusion component is removed from the DOM. If the mode gets changed without being first removed, the existing component is removed, and presumably it's in an inconsistent state then. If we need to force the existing component to be removed first, we could probably do so by awaiting tick() before setting a new non-null value. |
Follow-up to #2485
With the latest
main
build, the IO mask editor disappears as soon as you attempt to create a second note:black-io-editor.mp4
The console log and stdout seem clean, did not see any error messages.
The text was updated successfully, but these errors were encountered: