Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Sep 11, 2017

Add drawBBox() method (for debugging), and fix a number of bounding box problems that it was able to demonstrate.

It turns out we don't want to replace the original bbox created for a wrapper (as it can cause loss of other data, like the L property), so we don't use BBOX.empty() in computeBBox() but instead add an empty() method to the bbox to set the w, h, and d values appropriately in the already existing BBoxes.

We use a new getSpace() method to compute bbox.L (the left spacing) when the object is created (since some bbox computations need it).

Since the bbox.L value is already computed, we use that to set the space attribute rather than the old SPACE array (which is no longer needed).

The rest of the changes are tweaks to get the bounding boxes or placement of things correct.

Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

@dpvc dpvc merged commit 9057f6f into stretchy-enum Oct 10, 2017
@dpvc dpvc deleted the bbox-improvements branch October 10, 2017 10:17
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.

3 participants