Edit Arc 1
This commit is contained in:
parent
feb86868cb
commit
4bc6054641
@ -1,12 +1,4 @@
|
||||
<template>
|
||||
<div width="100%">
|
||||
<h1 class="leaflet-sidebar-header" v-if="airport">
|
||||
Airport
|
||||
<div class="leaflet-sidebar-close">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<div width="100%" v-if="airport">
|
||||
<div>
|
||||
<el-row>
|
||||
@ -35,7 +27,6 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
|
@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="leaflet-sidebar-header" v-if="arc">
|
||||
Arc Properties
|
||||
<div class="leaflet-sidebar-close">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
</div>
|
||||
</h1>
|
||||
<div width="100%" v-if="arc">
|
||||
<div>
|
||||
<!--
|
||||
airlineCodes: 0
|
||||
heading: 341.34
|
||||
@ -27,9 +19,15 @@
|
||||
<el-input placeholder="Please input" v-model="name"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<span class="demo-input-label">Pushback :</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-switch v-model="isPushback"></el-switch>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
@ -41,15 +39,22 @@
|
||||
name: {
|
||||
// getter
|
||||
get: function () {
|
||||
return this.$store.state.Editable.data.name
|
||||
return this.$store.state.Editable.data.arc.name
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
this.$store.commit('SET_EDIT_PARKING_NAME', newValue)
|
||||
this.$store.commit('SET_EDIT_ARC_NAME', newValue)
|
||||
}
|
||||
},
|
||||
airports_directory: function () {
|
||||
return this.$store.state.Settings.settings.airportsDirectory
|
||||
isPushback: {
|
||||
// getter
|
||||
get: function () {
|
||||
return this.$store.state.Editable.data.arc.isPushBackRoute === '1'
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
this.$store.commit('SET_EDIT_PUSHBACK', newValue ? '1' : '0')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,8 @@
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
// 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
|
||||
url: 'https://a.tile.openstreetmap.de/{z}/{x}/{y}.png',
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
marker: L.latLng(47.413220, -1.219482),
|
||||
airports: this.$store.state.Airports.airports,
|
||||
|
@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<div v-if="parking">
|
||||
<h1 class="leaflet-sidebar-header">
|
||||
Parking
|
||||
<div class="leaflet-sidebar-close">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
</div>
|
||||
</h1>
|
||||
<div>
|
||||
<!--
|
||||
airlineCodes: 0
|
||||
heading: 341.34
|
||||
@ -18,13 +11,11 @@
|
||||
radius: 18
|
||||
type: "gate"
|
||||
-->
|
||||
{{this.$store.state.Editable.index}}
|
||||
<el-row>
|
||||
<el-col :span="7"><span class="demo-input-label">Name :</span></el-col>
|
||||
<el-col :span="15"><el-input placeholder="Please input" v-model="name"></el-input></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
@ -36,17 +27,13 @@
|
||||
name: {
|
||||
// getter
|
||||
get: function () {
|
||||
return this.$store.state.Editable.data.parking[this.$store.state.Editable.index].name
|
||||
return this.$store.state.Editable.data.parking.name
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
this.$store.commit('SET_EDIT_PARKING_NAME', newValue)
|
||||
}
|
||||
},
|
||||
airports_directory: function () {
|
||||
return this.$store.state.Settings.settings.airportsDirectory
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -23,6 +23,10 @@
|
||||
<p>A responsive sidebar for mapping libraries</p>
|
||||
</div>
|
||||
<div class="leaflet-sidebar-pane" id="edit">
|
||||
<h1 class="leaflet-sidebar-header">
|
||||
Properties
|
||||
<div class="leaflet-sidebar-close"><i class="fa fa-caret-left"></i></div>
|
||||
</h1>
|
||||
<AirportEdit></AirportEdit>
|
||||
<GroundnetEdit></GroundnetEdit>
|
||||
<ArcEdit></ArcEdit>
|
||||
|
@ -1,11 +1,4 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="leaflet-sidebar-header" v-if="node">
|
||||
Node Properties
|
||||
<div class="leaflet-sidebar-close">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
</div>
|
||||
</h1>
|
||||
<div width="100%" v-if="node">
|
||||
<div>
|
||||
<el-row>
|
||||
@ -33,7 +26,6 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
|
@ -42,7 +42,14 @@ L.TaxiwaySegment = L.Polyline.extend({
|
||||
this.on('click', function (event) {
|
||||
console.log("Click : " + event.target);
|
||||
store.default.dispatch('setArc', event.target.options.attributes);
|
||||
|
||||
store.default.watch( function (state) {
|
||||
return state.Editable.data.arc;
|
||||
},
|
||||
() => { console.log(this) }
|
||||
,
|
||||
{
|
||||
deep: true //add this if u need to watch object properties change etc.
|
||||
});
|
||||
});
|
||||
this.on('editable:drawing:move', function (event) {
|
||||
console.log(event.target);
|
||||
|
@ -8,6 +8,8 @@ import { createPersistedState, createSharedMutations } from 'vuex-electron'
|
||||
import modules from './modules'
|
||||
|
||||
Vue.use(Vuex)
|
||||
//https://a.tile.openstreetmap.de
|
||||
//'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules,
|
||||
@ -18,7 +20,7 @@ export default new Vuex.Store({
|
||||
strict: process.env.NODE_ENV !== 'production',
|
||||
state: { zoom: 13,
|
||||
center: L.latLng(47.413220, -1.219482),
|
||||
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
url: 'http://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png',
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
marker: L.latLng(47.413220, -1.219482)}
|
||||
})
|
||||
|
@ -26,10 +26,20 @@ const mutations = {
|
||||
},
|
||||
SET_EDIT_ARC (state, arc) {
|
||||
state.data.arc = arc
|
||||
if (state.data.arc.name === undefined) {
|
||||
state.data.arc.name = 'X'
|
||||
}
|
||||
state.index = arc.index
|
||||
state.type = 'arc'
|
||||
},
|
||||
'SET_EDIT_PARKING_NAME' (state, parkingName) {
|
||||
state.data.name = parkingName
|
||||
state.data.arc.name = parkingName
|
||||
},
|
||||
'SET_EDIT_ARC_NAME' (state, arcName) {
|
||||
state.data.arc.name = arcName
|
||||
},
|
||||
'SET_EDIT_PUSHBACK' (state, isPushBackRoute) {
|
||||
state.data.arc.isPushBackRoute = isPushBackRoute
|
||||
},
|
||||
'SET_EDIT_HOLDPOINTTYPE' (state, holdPointType) {
|
||||
state.data.node.holdPointType = holdPointType
|
||||
|
Loading…
Reference in New Issue
Block a user