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

example

parent e8714023
......@@ -10,5 +10,6 @@ declare namespace STWkit{
export var getParamValue: any;
export var LocationCard: any;
export var PeriodCard: any;
export var AccordionCard: any;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -39,21 +39,21 @@ var L;
self.cardMap[locationid].show();
var periodid = self.initials + 'periodCard';
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel);
var amountid = self.initials + 'amountCard';
self.cardMap[amountid] = new ITAmount(amountid, 'Amount', this.accordionDiv, self.lang, map);
var distributionid = self.initials + 'distributionCard';
self.cardMap[distributionid] = new ITDistribution(distributionid, 'Distribution and spreading', this.accordionDiv, self.lang, map);
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
chain[periodid] = amountid;
chain[amountid] = '';
chain[periodid] = distributionid;
chain[distributionid] = '';
self.cardMap[locationid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, locationid, gonext);
};
self.cardMap[periodid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, periodid, gonext);
};
self.cardMap[amountid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, amountid, gonext);
self.cardMap[distributionid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, distributionid, gonext);
};
};
InstantTracer.prototype.ready = function (name) {
......
{"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,CAmEP;AAnED,WAAO,CAAC;IAAC,IAAA,OAAO,CAmEf;IAnEQ,WAAA,OAAO;QACZ;YAAmC,iCAAkB;YAejD,uBAAY,OAAO;gBAAnB,YACI,k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G,UAAC,MAAM;oBAC7C,iBAAM,QAAQ,aAAC,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;gBAClD,CAAC,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,AAjED,CAAmC,MAAM,CAAC,WAAW,GAiEpD;QAjEY,qBAAa,gBAiEzB,CAAA;IACL,CAAC,EAnEQ,OAAO,GAAP,SAAO,KAAP,SAAO,QAmEf;AAAD,CAAC,EAnEM,CAAC,KAAD,CAAC,QAmEP"}
\ No newline at end of file
......@@ -42,21 +42,21 @@ module L.Control {
self.cardMap[locationid].show();
var periodid = self.initials+'periodCard';
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel);
var amountid = self.initials+'amountCard';
self.cardMap[amountid] = new ITAmount(amountid, 'Amount', this.accordionDiv, self.lang, map);
var distributionid = self.initials+'distributionCard';
self.cardMap[distributionid] = new ITDistribution(distributionid, 'Distribution and spreading', this.accordionDiv, self.lang, map);
super.setup(map);
var chain = [];
chain[locationid] = periodid;
chain[periodid] = amountid;
chain[amountid] = '';
chain[periodid] = distributionid;
chain[distributionid] = '';
self.cardMap[locationid].oncallback = (gonext) => {
super.callback(chain, locationid, gonext);
};
self.cardMap[periodid].oncallback = (gonext) => {
super.callback(chain, periodid, gonext);
};
self.cardMap[amountid].oncallback = (gonext) => {
super.callback(chain, amountid, gonext);
self.cardMap[distributionid].oncallback = (gonext) => {
super.callback(chain, distributionid, gonext);
};
}
......
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