Skip to content

How to restore the zoom factor and clipping in the canvas view after model reset? #949

Answered by tortmayr
rsoika asked this question in Q&A
Discussion options

You must be logged in to vote

But did I understand you correctly - You mean that I should react on FeedbackActions on the server side and provide the last zoom/clipping information when I reset the GModelState?

No you don't have to react to these actions. They are handled by the framework and automatically reapplied onto the updated model on client side.
However, this approach can only work if you have stable/deterministic ids.
I guess the problem is the way that you "reset" your GModelState. You have to ensure that

  • The id of the graphical model root (GModelState.getRoot()) is the same across model updates
  • The revision of the model root is not reset on update

The way we typically do this is that we don't regenerat…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@rsoika
Comment options

Comment options

You must be logged in to vote
1 reply
@rsoika
Comment options

Answer selected by rsoika
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants