Commit 375dcd95278c4caa358bc445a8f494fdab9a6224

Authored by Goutte
1 parent 5c3d94f4

Fix a small graphical glitch with the cursor of time series when zooming.

Showing 2 changed files with 4 additions and 2 deletions   Show diff stats
web/static/js/swapp.js
@@ -704,14 +704,15 @@ @@ -704,14 +704,15 @@
704 this.svg.select('.x.axis').transition(t).call(this.xAxis); 704 this.svg.select('.x.axis').transition(t).call(this.xAxis);
705 this.svg.select('.y.axis').transition(t).call(this.yAxis); 705 this.svg.select('.y.axis').transition(t).call(this.yAxis);
706 this.path.transition(t).attr('d', this.line); 706 this.path.transition(t).attr('d', this.line);
707 - return this.predictiveDataPath.transition(t).attr('d', this.line); 707 + this.predictiveDataPath.transition(t).attr('d', this.line);
708 } else { 708 } else {
709 console.debug("Applying zoom to hidden " + this + "…"); 709 console.debug("Applying zoom to hidden " + this + "…");
710 this.svg.select('.x.axis').call(this.xAxis); 710 this.svg.select('.x.axis').call(this.xAxis);
711 this.svg.select('.y.axis').call(this.yAxis); 711 this.svg.select('.y.axis').call(this.yAxis);
712 this.path.attr('d', this.line); 712 this.path.attr('d', this.line);
713 - return this.predictiveDataPath.attr('d', this.line); 713 + this.predictiveDataPath.attr('d', this.line);
714 } 714 }
  715 + return this.hideCursor();
715 }; 716 };
716 TimeSeries.prototype.showCursor = function(){ 717 TimeSeries.prototype.showCursor = function(){
717 return this.focus.style("display", null); 718 return this.focus.style("display", null);
web/static/js/swapp.ls
@@ -642,6 +642,7 @@ export class TimeSeries @@ -642,6 +642,7 @@ export class TimeSeries
642 @svg.select('.y.axis').call(@yAxis); 642 @svg.select('.y.axis').call(@yAxis);
643 @path.attr('d', @line) 643 @path.attr('d', @line)
644 @predictiveDataPath.attr('d', @line) 644 @predictiveDataPath.attr('d', @line)
  645 + @hideCursor()
645 646
646 showCursor: -> 647 showCursor: ->
647 @focus.style("display", null) 648 @focus.style("display", null)