mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
Merge pull request #2077 from umap-project/fix-continue-backward-measure
fix: correctly add drawn latlng when continuing line backward
This commit is contained in:
commit
f236e7e3b6
1 changed files with 5 additions and 1 deletions
|
@ -1260,7 +1260,11 @@ U.Editable = L.Editable.extend({
|
|||
}
|
||||
} else {
|
||||
const tmpLatLngs = e.layer.editor._drawnLatLngs.slice()
|
||||
if (e.layer.editor._drawing === L.Editable.BACKWARD) {
|
||||
tmpLatLngs.unshift(e.latlng)
|
||||
} else {
|
||||
tmpLatLngs.push(e.latlng)
|
||||
}
|
||||
measure = e.layer.getMeasure(tmpLatLngs)
|
||||
|
||||
if (e.layer.editor._drawnLatLngs.length < e.layer.editor.MIN_VERTEX) {
|
||||
|
|
Loading…
Reference in a new issue