ailon / markerjs-live

Display dynamic, interactive, and scalable image annotations in your web apps.
7 stars 1 forks source link

What is the correct way to reload markers #10

Open diginikkari opened 4 months ago

diginikkari commented 4 months ago

I'm trying to dynamically load markers. I was able to do it using restoreState method, but it is marked as private. What is "correct" way to reload markers?

ailon commented 4 months ago

If you mean reloading the markup in an already open marker.js Live instance then there's no official way of doing that. It was made with the assumption of creating a new instance to show each markup object.

I guess if calling restoreState() works for you without side effects, you can use it in a "hacky" way (ignoring the private designation).