commit ac7fb3bf8160877aa5c77f051ba0fa4ca2f982b5
parent 95e37bf72f697cc112b620b382593d05a8215621
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Thu, 9 Mar 2017 01:42:06 +0300
[tracks] stop joining tracks when stopping editing to avoid errors in logs and strange behavior
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js
@@ -519,6 +519,7 @@ L.Control.TrackList = L.Control.extend({
stopEditLine: function() {
if (this._editedLine) {
+ this.stopLineJoinSelection();
this._editedLine.stopEdit();
this._editedLine = null;
}
@@ -539,7 +540,7 @@ L.Control.TrackList = L.Control.extend({
startEditTrackSegement: function(track, polyline) {
if (this._editedLine && this._editedLine !== polyline) {
- this._editedLine.stopEdit();
+ this.stopEditLine();
}
polyline.startEdit();
this._editedLine = polyline;