Commit 57dc470f authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

trying things

parent 8756550e
......@@ -134,7 +134,7 @@
var forcing = false;
var obs = false;
var card = new LocationCard(cardid, accordionDiv, language, langData, map, forcing, obs);
var card = new STWkit.LocationCard(cardid, accordionDiv, language, langData, map, forcing, obs);
card.show();
L.DomEvent.disableClickPropagation(this.container);
......
......@@ -13,7 +13,9 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var AccordionCard = (function () {
var STWkit;
(function (STWkit) {
var AccordionCard = (function () {
function AccordionCard(id, label, parent, content) {
this.status = false;
var container = STWkit.DomUtil.create('div', 'accordion-card', parent);
......@@ -81,8 +83,8 @@ var AccordionCard = (function () {
return (this.title.style.display == 'block');
};
return AccordionCard;
}());
var LocationCard = (function (_super) {
}());
var LocationCard = (function (_super) {
__extends(LocationCard, _super);
function LocationCard(id, parentDiv, lang, langData, map, forcing, obs) {
var _this = this;
......@@ -455,8 +457,9 @@ var LocationCard = (function (_super) {
(self.oncallback && self.oncallback());
};
return LocationCard;
}(AccordionCard));
var CardControl = (function (_super) {
}(AccordionCard));
STWkit.LocationCard = LocationCard;
var CardControl = (function (_super) {
__extends(CardControl, _super);
function CardControl(options) {
var _this = _super.call(this, options) || this;
......@@ -533,5 +536,7 @@ var CardControl = (function (_super) {
}
};
return CardControl;
}(L.Control));
}(L.Control));
STWkit.CardControl = CardControl;
})(STWkit || (STWkit = {}));
//# sourceMappingURL=cards.js.map
\ No newline at end of file
This diff is collapsed.
......@@ -4,7 +4,8 @@
/// <reference path="../def/leaflet-forcing-boundary.d.ts" />
/// <reference path="../def/moment.d.ts" />
class AccordionCard {
module STWkit {
class AccordionCard {
private content: any;
public status: boolean;
public title: HTMLDivElement;
......@@ -88,10 +89,9 @@ class AccordionCard {
return (this.title.style.display == 'block')
}
}
}
class LocationCard extends AccordionCard {
export class LocationCard extends AccordionCard {
private control: any;
public oncallback: Function;
public nextButton: any;
......@@ -507,10 +507,10 @@ class LocationCard extends AccordionCard {
}
}
}
class CardControl extends L.Control {
export class CardControl extends L.Control {
private lang: string;
private langData: any;
......@@ -588,4 +588,7 @@ class CardControl extends L.Control {
}
}
}
declare var STWkit : any;
\ No newline at end of file
declare module STWkit{
export var DomUtil: any;
}
\ No newline at end of file
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