Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Performing an undo operation after a layout returns to the wrong viewport location

0 votes
Hi,

We have undo engine on and are seeing incorrect behaviour undoing a layout operation after initial load of the graph control.

For example when the application loads, we add a load of nodes and edges and then hit a button to do a layout. Hit Ctrl+Z to undo the layout and it returns the original layout of nodes, edges correctly BUT the viewport is in the wrong place (e.g. Node is originally placed on the far left of graph, layout applied it moves, undo action applied and the node moves to bottom edge centre of graph). Subsequent runs of the layout work fine when undo is done, its the first time its done it works incorrectly.

Is there any way to get it to return to the correct position? It looks like internally the graph control is in some default state (ContentRect is 0, 0, 100, 100, DesiredSize is 0,0). Can we manually force the graph control out of this state on initial load to force it into a state where it works correctly?

Regards
closed with the note: Not a yEd question.
in Help by
closed by

1 Answer

0 votes

This forum is for yEd questions only. For questions regarding one of the yFiles programming libraries, please contact yWorks support by mail. (Please include your yWorks customer or evaluator ID in your mail when doing so.)

by [yWorks] (160k points)
Legal Disclosure | Privacy Policy
...