Skip to content

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

Open
frobnitzem wants to merge 3 commits into
jakesgordon:masterfrom
frobnitzem:master
Open

Added abiliy to grow in both directions up to a max.#8
frobnitzem wants to merge 3 commits into
jakesgordon:masterfrom
frobnitzem:master

Conversation

@frobnitzem

Copy link
Copy Markdown

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