Commit 26733e9f9e38f46c2e0ec253b7c1e716e5f442b1

Authored by Goutte
1 parent 326b749d

Make the animation queue feel more natural, and mention UTC in the page embedded doc.

CHANGELOG.md
... ... @@ -28,14 +28,12 @@ et prendre aussi
28 28  
29 29 ## Future ?
30 30  
31   -- [ ] Enable p67
32 31 - [ ] Layer : Auroral Emissions
33 32 - [ ] Set the log level to _error_ in production (see `web/run.py`)
34 33 - [ ] Add a README to the download tarball (no tarball anymore)
35   -- [ ] Rework the images of Rosetta and Juno
  34 +- [ ] Rework the icons of Rosetta and Juno
36 35 - [ ] Optimize data aggregation (numpy vectorization?)
37 36 - [ ] IE compat, if you can (I can't)
38   -- [ ] Make date format in time series configurable to DayOfYear
39 37  
40 38  
41 39 ## 1.6
... ... @@ -46,6 +44,7 @@ et prendre aussi
46 44 - [x] Rewrite everything using ES6 instead of Livescript
47 45 - [x] Force domain re-sizing of time series to be sequential
48 46 - [x] Fix broken, confusing ticks on time series
  47 +- [x] Make date format in time series saner
49 48  
50 49  
51 50 ## 1.5
... ...
web/static/js/main.js
... ... @@ -438,10 +438,10 @@
438 438 }).bind(ts);
439 439  
440 440 ts.options['onDblClick'] = () => {
441   - let ref$;
442   - app.resetZoom();
443   - if ((ref$ = $("#zoom_controls_help")) != null) {
444   - ref$.remove();
  441 + app.resetZoom(ts);
  442 + let zoom_controls_help = $("#zoom_controls_help");
  443 + if (zoom_controls_help) {
  444 + zoom_controls_help.remove();
445 445 }
446 446 return true;
447 447 };
... ... @@ -517,7 +517,6 @@
517 517 let max_stopped_at;
518 518 let formatted_started_at;
519 519 let formatted_stopped_at;
520   - let zoomedOnVisible;
521 520 if (stopped_at < started_at) {
522 521 let tmp_at = started_at;
523 522 started_at = stopped_at;
... ... @@ -542,16 +541,14 @@
542 541 let tsv_length = tsv.length;
543 542 let starting_ts_key = tsv.indexOf(starting_ts);
544 543 if (starting_ts_key === -1) starting_ts_key = 0;
545   - zoomedOnVisible = new Promise((resolve, reject) => {
546   - console.log("Zoom on invisible time series…");
547   - let tsv_zoom_on_next;
548   - tsv_zoom_on_next = i => {
  544 + const zoomedOnVisible = new Promise((resolve, reject) => {
  545 + console.log("Zoom on visible time series…");
  546 + const tsv_zoom_on_next = i => {
549 547 if (i >= tsv_length) {
550 548 resolve();
551 549 return;
552 550 }
553   - let ts;
554   - ts = tsv[(i+starting_ts_key)%tsv_length];
  551 + let ts = tsv[(Math.ceil(i/2)*(i%2>0?1:-1)+starting_ts_key+tsv_length)%tsv_length];
555 552 ts.zoomIn(started_at, stopped_at)
556 553 .then(() => tsv_zoom_on_next(i + 1));
557 554 };
... ... @@ -575,8 +572,8 @@
575 572 return this;
576 573 }
577 574  
578   - resetZoom() {
579   - this.resizeDomain(this.started_at, this.stopped_at);
  575 + resetZoom(starting_ts) {
  576 + this.resizeDomain(this.started_at, this.stopped_at, starting_ts);
580 577 return this;
581 578 }
582 579  
... ...
web/view/home.html.jinja2
... ... @@ -69,10 +69,10 @@
69 69  
70 70 <form id="form_time_interval" action="#">
71 71 <div class="mdl-textfield mdl-js-textfield">
72   - <input type="date" id="started_at" name="started_at" title="The date of the beginning of the interval to observe." class="mdl-textfield__input">
73   - <input type="date" id="stopped_at" name="stopped_at" title="The date of the end of the interval to observe. (exclusive)" class="mdl-textfield__input">
  72 + <input type="date" id="started_at" name="started_at" title="The UTC date of the beginning of the interval to observe." class="mdl-textfield__input">
  73 + <input type="date" id="stopped_at" name="stopped_at" title="The UTC date of the end of the interval to observe. (exclusive)" class="mdl-textfield__input">
74 74 </div>
75   - <input type="submit" id="apply_new_interval" value="Load new interval" title="Two years maximum. This may take a while." class="mdl-button mdl-js-button mdl-js-ripple-effect">
  75 + <input type="submit" id="apply_new_interval" value="Load new interval" title="Two years maximum. This may take a while. UTC." class="mdl-button mdl-js-button mdl-js-ripple-effect">
76 76 </form>
77 77 </details>
78 78  
... ...