PB-1212: Allow delete last point by button when on line editing mode.#1138
Conversation
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
pb-1212-allow-delete-last-point-on-editing-mode
|
| Run status |
|
| Run duration | 04m 44s |
| Commit |
|
| Committer | Ismail Sunni |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
21
|
|
|
0
|
|
|
215
|
| View all changes introduced in this branch ↗︎ | |
| const selectedEditableFeatures = computed(() => store.state.features.selectedEditableFeatures) | ||
| const selectedLineString = computed(() => { | ||
| if (selectedEditableFeatures.value && selectedEditableFeatures.value.length > 0) { | ||
| const selectedFeature = selectedEditableFeatures.value[0] |
There was a problem hiding this comment.
can there be more than one feature selected while drawing?
There was a problem hiding this comment.
As far as I know, no. But the store as a list of editable feature. Perhaps there is a way to do it or some historical reason?
I always select the first item. From the user point of view, it will be the same, since there will be always only one item in the list.
pakb
left a comment
There was a problem hiding this comment.
when finishing editing/adding more point to a line measure, the last point is sometimes automatically removed, there might be some call to the remove function where it shouldn't be
8f34164 to
1545f14
Compare
|
@pakb I have fixed the automatically removed, but I am not sure this is the same one as yours. Could you check it again? |
pakb
left a comment
There was a problem hiding this comment.
Using "right click" works as expected, but using the "Delete last point" button not.
Could you make sure both are using the same logic? And maybe add some tests that uses this button alongside right click, so that we make sure it is working in both cases.
Side question : is it a big effort to make it possible to close the line as a polygon while adding points?
Underlying question is : can we gather the code that manages all "interactions" with a line/measure, and re-use them in both the "add new" and "edit" mode? It looks like the code isn't currently the same
74c86a2 to
a7009ca
Compare
|
hi @pakb
Fixed. Both are handled in one place, just different interaction to delete.
I think so, while there are some common features for both Draw Interactions, there are also some different, for example |
pakb
left a comment
There was a problem hiding this comment.
thanks, LGTM!
I created another ticket/task to fix the "close as a polygon" issue when adding more points
https://jira.swisstopo.ch/browse/PB-1275
…d vertex button overlay
a7009ca to
1703986
Compare
Test link