Commit d69c23f3 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

fixed bug with setting forcingmodel

parent b10a4387
......@@ -134,16 +134,16 @@
"coordinates": coordinatesLangData
};
var forcing = {
"model": "NEMO",
var forcingconfig = {
"model": "GETM",
"configuration": "NORDIC",
"domain": "NS02"
"domain": "HELCOM"
};
var domainname = "HELCOM";
reqwest({
url: "forcing/config"+STWkit.jsonToQueryString(forcing),
url: "forcing/config"+STWkit.jsonToQueryString(forcingconfig),
method: 'get',
type: 'json',
success: function (forcing) {
......@@ -151,6 +151,7 @@
"domain" : domainname,
"lang": language,
"langdata": langData,
"forcingmodel": forcingconfig.model,
calculationmode: true,
uncertainty: true
};
......
......@@ -998,6 +998,10 @@ var STWkit;
if (options.domain) {
_this.domain = options.domain;
}
_this.forcingmodel = "NEMO";
if (options.forcingmodel) {
_this.forcingmodel = options.forcingmodel;
}
_this.lang = "en";
if (options.lang) {
_this.lang = options.lang;
......@@ -1005,11 +1009,8 @@ var STWkit;
if (options.langdata) {
_this.langData = options.langdata;
}
_this.forcingmodel = "NEMO";
if (options.forcing) {
_this.forcing = options.forcing;
if ((_this.forcing.features.length > 0) && (_this.forcing.features[0].properties))
_this.forcingmodel = _this.forcing.features[0].properties.model;
}
_this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1113,6 +1113,10 @@ module STWkit {
if (options.domain) {
this.domain = options.domain;
}
this.forcingmodel = "NEMO";
if (options.forcingmodel) {
this.forcingmodel = options.forcingmodel;
}
this.lang = "en";
if (options.lang) {
this.lang = options.lang;
......@@ -1121,11 +1125,8 @@ module STWkit {
this.langData = options.langdata;
}
this.forcingmodel = "NEMO";
if (options.forcing) {
this.forcing = options.forcing;
if ((this.forcing.features.length > 0) && (this.forcing.features[0].properties))
this.forcingmodel = this.forcing.features[0].properties.model;
}
this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined") this.showuncertainty = options.uncertainty;
......
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