Commit 420e3a80 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

missed grunt

parent cce6834e
......@@ -19,12 +19,12 @@ var OSLocation = (function (_super) {
var _this = this;
var options = {};
options['single'] = true;
options['line'] = true;
options['line'] = false;
options.polygon = {};
options['polygon']['show'] = true;
options['polygon']['name'] = 'Area';
options['polygon']['show'] = false;
options['type'] = type;
options['initials'] = initials;
options['outlettype'] = false;
_this = _super.call(this, id, 'Specify time and location', parentDiv, lang, langData, map, forcing, options) || this;
var self = _this;
var fieldset = L.DomUtil.create('fieldset', 'uk-margin-top');
......@@ -49,6 +49,7 @@ var OSLocation = (function (_super) {
self.depthInput = L.DomUtil.create('input', 'uk-width-1-4', depthDiv);
self.depthInput.type = 'number';
self.depthInput.value = '0';
self.depthInput.step = '10';
self.depthInput.min = '0';
self.depthInput.onchange = function () {
self.validate();
......@@ -84,6 +85,7 @@ var OSLocation = (function (_super) {
self.obsDateInput.value = date;
var time = moment.utc(observation.date).format(self.timeFormat);
self.obsTimeInput.value = time;
self.depthInput.value = simulation.depth;
};
OSLocation.prototype.populateData = function (geojson) {
_super.prototype.populateData.call(this, geojson);
......@@ -99,6 +101,15 @@ var OSLocation = (function (_super) {
};
geojson.features[0].properties["observation"] = [];
geojson.features[0].properties["observation"].push(observation);
geojson.features[0].properties["simulation"]["depth"] = self.depthInput.value;
};
OSLocation.prototype.clear = function () {
var self = this;
_super.prototype.clear.call(this);
self.depthInput.value = '0';
STWkit.AccordionCard.enableNext(self.nextButton, false);
self.status = false;
(self.oncallback && self.oncallback());
};
return OSLocation;
}(STWkit.LocationCard));
......@@ -301,6 +312,7 @@ var L;
var oiltypeoptions = {};
oiltypeoptions['type'] = this.type;
oiltypeoptions['initials'] = this.initials;
oiltypeoptions['stateofoil'] = false;
var oiltypeid = self.initials + 'typeCard';
self.cardMap[oiltypeid] = new STWkit.OilTypeCard(oiltypeid, 'Type of oil', this.accordionDiv, self.lang, map, oiltypeoptions);
this.cardMap[periodid].addChangeFnListener(this.cardMap[oiltypeid]);
......
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