Commit c4983585fb24a17878523027cbb3b6361ffd014a

Authored by Goutte
1 parent 2c8f64ea

Hide the layers by default.

Showing 2 changed files with 6 additions and 4 deletions   Show diff stats
web/static/js/swapp.js
... ... @@ -743,6 +743,7 @@
743 743 stopped_at = moment(layer.stop);
744 744 this.layers_rects[catalog_slug].push(this.createCatalogLayer(started_at, stopped_at));
745 745 }
  746 + this.hideCatalogLayer(catalog_slug);
746 747 }
747 748 return this;
748 749 };
... ...
web/static/js/swapp.ls
... ... @@ -641,14 +641,14 @@ export class TimeSeries
641 641 if @visible
642 642 console.debug("Applying zoom to visible #{@}…")
643 643 t = @svg.transition().duration(750)
644   - @svg.select('.x.axis').transition(t).call(@xAxis);
645   - @svg.select('.y.axis').transition(t).call(@yAxis);
  644 + @svg.select('.x.axis').transition(t).call(@xAxis)
  645 + @svg.select('.y.axis').transition(t).call(@yAxis)
646 646 @path.transition(t).attr('d', @line)
647 647 @predictiveDataPath.transition(t).attr('d', @line)
648 648 else
649 649 console.debug("Applying zoom to hidden #{@}…")
650   - @svg.select('.x.axis').call(@xAxis);
651   - @svg.select('.y.axis').call(@yAxis);
  650 + @svg.select('.x.axis').call(@xAxis)
  651 + @svg.select('.y.axis').call(@yAxis)
652 652 @path.attr('d', @line)
653 653 @predictiveDataPath.attr('d', @line)
654 654 @resizeCatalogLayers()
... ... @@ -667,6 +667,7 @@ export class TimeSeries
667 667 @layers_rects[catalog_slug].push(
668 668 @createCatalogLayer(started_at, stopped_at)
669 669 )
  670 + @hideCatalogLayer(catalog_slug)
670 671 this
671 672  
672 673 createCatalogLayer: (started_at, stopped_at) ->
... ...