Reload force
This commit is contained in:
parent
cbb78d7f3d
commit
806253dfb6
@ -1,9 +1,16 @@
|
||||
<template>
|
||||
<div id="BLABLA">
|
||||
<EditButton icon="fas fa-edit" v-on:click="edit" :show="!editing" tooltip="Edit"></EditButton>
|
||||
<EditButton icon="fas fa-undo" v-on:click="undo" :show="editing" tooltip="Undo"></EditButton>
|
||||
<EditButton icon="fas fa-save" v-on:click="save" :show="editing" tooltip="Save"></EditButton>
|
||||
<EditButton icon="fas fa-undo" v-on:click="centerDialogVisible = true" :show="editing" tooltip="Undo"></EditButton>
|
||||
<el-dialog title="Reload" :visible.sync="centerDialogVisible" width="30%" center>
|
||||
<span style="center">Reload from last save? You will lose the current edits.</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="undoFirst">Base version (GIT)</el-button>
|
||||
<el-button type="primary" @click="undoLast">Last save</el-button>
|
||||
</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>
|
||||
<EditButton icon="fas fa-parking" v-on:click="drawParking" :show="editing" tooltip="Draw Parking"></EditButton>
|
||||
<EditButton icon="fas fa-trash-alt" v-on:click="deleteFeature" :show="editing" tooltip="Remove"></EditButton>
|
||||
@ -15,7 +22,7 @@
|
||||
export default {
|
||||
components: { EditButton },
|
||||
data () {
|
||||
return {isEditing: false}
|
||||
return {isEditing: false, centerDialogVisible: false}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
@ -24,10 +31,17 @@
|
||||
this.editing = true
|
||||
this.$parent.$parent.$refs.editLayer.enableEdit()
|
||||
},
|
||||
undo () {
|
||||
undoFirst () {
|
||||
this.editing = false
|
||||
this.centerDialogVisible = false
|
||||
this.$parent.$parent.$refs.editLayer.disableEdit()
|
||||
this.$parent.$parent.$refs.editLayer.reload()
|
||||
this.$parent.$parent.$refs.editLayer.reload(true)
|
||||
},
|
||||
undoLast () {
|
||||
this.editing = false
|
||||
this.centerDialogVisible = false
|
||||
this.$parent.$parent.$refs.editLayer.disableEdit()
|
||||
this.$parent.$parent.$refs.editLayer.reload(false)
|
||||
},
|
||||
save () {
|
||||
this.editing = false
|
||||
|
@ -38,12 +38,12 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
load (icao) {
|
||||
load (icao, force) {
|
||||
if (this.groundnetLayerGroup !== undefined) {
|
||||
this.groundnetLayerGroup.removeFrom(this.$parent.mapObject)
|
||||
}
|
||||
this.icao = icao
|
||||
this.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, true)
|
||||
this.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, force)
|
||||
if (this.groundnetLayerGroup === undefined) {
|
||||
console.console.error('ICAO not loaded ' + icao)
|
||||
return
|
||||
@ -197,8 +197,8 @@
|
||||
// console.log(this.groundnetLayerGroup)
|
||||
this.$parent.mapObject.off('click', this.addParking)
|
||||
},
|
||||
reload () {
|
||||
this.load(this.icao)
|
||||
reload (force) {
|
||||
this.load(this.icao, force)
|
||||
},
|
||||
save () {
|
||||
var xml = []
|
||||
|
Loading…
Reference in New Issue
Block a user