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 110110 :main_website =" main_website"
111111 :remote_url_read =" remote_url_read"
112112 @update-issue-uuid =" issueUuid = $event"
113- @q =" $refs.osmObject.select($event)"
113+ @elems =" $event ? $ refs.osmObject.select($event) : $refs.osmObject.clear( )"
114114 @remove-marker ="
115115 $refs.markerLayer.remove($event)
116116 closed_marker_count += 1
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ export default Vue.extend({
1919 },
2020
2121 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 (' ,' )
2424
2525 // Get the OSM objects
26- if (data . elems_id ) {
26+ if (elems_id ) {
2727 this .clear ()
2828 const features = await Promise .all (
29- data . elems .map ((elem ) =>
29+ elems .map ((elem ) =>
3030 fetch (
3131 elem .type === ' node'
3232 ? ` ${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({
361361 }
362362 },
363363
364+ watch: {
365+ elems() {
366+ this .$emit (' elems' , this .elems )
367+ },
368+ },
369+
364370 computed: {
365371 api_url(): string {
366372 return (API_URL .startsWith (' http' ) ? ' ' : location .protocol ) + API_URL
You can’t perform that action at this time.
0 commit comments