Commit a170a1cf authored by Pettersson Tomas's avatar Pettersson Tomas

testing new draw

parent 598ba71a
......@@ -129,7 +129,7 @@ app.get('/demo/availableTimes/ms/HELCOM_NEMO', function (req, res) {
app.post('/demo/startex', function (req, res) {
var result = {};
console.log(req.body.features[0].properties);
console.log(req.body.features[1]);
result["id"] = "uuid";
res.send(result);
});
......
......@@ -303,14 +303,8 @@ var EXAmount = (function (_super) {
var TrajectoryLineHandler = (function (_super) {
__extends(TrajectoryLineHandler, _super);
function TrajectoryLineHandler(time, map, options) {
var _this = _super.call(this, map, options) || this;
if (time)
_this.time = time.reverse();
return _this;
return _super.call(this, map, options) || this;
}
TrajectoryLineHandler.prototype.resetTime = function (time) {
this.time = time.reverse();
};
TrajectoryLineHandler.prototype.autoPoint = function (e, latlng) {
if (this._errorShown)
return;
......@@ -321,18 +315,18 @@ var TrajectoryLineHandler = (function (_super) {
.distanceTo(this._mouseDownOrigin);
//if (Math.abs(distance) < 9 * (window.devicePixelRatio || 1)) {
if (Math.abs(distance) > 6 * (window.devicePixelRatio || 1)) {
if (this.time.length > 0) {
L.drawLocal.draw.handlers.polyline.tooltip.cont = moment.utc(this.time.pop()).format('YYYY-MM-DD HH:mm') + ' (' + this.time.length + ' left)';
_super.prototype.addVertex.call(this, latlng);
this._mouseDownOrigin = L.point(originalEvent.clientX, originalEvent.clientY);
}
else {
_super.prototype._finishShape.call(this);
this._mouseDownOrigin = null;
this._clickHandled = false;
this._disableMarkers = false;
return;
}
// if (this.time.length > 0) {
L.drawLocal.draw.handlers.polyline.tooltip.cont = 'Relase button to stop drawing';
// (<any>L).drawLocal.draw.handlers.polyline.tooltip.cont = moment.utc(this.time.pop()).format('YYYY-MM-DD HH:mm')+' ('+this.time.length+' left)';
_super.prototype.addVertex.call(this, latlng);
this._mouseDownOrigin = L.point(originalEvent.clientX, originalEvent.clientY);
// } else {
// super._finishShape();
// this._mouseDownOrigin = null;
// this._clickHandled = false;
// this._disableMarkers = false;
// return;
// }
}
//}
}
......@@ -435,7 +429,12 @@ var EXTrajectory = (function (_super) {
var type = e.layerType, layer = e.layer;
if (type == 'draw' + id) {
var trajlinefeature = layer.toGeoJSON();
if ((trajlinefeature.geometry) && (trajlinefeature.geometry.coordinates.length == self.time.length)) {
if ((trajlinefeature.geometry) && (trajlinefeature.geometry.coordinates.length > 2)) {
self.trajlength = trajlinefeature.geometry.coordinates.length;
self.setTimeIncrement() && self.setTime();
console.log(self.trajlength);
console.log(self.time.length);
console.log(self.timeIncrement);
self.trajectoryLayer.addData(trajlinefeature);
var trajpointjson = STWkit.featurecollection();
for (var i = 0; i < self.time.length; i++) {
......@@ -553,18 +552,34 @@ var EXTrajectory = (function (_super) {
EXTrajectory.prototype.changeFn = function (changeCard) {
var self = this;
if ((typeof changeCard.from !== 'undefined') && (typeof changeCard.to !== 'undefined')) {
var from = changeCard.from.clone();
var to = changeCard.to.clone();
if (from.isBefore(to)) {
self.time = [];
// self.time.push(from.valueOf());
var t = from;
while (t.isBefore(to)) {
t = t.add(15, 'm');
self.time.push(t.valueOf());
}
self.from = changeCard.from.clone();
self.to = changeCard.to.clone();
self.setTimeIncrement() && self.setTime() && self.updateTrajectoryLabelLayer();
}
};
EXTrajectory.prototype.setTimeIncrement = function () {
this.timeIncrement = -1;
var len = this.trajlength;
if (len > 0) {
var diff = Math.abs(this.from - this.to);
this.timeIncrement = Math.round(((diff / 1000) / 60) / len);
return true;
}
return false;
};
EXTrajectory.prototype.setTime = function () {
var self = this;
self.time = [];
if (self.timeIncrement > 0 && self.from.isBefore(self.to)) {
var t = self.from.clone();
for (var i = 0; i < self.trajlength; i++) {
self.time.push(t.valueOf());
t = t.add(self.timeIncrement, 'm');
}
self.time[self.time.length - 1] = self.to.valueOf();
return true;
}
return false;
};
EXTrajectory.prototype.updateTrajectoryLabelLayer = function () {
var self = this;
......@@ -647,7 +662,9 @@ var EXTrajectory = (function (_super) {
self.trajMarkerArray = [];
if (self.lineHandler._enabled)
self.lineHandler.disable();
self.lineHandler.resetTime(self.time.slice(0));
self.timeIncrement = -1;
self.trajlength = 0;
self.time = [];
if (self.nextButton)
STWkit.AccordionCard.enableNext(self.nextButton, false);
(self.oncallback && self.oncallback());
......
This diff is collapsed.
......@@ -337,7 +337,6 @@ class TrajectoryLineHandler extends LineHandler {
private _errorShown : any;
private _mouseDownOrigin : any;
private time : any;
private _map : any;
private _currentLatLng: any;
private _enabled: any;
......@@ -347,11 +346,6 @@ class TrajectoryLineHandler extends LineHandler {
constructor(time, map, options){
super(map,options);
if (time )this.time = time.reverse();
}
private resetTime(time){
this.time = time.reverse();
}
private autoPoint(e, latlng) {
......@@ -366,17 +360,18 @@ class TrajectoryLineHandler extends LineHandler {
//if (Math.abs(distance) < 9 * (window.devicePixelRatio || 1)) {
if (Math.abs(distance) > 6 * (window.devicePixelRatio || 1)) {
if (this.time.length > 0) {
(<any>L).drawLocal.draw.handlers.polyline.tooltip.cont = moment.utc(this.time.pop()).format('YYYY-MM-DD HH:mm')+' ('+this.time.length+' left)';
// if (this.time.length > 0) {
(<any>L).drawLocal.draw.handlers.polyline.tooltip.cont = 'Relase button to stop drawing';
// (<any>L).drawLocal.draw.handlers.polyline.tooltip.cont = moment.utc(this.time.pop()).format('YYYY-MM-DD HH:mm')+' ('+this.time.length+' left)';
super.addVertex(latlng);
this._mouseDownOrigin = L.point(originalEvent.clientX, originalEvent.clientY);
} else {
super._finishShape();
this._mouseDownOrigin = null;
this._clickHandled = false;
this._disableMarkers = false;
return;
}
// } else {
// super._finishShape();
// this._mouseDownOrigin = null;
// this._clickHandled = false;
// this._disableMarkers = false;
// return;
// }
}
//}
}
......@@ -417,11 +412,15 @@ class EXTrajectory extends STWkit.AccordionCard {
private lineHandler : any;
private trajectoryLayer : L.GeoJSON;
private trajectoryLabelLayer : any;
private trajMarkerArray : any;
private trajMarkerArray : any[];
public exitControl: L.Control;
public positions: any[];
private map: any;
private time: any;
private from: any;
private to: any;
private trajlength: number;
private timeIncrement: number; // minutes
public nextButton: any;
constructor(id, parentDiv, lang, langData, map, type, initials) {
......@@ -500,7 +499,9 @@ class EXTrajectory extends STWkit.AccordionCard {
layer = e.layer;
if (type == 'draw'+id) {
var trajlinefeature = layer.toGeoJSON();
if ((trajlinefeature.geometry) && (trajlinefeature.geometry.coordinates.length == self.time.length)) {
if ((trajlinefeature.geometry) && (trajlinefeature.geometry.coordinates.length > 2)) {
self.trajlength = trajlinefeature.geometry.coordinates.length;
self.setTimeIncrement() && self.setTime();
self.trajectoryLayer.addData(trajlinefeature);
var trajpointjson: any = STWkit.featurecollection();
for (var i = 0; i < self.time.length; i++) {
......@@ -627,21 +628,37 @@ class EXTrajectory extends STWkit.AccordionCard {
public changeFn(changeCard) {
var self = this;
if ((typeof changeCard.from !== 'undefined') && (typeof changeCard.to !== 'undefined')) {
var from = changeCard.from.clone();
var to = changeCard.to.clone();
if (from.isBefore(to)) {
self.time = [];
// self.time.push(from.valueOf());
var t = from;
while (t.isBefore(to)) {
t = t.add(15,'m');
self.time.push(t.valueOf());
}
}
}
self.from = changeCard.from.clone();
self.to = changeCard.to.clone();
self.setTimeIncrement() && self.setTime() && self.updateTrajectoryLabelLayer();
}
}
private setTimeIncrement(){
this.timeIncrement = -1;
var len = this.trajlength;
if (len > 0) {
var diff = Math.abs(this.from - this.to);
this.timeIncrement = Math.round(((diff/1000)/60) / len);
return true;
}
return false;
}
public setTime() {
var self = this;
self.time = [];
if (self.timeIncrement > 0 && self.from.isBefore(self.to)) {
var t = self.from.clone();
for (var i = 0; i < self.trajlength; i++) {
self.time.push(t.valueOf());
t = t.add(self.timeIncrement,'m');
}
self.time[self.time.length-1] = self.to.valueOf();
return true;
}
return false;
}
private updateTrajectoryLabelLayer() {
var self = this;
......@@ -724,7 +741,9 @@ class EXTrajectory extends STWkit.AccordionCard {
self.trajectoryLayer.clearLayers()
self.trajMarkerArray = [];
if (self.lineHandler._enabled) self.lineHandler.disable();
self.lineHandler.resetTime(self.time.slice(0));
self.timeIncrement = -1;
self.trajlength = 0;
self.time = [];
if (self.nextButton) STWkit.AccordionCard.enableNext(self.nextButton, false);
(self.oncallback && self.oncallback());
}
......
......@@ -39,7 +39,7 @@ var L;
this.accordionDiv = L.DomUtil.create('div', 'uk-accordion', this.container);
var locationid = self.initials + 'locationCard';
self.cardMap[locationid] = new EXLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.type, self.subtype, self.initials);
self.cardMap[locationid].show();
// self.cardMap[locationid].show();
var periodid = self.initials + 'periodCard';
var periodoptions = {};
periodoptions['type'] = this.type;
......@@ -58,11 +58,11 @@ var L;
var trajectoryid = self.initials + 'trajectoryCard';
self.cardMap[trajectoryid] = new EXTrajectory(trajectoryid, this.accordionDiv, self.lang, self.langData, map, self.type, self.initials);
this.cardMap[periodid].addChangeFnListener(this.cardMap[trajectoryid]);
// self.cardMap[trajectoryid].show();
self.cardMap[trajectoryid].show(); // comment out
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
// chain[trajectoryid] = periodid;
// chain[locationid] = periodid;
chain[trajectoryid] = periodid; // comment out
chain[periodid] = oiltypeid;
chain[oiltypeid] = amountid;
chain[amountid] = trajectoryid;
......
{"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,CA+FP;AA/FD,WAAO,CAAC;IAAC,IAAA,OAAO,CA+Ff;IA/FQ,WAAA,OAAO;QACZ;YAA8B,4BAAkB;YAgB5C,kBAAY,OAAO;gBAAnB,YACI,kBAAM,OAAO,CAAC,SASjB;gBARG,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,OAAO,GAAG,SAAS,CAAC;gBACzB,KAAI,CAAC,IAAI,GAAG,UAAU,CAAC;gBACvB,KAAI,CAAC,QAAQ,GAA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C,CAAC,CAAC;gBACF,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,UAAU,GAAG,UAAC,MAAM;oBAC3C,iBAAM,QAAQ,aAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;gBAChD,CAAC,CAAC;YAEN,CAAC;YAEM,wBAAK,GAAZ,UAAa,IAAI;gBACb,iBAAM,KAAK,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,AA9FD,CAA8B,MAAM,CAAC,WAAW,GA8F/C;QA9FY,gBAAQ,WA8FpB,CAAA;IACL,CAAC,EAhGQ,OAAO,GAAP,SAAO,KAAP,SAAO,QAgGf;AAAD,CAAC,EAhGM,CAAC,KAAD,CAAC,QAgGP"}
\ No newline at end of file
......@@ -44,7 +44,7 @@ module L.Control {
this.accordionDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-accordion', this.container);
var locationid = self.initials+'locationCard';
self.cardMap[locationid] = new EXLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.type, self.subtype, self.initials);
self.cardMap[locationid].show();
// self.cardMap[locationid].show();
var periodid = self.initials+'periodCard';
var periodoptions = {};
periodoptions['type'] = this.type;
......@@ -64,11 +64,12 @@ module L.Control {
var trajectoryid = self.initials+'trajectoryCard';
self.cardMap[trajectoryid] = new EXTrajectory(trajectoryid, this.accordionDiv, self.lang, self.langData, map, self.type, self.initials);
this.cardMap[periodid].addChangeFnListener(this.cardMap[trajectoryid]);
// self.cardMap[trajectoryid].show();
self.cardMap[trajectoryid].show(); // comment out
super.setup(map);
var chain = [];
chain[locationid] = periodid;
// chain[trajectoryid] = periodid;
// chain[locationid] = periodid;
chain[trajectoryid] = periodid; // comment out
chain[periodid] = oiltypeid;
chain[oiltypeid] = amountid;
chain[amountid] = trajectoryid;
......
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