From 04aa6b7b5506cf10bf1b6615aafb45d380696005 Mon Sep 17 00:00:00 2001 From: DESPRES Damien <ddespres@neogeo.fr> Date: Tue, 21 Sep 2021 11:35:38 +0200 Subject: [PATCH] passage vuejs --- src/views/feature/Feature_edit.vue | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/views/feature/Feature_edit.vue b/src/views/feature/Feature_edit.vue index 4f2dd415..ff69f026 100644 --- a/src/views/feature/Feature_edit.vue +++ b/src/views/feature/Feature_edit.vue @@ -91,8 +91,8 @@ Importer <i class="checkmark icon"></i> </button> - </div> - <p> + </div> + <p v-if="showGeoPositionBtn"> <button @click="create_point_geoposition()" id="create-point-geoposition" type="button" @@ -278,6 +278,7 @@ export default { map:null, file:null, showGeoRef:false, + showGeoPositionBtn:true, erreurGeolocalisationMessage:null, erreurUploadMessage:null, attachmentDataKey: 0, @@ -606,10 +607,8 @@ export default { this.drawControlFull.addTo(this.map); this.updateGeomField(""); if (geomType === "point") { - document.getElementById("create-point-geoposition").style.display = - "inline"; - document.getElementById("erreur-geolocalisation").style.display = - "none"; + this.showGeoPositionBtn=true; + this.erreurGeolocalisationMessage=""; } }.bind(this) ); @@ -656,8 +655,6 @@ export default { mapDefaultViewCenter, mapDefaultViewZoom, }); - - // mapUtil.addLayers(layers, serviceMap, optionsMap); const currentFeatureId = this.$route.params.slug_signal; const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature/?output=geojson`; @@ -703,10 +700,8 @@ export default { //this.updateGeomField(wellknown.stringify(layer.toGeoJSON())) this.updateGeomField(layer.toGeoJSON()); if (this.feature_type.geomType === "point") { - document.getElementById("create-point-geoposition").style.display = - "none"; - document.getElementById("erreur-geolocalisation").style.display = - "none"; + this.showGeoPositionBtn=false; + this.erreurGeolocalisationMessage=""; } }, }, -- GitLab