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

Added abiliy to grow in both directions up to a max. #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frobnitzem
Copy link

The GrowingPacker can now add elements that exceed both the width and height of the root container. It does this by replacing the root with a new root whose (x,y) origin points at the newly added space.

This breaks the assumption that the (x,y) origin is always at the top-left of each node. Instead, the (x,y) origin is always somewhere within the node. Of course, the width and height still always represent the total area "owned" by each node. This has been used to terminate the "fits-inside" traversal early by skipping dead-ends when a node is smaller than the new element to add.

Finally, the growing packer demo has been changed to grow up to the max width and height available to the canvas area.

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.

1 participant