Repository navigation
Drawing bbox fix for window scroll - #1683
Merged
Merged
Conversation
etpinard
commented
May 12, 2017
| left: -20.671875, | ||
| top: -11, | ||
| right: 20.34375, | ||
| bottom: 3 |
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
The width, left and right keys change correctly here in response to the annotation text relayout update.
Contributor
Author
- so that Drawing.bBox does not have to query the DOM to fing them on every call.
- to not have to instantiate one on every appendSVG call
Merged
| drawing.refRect = drawing.test3.select('.js-reference-point') | ||
| var testRect = testNode.getBoundingClientRect(), | ||
| refRect = test3.select('.js-reference-point') | ||
| .node().getBoundingClientRect(); |
Collaborator
There was a problem hiding this comment.
If you want to keep the perf gains from #1585 in this fix, I'm pretty sure the only change we'd need is to call this .getBoundingClientRect() with each drawing.bBox call, rather than caching it. But we can still cache tester, and we can cache test3.select('.js-reference-point').node().
Just a question of timing really - now that you have a scrolling test in place it seems safe to me, but you can leave it as is for now if you need to move on to other things.
Collaborator
|
💃 once #1690 is merged and tests pass |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

fixes #1678
I decide to play it safe an revert 29abb5d until we 🔒 the
Drawing.bBoxbehavior better. Reverting 29abb5d also fixes #1675, but maybe we could do better there.cc @alexcjohnson