-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Generalize bbox handling in UI views (DOM and canvas) #13863
Conversation
f36c3df
to
dd44d86
Compare
dd44d86
to
1761fc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimal code changes look good, for my curiousity, what kinds of situations could cause these bboxes to be different from each other?
GlyphRenderer bbox=[45, 11, 334, 119]
Scatter bbox=[45, 11, 334, 119]
None, |
Previously different UI views handled this in their own ways. Now
bbox
is handled atDOMView
level. This in turn allows to simplifyView.serializable_state()
. In combination with usingView.children()
, it allows to remove almost all custom implementations (similar to changes in PR #13801). Having a commonbbox
also allows to uniformy handle positioning of DOM elements associated with renderers. Previously only axes were positioned on a trial basis. In this PR all renderers with a validbbox
are positioned. I also removed some redundant calls toupdate_geometry()
andcompute_geometry()
, which were revealed by other changes in this PR. Most file changes in this PR are trivial updates to*.blf
files.Example of legend's associated DOM element: