File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 110
110
:main_website =" main_website"
111
111
:remote_url_read =" remote_url_read"
112
112
@update-issue-uuid =" issueUuid = $event"
113
- @q =" $refs.osmObject.select($event)"
113
+ @elems =" $event ? $ refs.osmObject.select($event) : $refs.osmObject.clear( )"
114
114
@remove-marker ="
115
115
$refs.markerLayer.remove($event)
116
116
closed_marker_count += 1
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ export default Vue.extend({
19
19
},
20
20
21
21
methods: {
22
- async select(data ) {
23
- data . elems_id = data . elems .map ((elem ) => elem .type + elem .id ).join (' ,' )
22
+ async select(elems ) {
23
+ const elems_id = elems .map ((elem ) => elem .type + elem .id ).join (' ,' )
24
24
25
25
// Get the OSM objects
26
- if (data . elems_id ) {
26
+ if (elems_id ) {
27
27
this .clear ()
28
28
const features = await Promise .all (
29
- data . elems .map ((elem ) =>
29
+ elems .map ((elem ) =>
30
30
fetch (
31
31
elem .type === ' node'
32
32
? ` ${this .remoteUrlRead }api/0.6/node/${elem .id } `
Original file line number Diff line number Diff line change @@ -361,6 +361,12 @@ export default Vue.extend({
361
361
}
362
362
},
363
363
364
+ watch: {
365
+ elems() {
366
+ this .$emit (' elems' , this .elems )
367
+ },
368
+ },
369
+
364
370
computed: {
365
371
api_url(): string {
366
372
return (API_URL .startsWith (' http' ) ? ' ' : location .protocol ) + API_URL
You can’t perform that action at this time.
0 commit comments