Registry Mirror
Skip to content

Conversation

@samelhusseini

@samelhusseini samelhusseini commented Oct 23, 2019 •

Copy link
Copy Markdown
Contributor

The basics

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

The details

Resolves

Dynamic shapes not reporting the correct size information.
Fixes #3325

Proposed Changes

Each connection is able to query its connectionWidth or Height that will in turn call the shape's height / width methods if the shape is dynamic.

Change all references to shape.width and shape.height to getConnectionWidth and getConnectionHeight for consistency.

In Zelos, recompute bounds after setting the connection height and width (once we've figured out what the final height is going to be)

Reason for Changes

Test Coverage

Tested geras and zelos in playground.

Tested on:

Documentation

Additional Information

Before:
Screen Shot 2019-10-23 at 2 12 35 PM

After:
Screen Shot 2019-10-23 at 2 11 18 PM

@samelhusseini samelhusseini changed the title [Zelos] Fix dynamic connection shape size [WIP][Zelos] Fix dynamic connection shape size Oct 24, 2019
@samelhusseini samelhusseini changed the title [WIP][Zelos] Fix dynamic connection shape size [Zelos] Fix dynamic connection shape size Oct 24, 2019
@samelhusseini

Copy link
Copy Markdown
Contributor Author

@rachel-fenichel this is ready for another look. This ensures all info is there before we do the draw pass, and the draw pass is only reading pre-computed info.
For the dynamic output shapes, I set their initial shape dimensions to 0. Once we've done a full pass in info and have the height of the connection handy, we re-set the shape dimensions on the connections.
I've moved setting the shape dimensions into a method call so that any dependencies on the height / width can be updated accordingly.

@rachel-fenichel

Copy link
Copy Markdown
Collaborator

Thanks for updating this.

LGTM

@samelhusseini
samelhusseini merged commit a79ea16 into RaspberryPiFoundation:develop Oct 25, 2019
@samelhusseini
samelhusseini deleted the zelos_better_dyanmic_shapes branch October 25, 2019 04:33
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.

2 participants