mlandis / phylowood

Browser-based Interactive Phylogeographic Animations
http://mlandis.github.com/phylowood/
20 stars 9 forks source link

Markers do not reappear immediately when they should when scrubbing backwards #16

Closed trvrb closed 10 years ago

trvrb commented 11 years ago

This bug can be seen in the H5N1 example. Here, there is a single 'red' lineage that emerges from the top clade (A_HongKong_97_1998) and dies out at 1998.0. Scrubbing forward this shows up as a homogeneous marker at Hong Kong that disappears when 1998.0 is reached. However, scrubbing backwards does not cause this marker to reappear until 1996.45 is hit.

trvrb commented 11 years ago

I've narrowed this down to the block of code at line 2370. When time is going backwards curClockTick and prevClockTick don't behave as intended and forceRedraw is not flagged as it should be (I think). Setting forceRedraw to true fixes the issue.

trvrb commented 11 years ago

No, this can't be right. It's not just an issue of scrubbing backwards, but a combination of scrubbing backwards over a sampling event (rather than a divergence event).

mlandis commented 10 years ago

Sorry I missed this bug! Phylowood.divergenceTicks, which coordinates marker redrawing to match against the slider position, was not properly recording non-extant leaf node events. Fixed.

trvrb commented 10 years ago

Closing issues! Fantastic.