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

Move right corner support to common rendering. #3311

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

samelhusseini
Copy link
Contributor

@samelhusseini samelhusseini commented Oct 22, 2019

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Resolves #3296

Proposed Changes

Might right corner support to common rendering. Making it so there's always a right corner element. Square by default. Extended to be round in Zelos.

Reason for Changes

Making it easier to add right corners in extension renderers.

Test Coverage

Tested geras and zelos rendering in playground. Remains the same.
Added zelos top row and bottom row to minimalist renderer and got rounded corners on both sides.

Tested on:

  • Desktop Chrome

Documentation

Additional Information

outlinePath += this.constants_.OUTSIDE_CORNERS.bottomLeft;
} else if (Blockly.blockRendering.Types.isRightRoundedCorner(elem)) {
outlinePath += this.constants_.OUTSIDE_CORNERS.bottomRight;
rightCornerYOffset = this.constants_.OUTSIDE_CORNERS.rightHeight;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note, the right corner Y offset was this.constants_.INSIDE_CORNERS.rightHeight in zelos, but this was a bug. It should be attached to the OUTSIDE_CORNER height, so I changed it to this.constants_.OUTSIDE_CORNERS.rightHeight.

@samelhusseini samelhusseini merged commit 06b5bb1 into google:develop Oct 24, 2019
@samelhusseini samelhusseini deleted the right_corners_common branch October 24, 2019 01:58
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.

2 participants