Draft
Conversation
This is very useful for seeing what's going on here, but is ultimately useless for real onezoom usage.
…ably sized In a balanced tree, the node below "Animals" has a bounding box encompassing most of the insects. Thanks to this anchoring won't consider anything lower. Instead, insist that nodes are on-screen *and* of a reasonable size, decreasing the considered size to more tightly follow the flight. This fixes the initial problem, but now the flight from the Elephant Hawk-Moth to Elephant Seal is very messy. This is likely a problem elsewhere.
a4be6ed to
80c3b11
Compare
Collaborator
Author
|
Giving up on this for now. It seems to be a problem only in the "balanced" view, spiral/polytomy are fine. A zoom out from elephant hawk moth to complex life seems to, whenever we choose a new anchor node, zoom into the anchor node's bounding box and continue the flight from there as if this never happened. I've not managed to find the point in the animation code this happens though. If the flight is short enough for the anchor node not to need changing, there's no problem. |
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.
The problem in #972 is that we choose the anchor node primarily on a node's bounding box. In a "balanced" tree, the bounding box for one below "Animals" covers most of the insect kingdom, so we don't bother considering any nodes below as an anchor node. Eventually this is too far away and everything goes wrong:
OZtree/OZprivate/rawJS/OZTreeModule/src/position_helper.js
Line 385 in 42ffe51
As well as a traditional heap of tidy-up (EDIT: Merged in #982), a4be6ed fixes this by insisting on gvar (bounding box on screen) and a tighter range of rvar (node zoom). This fixes the initial issue, as the bounding box now follows you down, but the flight back from "Elephant Hawk-Moth" to "Elephant Seal" is very broken. I suspect this is an unrelated issue, and flight code that hasn't been used before not doing the right thing.
If you want to play with the cut-off @jrosindell / @jaredkhan, 9ec50a4 stashes the anchor node away so you can do things like this in the JS console:
... and watch the anchor node move about as you go.
If I get a chance tomorrow I'll see if I can figure out what's up with the flight.