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

Clear debug rectangles before rerendering #2471

Merged

Conversation

rachel-fenichel
Copy link
Collaborator

The details

Resolves

Debug rectangles were handy if you were rendering a block once, but failed if you were testing how a block resizes in response to changes, because they just kept piling up on top of each other.

Proposed Changes

Turn the debug namespace into a class and save an instance of it on the block. Use that instance for repeated debugging, and clear old nodes and references to them before drawing new ones.

I didn't try to match new nodes to old nodes and just update the old values, mostly because this is easier and less likely to act strangely around mutators.

I also added documentation to all of the functions in block_rendering_debug.js.

Reason for Changes

Make debug visualizations useful in more cases.

Copy link
Contributor

@alschmiedt alschmiedt left a comment

Choose a reason for hiding this comment

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

lgtm

@rachel-fenichel rachel-fenichel merged commit 30f807f into google:render/collab May 21, 2019
@rachel-fenichel rachel-fenichel deleted the render/pesky_rectangles branch May 21, 2019 16:27
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.

None yet

2 participants