Save Dialog / Bugfixes
This commit is contained in:
parent
e1bf234cbb
commit
6fe95be8f7
@ -9,6 +9,9 @@
|
||||
<el-button type="primary" @click="undoLast">Last save</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="Saving" :visible.sync="saveDialogVisible" width="30%" center>
|
||||
<span style="center">Saving..</span>
|
||||
</el-dialog>
|
||||
|
||||
<EditButton icon="fas fa-save" v-on:click="save" :show="editing" tooltip="Save"></EditButton>
|
||||
<EditButton icon="fas fa-draw-polygon" v-on:click="drawPolyline" :show="editing" tooltip="Draw Taxiline"></EditButton>
|
||||
@ -18,11 +21,13 @@
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
/* eslint-disable */
|
||||
import EditButton from './EditButton'
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
components: { EditButton },
|
||||
data () {
|
||||
return {isEditing: false, centerDialogVisible: false}
|
||||
return {isEditing: false, centerDialogVisible: false, saveDialogVisible: false}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
@ -45,8 +50,13 @@
|
||||
},
|
||||
save () {
|
||||
this.editing = false
|
||||
Vue.set(this, 'saveDialogVisible', true)
|
||||
this.editing = false
|
||||
Vue.nextTick( () => {
|
||||
this.$parent.$parent.$refs.editLayer.save()
|
||||
this.$parent.$parent.$refs.editLayer.disableEdit()
|
||||
Vue.set(this, 'saveDialogVisible', false)
|
||||
}, this)
|
||||
},
|
||||
drawPolyline () {
|
||||
this.$parent.$parent.$refs.editLayer.drawPolyline()
|
||||
|
@ -237,7 +237,7 @@
|
||||
editedArc() {
|
||||
console.log('Edited Arc : ' + this.$store.state.Editable.index);
|
||||
var arc = this.groundnetLayerGroup.getLayer(this.$store.state.Editable.index);
|
||||
if (arc) {
|
||||
if (arc && arc instanceof L.Polyline) {
|
||||
arc.options.attributes = Object.assign({}, this.$store.state.Editable.data.arc)
|
||||
arc.updateStyle();
|
||||
}
|
||||
|
@ -39,7 +39,9 @@
|
||||
this.groundnet.addTo(this.$parent.mapObject)
|
||||
}
|
||||
this.groundnet.eachLayer(l => {
|
||||
if (l) {
|
||||
l.bringToBack()
|
||||
}
|
||||
})
|
||||
},
|
||||
visible (feature) {
|
||||
|
@ -55,10 +55,14 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
||||
},
|
||||
() => {
|
||||
// Reset colour
|
||||
if(event.target instanceof L.Polyline &&
|
||||
event.target.options.attributes &&
|
||||
event.target.options.attributes.selected) {
|
||||
event.target.options.attributes.selected = false;
|
||||
event.target.updateStyle();
|
||||
this.unwatch();
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
deep: true //add this if u need to watch object properties change etc.
|
||||
|
Loading…
Reference in New Issue
Block a user