Commit 77140a5a authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

removed changefn, made 3D spread default

parent 5334ab74
......@@ -260,18 +260,19 @@ var ITSpreading = (function (_super) {
}
ITSpreading.prototype.defaults = function () {
var self = this;
self.spreading3DButton.click();
};
ITSpreading.prototype.changeFn = function (changeCard) {
var self = this;
if (typeof changeCard.isVolume !== 'undefined') {
self.isVolume = changeCard.isVolume;
self.spreading2DButton.disabled = false;
self.spreading2DButton.click();
if (self.isVolume) {
self.spreading2DButton.disabled = true;
self.spreading3DButton.click();
}
}
// if (typeof changeCard.isVolume !== 'undefined') {
// self.isVolume = changeCard.isVolume;
// self.spreading2DButton.disabled = false;
// self.spreading2DButton.click();
// if (self.isVolume) {
// self.spreading2DButton.disabled = true;
// self.spreading3DButton.click();
// }
// }
};
ITSpreading.prototype.populateCard = function (geojson) {
var self = this;
......@@ -354,7 +355,7 @@ var L;
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel, periodoptions);
var spreadingid = self.initials + 'distributionCard';
self.cardMap[spreadingid] = new ITSpreading(spreadingid, 'Spreading', this.accordionDiv, self.lang, map, self.type, self.initials);
self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
// self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
......
......@@ -260,18 +260,19 @@ var ITSpreading = (function (_super) {
}
ITSpreading.prototype.defaults = function () {
var self = this;
self.spreading3DButton.click();
};
ITSpreading.prototype.changeFn = function (changeCard) {
var self = this;
if (typeof changeCard.isVolume !== 'undefined') {
self.isVolume = changeCard.isVolume;
self.spreading2DButton.disabled = false;
self.spreading2DButton.click();
if (self.isVolume) {
self.spreading2DButton.disabled = true;
self.spreading3DButton.click();
}
}
// if (typeof changeCard.isVolume !== 'undefined') {
// self.isVolume = changeCard.isVolume;
// self.spreading2DButton.disabled = false;
// self.spreading2DButton.click();
// if (self.isVolume) {
// self.spreading2DButton.disabled = true;
// self.spreading3DButton.click();
// }
// }
};
ITSpreading.prototype.populateCard = function (geojson) {
var self = this;
......
This diff is collapsed.
......@@ -302,20 +302,21 @@ class ITSpreading extends STWkit.AccordionCard {
public defaults() {
var self = this;
self.spreading3DButton.click();
}
public changeFn(changeCard) {
var self = this;
if (typeof changeCard.isVolume !== 'undefined') {
self.isVolume = changeCard.isVolume;
self.spreading2DButton.disabled = false;
self.spreading2DButton.click();
if (self.isVolume) {
self.spreading2DButton.disabled = true;
self.spreading3DButton.click();
}
}
// if (typeof changeCard.isVolume !== 'undefined') {
// self.isVolume = changeCard.isVolume;
// self.spreading2DButton.disabled = false;
// self.spreading2DButton.click();
// if (self.isVolume) {
// self.spreading2DButton.disabled = true;
// self.spreading3DButton.click();
// }
// }
}
public populateCard(geojson) {
......
......@@ -44,7 +44,7 @@ var L;
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel, periodoptions);
var spreadingid = self.initials + 'distributionCard';
self.cardMap[spreadingid] = new ITSpreading(spreadingid, 'Spreading', this.accordionDiv, self.lang, map, self.type, self.initials);
self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
// self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
......
{"version":3,"file":"leaflet-itracer-control.js","sourceRoot":"","sources":["leaflet-itracer-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,iDAAiD;;;;;;;;;;;AAIjD,IAAO,CAAC,CAuEP;AAvED,WAAO,CAAC;IAAC,IAAA,OAAO,CAuEf;IAvEQ,WAAA,OAAO;QACZ;YAAmC,iCAAkB;YAejD,uBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,S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AAC,CAAC;YAEN,CAAC;YAEM,6BAAK,GAAZ,UAAa,IAAI;gBACb,iBAAM,KAAK,YAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YAEO,6BAAK,GAAb;gBACI,iBAAM,KAAK,WAAE,CAAC;YAClB,CAAC;YACO,4BAAI,GAAZ;YACA,CAAC;YACO,4BAAI,GAAZ;gBACI,IAAI,CAAC,KAAK,EAAE,CAAC;YACjB,CAAC;YAEL,oBAAC;QAAD,CAAC,AArED,CAAmC,MAAM,CAAC,WAAW,GAqEpD;QArEY,qBAAa,gBAqEzB,CAAA;IACL,CAAC,EAvEQ,OAAO,GAAP,SAAO,KAAP,SAAO,QAuEf;AAAD,CAAC,EAvEM,CAAC,KAAD,CAAC,QAuEP"}
\ No newline at end of file
{"version":3,"file":"leaflet-itracer-control.js","sourceRoot":"","sources":["leaflet-itracer-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,iDAAiD;;;;;;;;;;;AAIjD,IAAO,CAAC,CAuEP;AAvED,WAAO,CAAC;IAAC,IAAA,OAAO,CAuEf;IAvEQ,WAAA,OAAO;QACZ;YAAmC,iCAAkB;YAejD,uBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,SAMjB;gBALG,KAAI,CAAC,IAAI,GAAG,OAAO,CAAC;gBACpB,KAAI,CAAC,OAAO,GAAG,SAAS,CAAC;gBACzB,KAAI,CAAC,IAAI,GAAG,SAAS,CAAC;gBACtB,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;;YAEzB,CAAC;YAEO,6BAAK,GAAb,UAAc,GAAG;gBAAjB,iBA8BC;gBA7BG,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,GAAC,UAAU,CAAC,CAAC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@@ module L.Control {
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel, periodoptions);
var spreadingid = self.initials+'distributionCard';
self.cardMap[spreadingid] = new ITSpreading(spreadingid, 'Spreading', this.accordionDiv, self.lang, map, self.type, self.initials);
self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
// self.cardMap[locationid].addChangeFnListener(self.cardMap[spreadingid]);
super.setup(map);
var chain = [];
chain[locationid] = periodid;
......
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