Commit 862ea9f6 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

uncertainty is not optional to show

parent d3f7288b
...@@ -988,6 +988,9 @@ var STWkit; ...@@ -988,6 +988,9 @@ var STWkit;
if ((_this.forcing.features.length > 0) && (_this.forcing.features[0].properties)) if ((_this.forcing.features.length > 0) && (_this.forcing.features[0].properties))
_this.forcingmodel = _this.forcing.features[0].properties.model; _this.forcingmodel = _this.forcing.features[0].properties.model;
} }
_this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined")
_this.showuncertainty = options.uncertainty;
_this.cardMap = {}; _this.cardMap = {};
return _this; return _this;
} }
...@@ -1068,6 +1071,8 @@ var STWkit; ...@@ -1068,6 +1071,8 @@ var STWkit;
self.uncertaintyInput = L.DomUtil.create('input', '', uncertaintyLabel); self.uncertaintyInput = L.DomUtil.create('input', '', uncertaintyLabel);
self.uncertaintyInput.type = 'checkbox'; self.uncertaintyInput.type = 'checkbox';
uncertaintyLabel.appendChild(document.createTextNode(' Extra uncertainty in weather forecast is added to simulation')); uncertaintyLabel.appendChild(document.createTextNode(' Extra uncertainty in weather forecast is added to simulation'));
if (!this.showuncertainty)
uncertaintyRowDiv.style.display = 'none';
var hr = L.DomUtil.create('hr', 'uk-margin-top', self.startDiv); var hr = L.DomUtil.create('hr', 'uk-margin-top', self.startDiv);
self.startButton = L.DomUtil.create('button', 'uk-button uk-button-success uk-margin-top uk-align-center', self.startDiv); self.startButton = L.DomUtil.create('button', 'uk-button uk-button-success uk-margin-top uk-align-center', self.startDiv);
self.startButton.textContent = 'Start model'; self.startButton.textContent = 'Start model';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1077,6 +1077,7 @@ module STWkit { ...@@ -1077,6 +1077,7 @@ module STWkit {
private subtype: string; private subtype: string;
private name: string; private name: string;
private initials: string; private initials: string;
private showuncertainty: boolean;
constructor(options) { constructor(options) {
super(options); super(options);
...@@ -1097,7 +1098,11 @@ module STWkit { ...@@ -1097,7 +1098,11 @@ module STWkit {
this.forcing = options.forcing; this.forcing = options.forcing;
if ((this.forcing.features.length > 0) && (this.forcing.features[0].properties)) if ((this.forcing.features.length > 0) && (this.forcing.features[0].properties))
this.forcingmodel = this.forcing.features[0].properties.model; this.forcingmodel = this.forcing.features[0].properties.model;
} }
this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined") this.showuncertainty = options.uncertainty;
this.cardMap = {}; this.cardMap = {};
} }
...@@ -1182,6 +1187,7 @@ module STWkit { ...@@ -1182,6 +1187,7 @@ module STWkit {
self.uncertaintyInput = <HTMLInputElement>L.DomUtil.create('input', '', uncertaintyLabel); self.uncertaintyInput = <HTMLInputElement>L.DomUtil.create('input', '', uncertaintyLabel);
self.uncertaintyInput.type = 'checkbox'; self.uncertaintyInput.type = 'checkbox';
uncertaintyLabel.appendChild(document.createTextNode(' Extra uncertainty in weather forecast is added to simulation')); uncertaintyLabel.appendChild(document.createTextNode(' Extra uncertainty in weather forecast is added to simulation'));
if (!this.showuncertainty) uncertaintyRowDiv.style.display = 'none';
var hr = <HTMLDivElement>L.DomUtil.create('hr', 'uk-margin-top', self.startDiv); var hr = <HTMLDivElement>L.DomUtil.create('hr', 'uk-margin-top', self.startDiv);
self.startButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-success uk-margin-top uk-align-center', self.startDiv); self.startButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-success uk-margin-top uk-align-center', self.startDiv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment