Commit 2235491c authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

trajectory base

parent 4b8481df
......@@ -88,12 +88,10 @@ var EXLocation = (function (_super) {
}
};
satDetectionHeading.onclick = function (evt) {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down')) {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down'))
satdetectionShow();
}
else {
else
satdetectionHide();
}
};
var satDetectionform = L.DomUtil.create('form', 'uk-form uk-form-stacked', self.satDetectionContent);
satDetectionform.onsubmit = function (e) {
......@@ -289,4 +287,191 @@ var EXAmount = (function (_super) {
};
return EXAmount;
}(STWkit.AccordionCard));
var EXTrajectory = (function (_super) {
__extends(EXTrajectory, _super);
function EXTrajectory(id, parentDiv, lang, langData, map, type, initials) {
var _this = this;
var trajectoryDiv = L.DomUtil.create('div', 'uk-width-1-1 uk-margin-top', parentDiv);
_this = _super.call(this, id, 'Trajectory', parentDiv, trajectoryDiv) || this;
var self = _this;
var form = L.DomUtil.create('form', 'uk-form uk-form-stacked', trajectoryDiv);
form.setAttribute('novalidate', '');
form.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
form.onkeypress = function (e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13)
e.preventDefault();
};
self.positions = [];
var positionLabelGrid = L.DomUtil.create('div', 'uk-grid uk-margin-top', form);
var positionlabelDiv = L.DomUtil.create('div', 'uk-width-1-1', positionLabelGrid);
_super.prototype.addLabelDiv.call(_this, positionlabelDiv, "Position", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-position' target='_blank'>here</a>");
var positionDiv = L.DomUtil.create('div', '', form);
positionDiv.id = 'guide' + initials + 'pos';
var positionButtonGrid = L.DomUtil.create('div', 'uk-grid uk-grid-small', positionDiv);
var drawDiv = L.DomUtil.create('div', 'uk-width-1-2', positionButtonGrid);
// var importDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-1-3', positionButtonGrid);
var drawButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-align-left uk-margin-remove', drawDiv);
drawButton.textContent = 'Free hand draw';
// var importButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-small', importDiv);
// importButton.textContent = 'Import';
positionDiv.guideFn = function () {
var geojson = {};
geojson["type"] = "FeatureCollection";
geojson["features"] = [];
var feature = {};
feature['type'] = "Feature";
feature['geometry'] = {};
feature['geometry']['type'] = "Point";
feature['geometry']['coordinates'] = [];
// feature['geometry']['coordinates'].push(19.0);
// feature['geometry']['coordinates'].push(56.0);
geojson["features"].push(feature);
self.control.addGeoJSON(geojson);
};
var bbox = {};
bbox['s'] = -90;
bbox['n'] = 90;
bbox['w'] = -180;
bbox['e'] = 180;
self.control = new L.Control.Coordinates({
"lang": lang,
"langdata": langData.coordinates,
"id": id,
"inline": true,
"bbox": bbox,
"table": true,
"type": false,
"buttons": false,
"tabs": false,
"callback": function (latlngs, geojson) {
self.positions = [];
self.positionMaxDepth = 0;
if (latlngs.length > 0) {
var toggleevt = document.createEvent("CustomEvent");
toggleevt.initCustomEvent('container:toggleVisibility', false, false, {
'show': true
});
window.dispatchEvent(toggleevt);
self.fireChangeFn(self);
if (self.exitControl)
map.removeControl(self.exitControl);
self.exitControl = null;
var coordinates = [];
var center = L.polyline(latlngs).getBounds().getCenter();
coordinates.push([center.lng, center.lat, 0]);
// self.control.showTable();
for (var i = 0; i < coordinates.length; i++) {
var depth = 0;
if (self.forcingBoundary)
depth = self.forcingBoundary.depth(coordinates[i][1], coordinates[i][0]);
self.positions.push([coordinates[i][1], coordinates[i][0], depth]);
}
self.positionMaxDepth = Math.floor(self.positions[0][2]);
self.validate();
}
}
});
var content = self.control.onAdd(map);
var coordinateDiv = L.DomUtil.create('div', 'uk-margin-top uk-margin-bottom', self.locationForm);
coordinateDiv.appendChild(content);
self.control.hideTable();
self.control.setType("linestring");
drawButton.onclick = function () {
var toggleevt = document.createEvent("CustomEvent");
toggleevt.initCustomEvent('container:toggleVisibility', false, false, {
'show': false
});
window.dispatchEvent(toggleevt);
if (self.forcingBoundary)
self.forcingBoundary.show();
self.control.draw();
self.exitControl = new L.Control({ position: 'bottomright' });
self.exitControl.onAdd = function (map) {
var container = L.DomUtil.create('div', 'exit-control');
var exitPanel = L.DomUtil.create('div', 'uk-panel uk-panel-box', container);
var finishButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-button-primary uk-margin-right', exitPanel);
finishButton.textContent = 'Finish';
finishButton.onclick = function (e) {
map.fire('draw:canceled');
};
finishButton.style.display = 'none';
// 4 is multipoint type in coordinates control
if (self.control.getType() == GeometryType.MULTIPOINT)
finishButton.style.display = '';
var cancelButton = L.DomUtil.create('button', 'uk-button uk-button-small', exitPanel);
cancelButton.textContent = 'Cancel';
cancelButton.onclick = function (e) {
if (self.exitControl)
map.removeControl(self.exitControl);
self.exitControl = null;
var toggleevt = document.createEvent("CustomEvent");
toggleevt.initCustomEvent('container:toggleVisibility', false, false, {
'show': true
});
window.dispatchEvent(toggleevt);
self.clear();
};
L.DomEvent.disableClickPropagation(container);
return container;
};
self.exitControl.addTo(map);
};
var clearDiv = L.DomUtil.create('div', 'uk-clearfix', trajectoryDiv);
var clearButton = L.DomUtil.create('button', 'uk-button uk-margin-top uk-align-left', clearDiv);
clearButton.textContent = 'Clear';
clearButton.onclick = function () {
self.clear();
};
self.nextButton = L.DomUtil.create('button', 'uk-button uk-margin-top uk-align-right', clearDiv);
self.nextButton.id = 'guide' + initials + 'trajectory';
self.nextButton.textContent = 'Next';
self.nextButton.guideFn = function () {
self.nextButton.click();
};
STWkit.AccordionCard.enableNext(self.nextButton, false);
self.nextButton.onclick = function () {
if (!STWkit.AccordionCard.isEnabled(self.nextButton)) {
STWkit.AccordionCard.warningMsg('Mandatory fields missing', 'Specify a valid <b>position</b>.');
return;
}
(self.oncallback && self.oncallback(true));
};
UIkit.ready(function () {
self.defaults();
});
return _this;
}
EXTrajectory.prototype.validate = function () {
if (this.positions.length == 0)
return;
this.status = true;
STWkit.AccordionCard.enableNext(this.nextButton, true);
(this.oncallback && this.oncallback());
};
;
EXTrajectory.prototype.defaults = function () {
var self = this;
};
EXTrajectory.prototype.populateCard = function (geojson) {
var self = this;
};
EXTrajectory.prototype.populateData = function (geojson) {
var self = this;
};
EXTrajectory.prototype.clear = function () {
var self = this;
_super.prototype.clear.call(this);
self.control.clear();
self.control.hideTable();
if (self.nextButton)
STWkit.AccordionCard.enableNext(self.nextButton, false);
(self.oncallback && self.oncallback());
};
return EXTrajectory;
}(STWkit.AccordionCard));
//# sourceMappingURL=leaflet-exercise-cards.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -54,12 +54,15 @@ var L;
var amountid = self.initials + 'amountCard';
self.cardMap[amountid] = new EXAmount(amountid, this.accordionDiv, self.lang, map, self.type, self.initials);
this.cardMap[locationid].addChangeFnListener(this.cardMap[periodid]);
var trajectoryid = self.initials + 'trajectoryCard';
self.cardMap[trajectoryid] = new EXTrajectory(trajectoryid, this.accordionDiv, self.lang, self.langData, map, self.type, self.initials);
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
chain[periodid] = oiltypeid;
chain[oiltypeid] = amountid;
chain[amountid] = '';
chain[amountid] = trajectoryid;
chain[trajectoryid] = '';
self.cardMap[locationid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, locationid, gonext);
};
......@@ -72,6 +75,9 @@ var L;
self.cardMap[amountid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, amountid, gonext);
};
self.cardMap[trajectoryid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, trajectoryid, gonext);
};
};
Exercise.prototype.ready = function (name) {
_super.prototype.ready.call(this, name);
......
{"version":3,"file":"leaflet-exercise-control.js","sourceRoot":"","sources":["leaflet-exercise-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,kDAAkD;;;;;;;;;;;AAKlD,IAA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;YACA,CAAC;YACO,uBAAI,GAAZ;gBACI,IAAI,CAAC,KAAK,EAAE,CAAC;YACjB,CAAC;YAEL,eAAC;QAAD,CAAC,AApFD,CAA8B,MAAM,CAAC,WAAW,GAoF/C;QApFY,gBAAQ,WAoFpB,CAAA;IACL,CAAC,EAtFQ,OAAO,GAAP,SAAO,KAAP,SAAO,QAsFf;AAAD,CAAC,EAtFM,CAAC,KAAD,CAAC,QAsFP"}
\ No newline at end of file
{"version":3,"file":"leaflet-exercise-control.js","sourceRoot":"","sources":["leaflet-exercise-control.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,wCAAwC;AACxC,yCAAyC;AACzC,kDAAkD;;;;;;;;;;;AAKlD,IAAO,CAAC,CA4FP;AA5FD,WAAO,CAAC;IAAC,IAAA,OAAO,CA4Ff;IA5FQ,WAAA,OAAO;QACZ;YAA8B,4BAAkB;YAgB5C,kBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,SASjB;gBARG,KAAI,CAAC,IAAI,GAAG,KAAK,CAAC;gBAClB,KAAI,CAAC,OAAO,GAAG,SAAS,CAAC;gBACzB,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;oBAChB,KAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;gBACzB,CAAC;;YAEL,CAAC;YAEO,wBAAK,GAAb,UAAc,GAAG;gBAAjB,iBA+CC;gBA9CG,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,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5FM,CAAC,KAAD,CAAC,QA4FP"}
\ No newline at end of file
......@@ -60,12 +60,15 @@ module L.Control {
self.cardMap[amountid] = new EXAmount(amountid, this.accordionDiv, self.lang, map, self.type, self.initials);
this.cardMap[locationid].addChangeFnListener(this.cardMap[periodid]);
var trajectoryid = self.initials+'trajectoryCard';
self.cardMap[trajectoryid] = new EXTrajectory(trajectoryid, this.accordionDiv, self.lang, self.langData, map, self.type, self.initials);
super.setup(map);
var chain = [];
chain[locationid] = periodid;
chain[periodid] = oiltypeid;
chain[oiltypeid] = amountid;
chain[amountid] = '';
chain[amountid] = trajectoryid;
chain[trajectoryid] = '';
self.cardMap[locationid].oncallback = (gonext) => {
super.callback(chain, locationid, gonext);
};
......@@ -78,6 +81,9 @@ module L.Control {
self.cardMap[amountid].oncallback = (gonext) => {
super.callback(chain, amountid, gonext);
};
self.cardMap[trajectoryid].oncallback = (gonext) => {
super.callback(chain, trajectoryid, 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