ailon / markerjs2

Add image annotation to your web apps.
https://markerjs.com
Other
142 stars 39 forks source link

Hidden and display again the markerjs (using inside a tab component) #192

Open bcatarinoSM opened 2 months ago

bcatarinoSM commented 2 months ago

Hello,

We are using the Markerjs with a manuscript component and we are using inside the content of a tab (image below). When we switch tabs we just apply class display :none or display:block to the content of each tab if it is active or not.

image

When we draw in manucript component and switch tab to "Form 3" and switch again to "Manuscript" we have an error related with position of markerjs (see image below)

image

is there any way to solve this issue?

PS: I tried to show again when the component is visible using show() method or restore the state of markerjs instance but we lose the position

ailon commented 2 months ago

The only thing I can think of is the same thing you tried to do but you may need to fully create a new instance of marker.js and then show it with a restored state. I know this is not optimal but I think it would be quirky otherwise.