Zoom resets moveable line in Shiny app

In the solution to this post (link below, by nirgrahamuk) about creating moveable lines with plotly, if you zoom in, the entire plot resets and the moved vertical line goes back to the origin. How should this be modified so the moved line stays where it was last dragged even when the zoom window changes on the plot? I ran the code from the posted solution as is:

Thanks for any help on this!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.