From c4983585fb24a17878523027cbb3b6361ffd014a Mon Sep 17 00:00:00 2001 From: Goutte Date: Wed, 11 Apr 2018 12:16:05 +0200 Subject: [PATCH] Hide the layers by default. --- web/static/js/swapp.js | 1 + web/static/js/swapp.ls | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/static/js/swapp.js b/web/static/js/swapp.js index 2251788..bcddf99 100644 --- a/web/static/js/swapp.js +++ b/web/static/js/swapp.js @@ -743,6 +743,7 @@ stopped_at = moment(layer.stop); this.layers_rects[catalog_slug].push(this.createCatalogLayer(started_at, stopped_at)); } + this.hideCatalogLayer(catalog_slug); } return this; }; diff --git a/web/static/js/swapp.ls b/web/static/js/swapp.ls index 81a651c..2347c43 100644 --- a/web/static/js/swapp.ls +++ b/web/static/js/swapp.ls @@ -641,14 +641,14 @@ export class TimeSeries if @visible console.debug("Applying zoom to visible #{@}…") t = @svg.transition().duration(750) - @svg.select('.x.axis').transition(t).call(@xAxis); - @svg.select('.y.axis').transition(t).call(@yAxis); + @svg.select('.x.axis').transition(t).call(@xAxis) + @svg.select('.y.axis').transition(t).call(@yAxis) @path.transition(t).attr('d', @line) @predictiveDataPath.transition(t).attr('d', @line) else console.debug("Applying zoom to hidden #{@}…") - @svg.select('.x.axis').call(@xAxis); - @svg.select('.y.axis').call(@yAxis); + @svg.select('.x.axis').call(@xAxis) + @svg.select('.y.axis').call(@yAxis) @path.attr('d', @line) @predictiveDataPath.attr('d', @line) @resizeCatalogLayers() @@ -667,6 +667,7 @@ export class TimeSeries @layers_rects[catalog_slug].push( @createCatalogLayer(started_at, stopped_at) ) + @hideCatalogLayer(catalog_slug) this createCatalogLayer: (started_at, stopped_at) -> -- libgit2 0.21.2