Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[layout] introduced 'interactive' layout #36

Merged
merged 1 commit into from
Sep 5, 2019
Merged

Conversation

JanKoehnlein
Copy link
Contributor


Map<T, String> element2id = newHashMap
Map<String, T> id2element = newHashMap
Set<String> otherIds = newHashSet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you have reverted my changes c5d5b14#diff-792329e50cbbdd3a4b69713fb7e205fb
Was this on purpose?

@@ -514,7 +516,8 @@ protected void handle(OpenAction action) {
* Called when a {@link LayoutAction} is received.
*/
protected void handle(LayoutAction action) {
if (getServerLayoutKind(getModel()) != ServerLayoutKind.NONE) {
ServerLayoutKind layoutKind = getServerLayoutKind(currentRoot);
if (layoutKind != ServerLayoutKind.AUTOMATIC && layoutKind != ServerLayoutKind.NONE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also process such actions when the layout kind is AUTOMATIC.

* is close to a partial layout.
* The layout information must be stored in the model and will be overwritten on layout.
*/
INTERACTIVE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is not used anywhere in the framework. How would an application use it?

- added ServerLayoutKind.INTERACTIVE and handle it in DefaultDiagramServer
- allow to forward causing action to the layout, e.g. to fully layout when the user wants taht
Fixes #35

[generator] Fixed IdCache and example
@JanKoehnlein JanKoehnlein merged commit 34af423 into master Sep 5, 2019
@JanKoehnlein JanKoehnlein deleted the jk/interactive branch September 5, 2019 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[layout] add an interactive layout option
2 participants