Commit dabb9d5f5f985ef662936f3551835be44a9a4996
1 parent
36fb9368
Exists in
master
and in
2 other branches
Fix the layers' clipping.
Showing
4 changed files
with
12 additions
and
4 deletions
Show diff stats
CHANGELOG.md
@@ -40,6 +40,12 @@ et prendre aussi | @@ -40,6 +40,12 @@ et prendre aussi | ||
40 | - [ ] Layer : Auroral Emissions | 40 | - [ ] Layer : Auroral Emissions |
41 | 41 | ||
42 | 42 | ||
43 | +## 1.3.1 | ||
44 | + | ||
45 | +- [x] Disable Earth again | ||
46 | +- [x] Fix the layers being shown outside the clipping area in the time series | ||
47 | + | ||
48 | + | ||
43 | ## 1.3 | 49 | ## 1.3 |
44 | 50 | ||
45 | - [x] Earth pdyn = pv² (TBD) | 51 | - [x] Earth pdyn = pv² (TBD) |
web/run.py
@@ -22,6 +22,7 @@ from jinja2 import Environment, FileSystemLoader, Markup | @@ -22,6 +22,7 @@ from jinja2 import Environment, FileSystemLoader, Markup | ||
22 | from netCDF4 import Dataset, date2num | 22 | from netCDF4 import Dataset, date2num |
23 | from yaml import load as yaml_load | 23 | from yaml import load as yaml_load |
24 | 24 | ||
25 | + | ||
25 | # PATH RELATIVITY ############################################################# | 26 | # PATH RELATIVITY ############################################################# |
26 | 27 | ||
27 | THIS_DIRECTORY = dirname(abspath(__file__)) | 28 | THIS_DIRECTORY = dirname(abspath(__file__)) |
web/static/js/swapp.js
@@ -559,11 +559,11 @@ | @@ -559,11 +559,11 @@ | ||
559 | this.plotWrapper.attr('transform', 'translate(' + this.margin.left + ',' + this.margin.top + ')'); | 559 | this.plotWrapper.attr('transform', 'translate(' + this.margin.left + ',' + this.margin.top + ')'); |
560 | clipId = "ts-clip-" + this.parameter + "-" + this.target.slug; | 560 | clipId = "ts-clip-" + this.parameter + "-" + this.target.slug; |
561 | this.clip = this.svg.append("defs").append("svg:clipPath").attr("id", clipId).append("svg:rect").attr("x", 0).attr("y", 0); | 561 | this.clip = this.svg.append("defs").append("svg:clipPath").attr("id", clipId).append("svg:rect").attr("x", 0).attr("y", 0); |
562 | - this.createCatalogLayers(); | ||
563 | this.pathWrapper = this.plotWrapper.append('g'); | 562 | this.pathWrapper = this.plotWrapper.append('g'); |
564 | this.pathWrapper.attr("clip-path", "url(#" + clipId + ")"); | 563 | this.pathWrapper.attr("clip-path", "url(#" + clipId + ")"); |
565 | this.path = this.pathWrapper.append('path').datum(this.data).classed('line', true); | 564 | this.path = this.pathWrapper.append('path').datum(this.data).classed('line', true); |
566 | this.predictiveDataPath = this.pathWrapper.append('path').datum(this.predictiveData).classed('predictive-line', true); | 565 | this.predictiveDataPath = this.pathWrapper.append('path').datum(this.predictiveData).classed('predictive-line', true); |
566 | + this.createCatalogLayers(); | ||
567 | this.horizontalLines = []; | 567 | this.horizontalLines = []; |
568 | if (this.options['horizontalLines']) { | 568 | if (this.options['horizontalLines']) { |
569 | for (i$ = 0, len$ = (ref$ = this.options['horizontalLines']).length; i$ < len$; ++i$) { | 569 | for (i$ = 0, len$ = (ref$ = this.options['horizontalLines']).length; i$ < len$; ++i$) { |
@@ -749,7 +749,7 @@ | @@ -749,7 +749,7 @@ | ||
749 | }; | 749 | }; |
750 | TimeSeries.prototype.createCatalogLayer = function(started_at, stopped_at){ | 750 | TimeSeries.prototype.createCatalogLayer = function(started_at, stopped_at){ |
751 | var layer_rect; | 751 | var layer_rect; |
752 | - layer_rect = this.plotWrapper.append("rect").attr('y', 0).attr('height', this.plotHeight).attr('fill', '#FFFD64C2'); | 752 | + layer_rect = this.pathWrapper.append("rect").attr('y', 0).attr('height', this.plotHeight).attr('fill', '#FFFD64C2'); |
753 | return layer_rect; | 753 | return layer_rect; |
754 | }; | 754 | }; |
755 | TimeSeries.prototype.resizeCatalogLayers = function(){ | 755 | TimeSeries.prototype.resizeCatalogLayers = function(){ |
web/static/js/swapp.ls
@@ -446,7 +446,6 @@ export class TimeSeries | @@ -446,7 +446,6 @@ export class TimeSeries | ||
446 | .attr("x", 0) | 446 | .attr("x", 0) |
447 | .attr("y", 0) | 447 | .attr("y", 0) |
448 | 448 | ||
449 | - @createCatalogLayers() | ||
450 | 449 | ||
451 | @pathWrapper = @plotWrapper.append('g') | 450 | @pathWrapper = @plotWrapper.append('g') |
452 | @pathWrapper.attr("clip-path", "url(\##{clipId})") | 451 | @pathWrapper.attr("clip-path", "url(\##{clipId})") |
@@ -457,6 +456,8 @@ export class TimeSeries | @@ -457,6 +456,8 @@ export class TimeSeries | ||
457 | .datum(@predictiveData) | 456 | .datum(@predictiveData) |
458 | .classed('predictive-line', true) | 457 | .classed('predictive-line', true) |
459 | 458 | ||
459 | + @createCatalogLayers() | ||
460 | + | ||
460 | @horizontalLines = [] | 461 | @horizontalLines = [] |
461 | if @options['horizontalLines'] | 462 | if @options['horizontalLines'] |
462 | for line in @options['horizontalLines'] | 463 | for line in @options['horizontalLines'] |
@@ -671,7 +672,7 @@ export class TimeSeries | @@ -671,7 +672,7 @@ export class TimeSeries | ||
671 | this | 672 | this |
672 | 673 | ||
673 | createCatalogLayer: (started_at, stopped_at) -> | 674 | createCatalogLayer: (started_at, stopped_at) -> |
674 | - layer_rect = @plotWrapper.append("rect") | 675 | + layer_rect = @pathWrapper.append("rect") |
675 | .attr('y', 0) | 676 | .attr('y', 0) |
676 | .attr('height', @plotHeight) | 677 | .attr('height', @plotHeight) |
677 | .attr('fill', '#FFFD64C2') | 678 | .attr('fill', '#FFFD64C2') |