Commit 8b4aae10 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

added guide position support

parent 992c577e
......@@ -153,6 +153,7 @@
var domainname = "HELCOM";
reqwest({
url: "forcing/config" + STWkit.jsonToQueryString(forcing),
method: 'get',
......
......@@ -15,13 +15,14 @@ var __extends = (this && this.__extends) || (function () {
})();
var OSLocation = (function (_super) {
__extends(OSLocation, _super);
function OSLocation(id, parentDiv, lang, langData, map, forcing, obs, domain, type, subtype, initials) {
function OSLocation(id, parentDiv, lang, langData, map, forcing, obs, domain, guide, type, subtype, initials) {
var _this = this;
var options = {};
options['single'] = true;
options['line'] = false;
options.polygon = {};
options['polygon']['show'] = false;
options['guide'] = guide;
options['type'] = type;
options['subtype'] = subtype;
options['initials'] = initials;
......
This diff is collapsed.
......@@ -13,12 +13,13 @@ class OSLocation extends STWkit.LocationCard {
public obsTimeInput: HTMLInputElement;
public depthInput: HTMLInputElement;
constructor(id, parentDiv, lang, langData, map, forcing, obs, domain, type, subtype, initials) {
constructor(id, parentDiv, lang, langData, map, forcing, obs, domain, guide, type, subtype, initials) {
var options:any = {};
options['single'] = true;
options['line'] = false;
options.polygon = {};
options['polygon']['show'] = false;
options['guide'] = guide;
options['type'] = type;
options['subtype'] = subtype;
options['initials'] = initials;
......
......@@ -27,6 +27,9 @@ var L;
_this.subtype = 'timevarying';
_this.name = 'oilspill';
_this.initials = 'os';
if (options.guide) {
_this.guide = options.guide;
}
return _this;
}
OilSpill.prototype.setup = function (map) {
......@@ -35,7 +38,7 @@ var L;
this.container = L.DomUtil.create('div', self.name + '-control');
this.accordionDiv = L.DomUtil.create('div', 'uk-accordion', this.container);
var locationid = self.initials + 'locationCard';
self.cardMap[locationid] = new OSLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.domain, self.type, self.subtype, self.initials);
self.cardMap[locationid] = new OSLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.domain, self.guide, self.type, self.subtype, self.initials);
self.cardMap[locationid].show();
var periodid = self.initials + 'periodCard';
var periodoptions = {};
......
{"version":3,"file":"leaflet-oilspill-control.js","sourceRoot":"","sources":["leaflet-oilspill-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,kDAAkD;;;;;;;;;;;AAElD,IAAO,CAAC,CAqFP;AArFD,WAAO,CAAC;IAAC,IAAA,OAAO,CAqFf;IArFQ,WAAA,OAAO;QACZ;YAA8B,4BAAkB;YAe5C,kBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,SAKjB;gBAJG,KAAI,CAAC,IAAI,GAAG,KAAK,CAAC;gBAClB,KAAI,CAAC,OAAO,GAAG,aAAa,CAAC;gBAC7B,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;;YACzB,CAAC;YAEO,wBAAK,GAAb,UAAc,GAAG;gBAAjB,iBA8CC;gBA7CG,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;gBAC/D,IAAI,CAAC,YAAY,GAAmB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC5F,IAAI,UAAU,GAAG,IAAI,CAAC,QAAQ,GAAC,cAAc,CAAC;gBAC9C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,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K,YAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YAEO,wBAAK,GAAb;gBACI,iBAAM,KAAK,WAAE,CAAC;YAClB,CAAC;YACO,uBAAI,GAAZ;YACA,CAAC;YACO,uBAAI,GAAZ;YACA,CAAC;YAEL,eAAC;QAAD,CAAC,AAxFD,CAA8B,MAAM,CAAC,WAAW,GAwF/C;QAxFY,gBAAQ,WAwFpB,CAAA;IACL,CAAC,EA1FQ,OAAO,GAAP,SAAO,KAAP,SAAO,QA0Ff;AAAD,CAAC,EA1FM,CAAC,KAAD,CAAC,QA0FP"}
\ No newline at end of file
......@@ -16,7 +16,8 @@ module L.Control {
private lang: string;
private langData: any;
private cardMap: any;
private domain: string;
private domain: string;
private guide: any;
private type: string;
private subtype: string;
private name: string;
......@@ -27,7 +28,11 @@ module L.Control {
this.type = 'oil';
this.subtype = 'timevarying';
this.name = 'oilspill';
this.initials = 'os';
this.initials = 'os';
if (options.guide) {
this.guide = options.guide;
}
}
private setup(map) {
......@@ -35,7 +40,7 @@ module L.Control {
this.container = L.DomUtil.create('div', self.name+'-control');
this.accordionDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-accordion', this.container);
var locationid = self.initials+'locationCard';
self.cardMap[locationid] = new OSLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.domain, self.type, self.subtype, self.initials);
self.cardMap[locationid] = new OSLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.domain, self.guide,self.type, self.subtype, self.initials);
self.cardMap[locationid].show();
var periodid = self.initials+'periodCard';
var periodoptions = {};
......
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