pewpew icon indicating copy to clipboard operation
pewpew copied to clipboard

China mode breaks

Open ramandi opened this issue 8 years ago • 2 comments

Probably you are aware, but just in case... china_mode breaks after a while because slatlong and cnlatlong have different lengths.

Thank you for your work!

ramandi avatar Mar 13 '17 15:03 ramandi

thx. prbly overhauling this to use WebGL this year.

hrbrmstr avatar Mar 13 '17 15:03 hrbrmstr

Sorry, I'm not sure whether I explained it clearly before. The problem I saw was simply because the arrays slatlong and cnlatlong, created from csv files, have different sizes. You get a random src between 0 and slatlong length. Later, if china_mode is enabled, you try to access src index in cnlatlong. Since samplatlong.csv has 2530 lines, while cnlatlong.csv only has 2519 lines, when src becomes greater than 2519 the indexation fails and the visualization hangs. Obviously, you can avoid the problem simply making cnlatlong.csv's length greater than samplatlong.csv's one. Despite that, maybe src should be randomly obtained between 0 and cnlatlong's length when china_mode is enabled. Not a big problem, but I thought I should note it. If it was clear before, sorry for insisting.

ramandi avatar Mar 13 '17 20:03 ramandi