phylogeography/spread

Problem visualising in Safari

GuyBaele opened this issue · 2 comments

The following visualisation works fine in Google Chrome and Firefox (see screenshot attached):
https://view.spreadviz.org/?output=ddf9ff80-334a-475d-8cdd-901925a32877/dcfb953a-9a35-4bb6-bc15-2643036b57b0.json&maps=CN,KP,BD,RU,NP,BT,MN

However, in Safari, neither the map nor animations are visible (confirmed by Marc and myself; see screenshot attached).

Screenshot 2022-02-16 at 16 10 13

Screenshot 2022-02-16 at 16 10 18

Error: <path> attribute d: Expected number, "…3.7633 66.621 Q NaN NaN 293.7633…".

I don't have any Safari device to test, but assuming adding a svg path with NaN attributes breaks it (firefox and chrome probably skip them) this PR (#183) filters out all transitions of length zero which are the cause of that behavior.
Maybe we should fix that sooner in the pipeline (analysis code) since it doesn't make sense to generate output like that to start with.
This issue will be closed once the PR gets merged but please reopen if Safari keeps breaking after the fix.