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

Refactored the rotate button. #714

Merged
merged 2 commits into from
Dec 3, 2015
Merged

Conversation

kecso
Copy link
Member

@kecso kecso commented Dec 2, 2015

Fixes #663
Introduced new buttons so now we can rotate by dragging on the main button, or we can do one of the followings:

  • rotate left by 90 degrees
  • rotate right by 90 degrees
  • rotate left to the closest multiple of 90 degrees (if it is a multiple of 90 degrees, there will be no change)
  • rotate right to the closest multiple of 90 degrees (-||-)
  • set rotation to 0 degree
  • clear rotation info (so reset to the inherited information)

We also enhanced the tool-tip of buttons.
image

Fixes #663
Introduced new buttons so now we can rotate by dragging on the main button, or we can do one of the following:
- rotate left by 90 degrees
- rotate right by 90 degrees
- rotate left to the closest multiple of 90 degrees (if it is a multiple of 90 degrees, there will be no change)
- rotate right to the closest multiple of 90 degrees (-||-)
- set rotation to 0 degree
- clear rotation info (so reset to the inherited information)
We also enhanced the tool-tip of buttons.
regDegree = 0;
newDegree = 0;
} else if (degree === DiagramDesignerWidgetConstants.ROTATION_TOLEFT) {
newDegree = (regDegree || 0) - ((regDegree || 0) % 90);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not intialize regDegree with:

regDegree = this._client.getNode(gmeID).getEditableRegistry(REGISTRY_KEYS.ROTATION) || 0;

@pmeijer pmeijer assigned pmeijer and unassigned lattmann Dec 2, 2015
@kecso
Copy link
Member Author

kecso commented Dec 3, 2015

review comments have been fixed

pmeijer pushed a commit that referenced this pull request Dec 3, 2015
@pmeijer pmeijer merged commit c9449f0 into master Dec 3, 2015
@kecso kecso deleted the enhancement/refactor_rotate_button branch December 3, 2015 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Rotate Icons on Selected Objects All Do the Same Thing
3 participants