From 9865ce0e9e9b0662f71616145d31c3f93ccf9a1e Mon Sep 17 00:00:00 2001 From: portree_kid Date: Mon, 13 Jul 2020 11:49:22 +0200 Subject: [PATCH 001/146] 0.0.20 --- .travis.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d3f361..97da140 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,12 +75,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: '0.0.20' + name: '0.0.21' provider: releases api_key: secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= file_glob: true file: build/* on: - branches: '0.0.20' + branches: '0.0.21' repo: Portree-Kid/flightgear-airports diff --git a/package.json b/package.json index 4782736..3b669d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.20", + "version": "0.0.21", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL v3", From 6f3b1dd9367dba0e0c3a56d73890ab80fcdd38ea Mon Sep 17 00:00:00 2001 From: portree_kid Date: Mon, 13 Jul 2020 21:05:55 +0200 Subject: [PATCH 002/146] https://github.com/Portree-Kid/flightgear-airports/issues/55 --- src/renderer/utils/scan.js | 61 ++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/src/renderer/utils/scan.js b/src/renderer/utils/scan.js index a3d6cec..478e728 100644 --- a/src/renderer/utils/scan.js +++ b/src/renderer/utils/scan.js @@ -239,26 +239,57 @@ function readAI(f, apts) { resolve(); return; } + const aircraftLookup = {}; + + dat.trafficlist.aircraft.map(n => { + try { + if(aircraftLookup[n['required-aircraft']] === undefined) { + aircraftLookup[n['required-aircraft']] = []; + } + aircraftLookup[n['required-aircraft']].push(n.airline); + aircraftLookup[n['required-aircraft']] = aircraftLookup[n['required-aircraft']].filter((v, i, a) => a.indexOf(v) === i); + } catch (error) { + reject(error); + } + //debugger; + }); + logger('info', 'Traffic', dat.trafficlist.flight); logger('info', "Departure flights " + dat.trafficlist.flight.length); - var merged = new Array(); + // Flat list. Each flight departing or landing counts as one. + var merged = []; + + var airports = {}; + dat.trafficlist.flight.map(n => { - merged.push(n.departure.port); + merged.push(n.departure.port); merged.push(n.arrival.port); + + if(airports[n.departure.port] === undefined) { + airports[n.departure.port] = []; + } + if(airports[n.arrival.port] === undefined) { + airports[n.arrival.port] = []; + } + airports[n.departure.port] = airports[n.departure.port].concat(aircraftLookup[n['required-aircraft']]); + airports[n.departure.port] = airports[n.departure.port].filter((v, i, a) => a.indexOf(v) === i) + airports[n.arrival.port] = airports[n.arrival.port].concat(aircraftLookup[n['required-aircraft']]); + airports[n.arrival.port] = airports[n.arrival.port].filter((v, i, a) => a.indexOf(v) === i) }).sort(); + //debugger; var counts = {}; for (var i = 0; i < merged.length; i++) { counts[merged[i]] = 1 + (counts[merged[i]] || 0); } - asyncForEach(Object.keys(counts), async key => { - logger('info', key); - await store(key, airline[1], counts[key]); + asyncForEach(Object.keys(counts), async icao => { + logger('info', icao); + await store(icao, airports[icao], counts[icao]); }).then(t => { logger('info', "Finished"); resolve(); @@ -290,7 +321,7 @@ function readAI(f, apts) { * @param {*} value */ -function store(icao, airline, value) { +function store(icao, airlines, value) { var promise = new Promise(function (resolve, reject) { logger('info', "Airport " + icao + " has " + value + " new flights"); // Make a request to get a record by key from the object store @@ -300,18 +331,18 @@ function store(icao, airline, value) { var objectStoreRequest = index.get(icao); objectStoreRequest.onsuccess = function (event) { - logger('info', 'Stored ', event); + logger('info', 'Store Request', event); var feature = objectStoreRequest.result; if (!feature) { feature = createFeature(icao); } feature.properties.flights += value; - logger('info', "Airline : ", airline); - if (!feature.properties.airlines.includes(airline)) { - feature.properties.airlines.push(airline); - feature.properties.airlines.sort(); - } logger('info', "ICAO : " + feature.properties.icao + " Flights : " + feature.properties.flights); + logger('info', "Airlines : ", JSON.stringify(airlines)); + //debugger; + feature.properties.airlines = feature.properties.airlines.concat(airlines); + feature.properties.airlines = feature.properties.airlines.filter((v, i, a) => a.indexOf(v) === i) + feature.properties.airlines.sort() // Create another request that inserts the item back into the database var updateAirportRequest = objectStore.put(feature); @@ -320,16 +351,16 @@ function store(icao, airline, value) { // When this new request succeeds, run the displayData() function again to update the display updateAirportRequest.onsuccess = function (event) { - logger('info', "Stored", event); + logger('info', "Updated Success", event); resolve(); }; updateAirportRequest.onerror = function (event) { - logger('info', "Error storing ", event); + logger('info', "Error updating ", event); reject(event); }; }; objectStoreRequest.onerror = function (event) { - logger('info', "Error " + event); + logger('info', "Error reading" + event); reject(event); }; }); From 4fac546e90c7cf446f50d0c4969b78985e7a5342 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Wed, 15 Jul 2020 16:16:07 +0200 Subject: [PATCH 003/146] https://github.com/Portree-Kid/flightgear-airports/issues/42 --- src/renderer/components/ParkingEdit.vue | 91 +++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/ParkingEdit.vue b/src/renderer/components/ParkingEdit.vue index f98f2b2..a3e216a 100644 --- a/src/renderer/components/ParkingEdit.vue +++ b/src/renderer/components/ParkingEdit.vue @@ -82,6 +82,18 @@ {{type}} + + + Calculate : + + + + + + + + + Coordinates : @@ -93,12 +105,12 @@ width="200" trigger="hover" content="D.DDD, DMS, DM supported" + :disabled="!editing || calculate === 'Center'" > - + - Heading : @@ -127,7 +139,7 @@ :max="720" :step="0.1" :precision="1" - :disabled="!editing" + :disabled="!editing || calculate ==='Heading'" > @@ -174,14 +186,33 @@ From 1075e8d4660abf952c195f41fe9a2d84134728d7 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Tue, 28 Jul 2020 12:22:47 +0200 Subject: [PATCH 020/146] https://github.com/Portree-Kid/flightgear-airports/issues/77 --- src/renderer/components/EditBar.vue | 2 +- src/renderer/components/RunScan.vue | 30 +++++++++++++++++++++++++++++ src/renderer/utils/scan.js | 10 ++++++---- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/EditBar.vue b/src/renderer/components/EditBar.vue index 69780be..a808b45 100644 --- a/src/renderer/components/EditBar.vue +++ b/src/renderer/components/EditBar.vue @@ -204,7 +204,7 @@ You should have received a copy of the GNU General Public License along with FG console.log('make a check worker: ', path.resolve(__dirname, 'check.js')) const worker = new Worker(winURL) - worker.onError = function(e) { + worker.onerror = function(e) { worker.terminate() worker.view.max = 0 worker.view.checkDialogVisible = false diff --git a/src/renderer/components/RunScan.vue b/src/renderer/components/RunScan.vue index c1acb6b..cb1c79c 100644 --- a/src/renderer/components/RunScan.vue +++ b/src/renderer/components/RunScan.vue @@ -74,6 +74,16 @@ const worker = new Worker(winURL) console.log(fileUrl('src/renderer/utils/worker.js')) + worker.onerror = function (e) { + console.error(e) + worker.terminate() + worker.scanning = false + worker.view.progress = 0 + worker.view.max = 0 + worker.view.worker = null + clearInterval(this.polling) + e.preventDefault() + } worker.scanning = this.scanning worker.max = this.max @@ -121,6 +131,16 @@ const worker = new Worker(winURL) console.log(fileUrl('src/renderer/utils/worker.js')) + worker.onerror = function (e) { + console.error(e) + worker.terminate() + worker.scanning = false + worker.view.progress = 0 + worker.view.max = 0 + worker.view.worker = null + clearInterval(this.polling) + e.preventDefault() + } worker.scanning = this.scanning worker.max = this.max @@ -169,6 +189,16 @@ const worker = new Worker(winURL) console.log(fileUrl('src/renderer/utils/worker.js')) + worker.onerror = function (e) { + console.error(e) + worker.terminate() + worker.scanning = false + worker.view.progress = 0 + worker.view.max = 0 + worker.view.worker = null + clearInterval(this.polling) + e.preventDefault() + } this.scanning = true worker.scanning = this.scanning worker.max = this.max diff --git a/src/renderer/utils/scan.js b/src/renderer/utils/scan.js index 478e728..dd951e0 100644 --- a/src/renderer/utils/scan.js +++ b/src/renderer/utils/scan.js @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with FG * @param {*} callback */ +const { Debugger } = require("electron"); + async function asyncForEach(array, callback) { logger('info', "AsyncForEach Len " + array.length); for (let index = 0; index < array.length; index++) { @@ -46,7 +48,7 @@ async function scanGroundnetFiles(p, features) { try { logger('info', 'Start Groundnets ' + p); var files = traverseDir(p); - this.postMessage(['max', files.length]); + this.postMessage(['max', files.length*2]); logger('info', files); asyncForEach(files, async f => { @@ -376,6 +378,7 @@ function store(icao, airlines, value) { async function readGroundnet(f, features) { var promise = new Promise(function (resolve, reject) { try { + var thisPostMessage = this.postMessage; var filename = path.basename(f).match('^([^.]+)\\.([^.]+)(\\.new)?\\.([^.]+)'); if (filename == null) { resolve("File didn't match"); @@ -470,12 +473,10 @@ async function readGroundnet(f, features) { } if(filename [3] === '.new') { feature['properties']['wipgroundnet'] = nodes && nodes.node ? nodes.node.length : 0; - //debugger; feature['properties']['wipparking'] = parkingnodes && parkingnodes.Parking ? parkingnodes.Parking.length : 0; } else { feature['properties']['groundnet'] = nodes && nodes.node ? nodes.node.length : 0; - //debugger; feature['properties']['parking'] = parkingnodes && parkingnodes.Parking ? parkingnodes.Parking.length : 0; } } @@ -490,6 +491,7 @@ async function readGroundnet(f, features) { // report on the success of the transaction completing, when everything is done transaction.oncomplete = function (event) { logger('info', 'Write Transaction complete ' + event); + thisPostMessage(['progress', 1]); resolve("Stored " + filename[1]); }; @@ -512,7 +514,7 @@ async function readGroundnet(f, features) { }; } objectStoreRequest.onerror = function (event) { - logger('info', "Read Errpr : " + event); + logger('info', "Read Error : " + event); resolve(event); } } From c569e45a6e63432dbb7fc9098a94a054f0eaaf40 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Tue, 28 Jul 2020 21:39:40 +0200 Subject: [PATCH 021/146] https://github.com/Portree-Kid/flightgear-airports/issues/72 --- src/renderer/store/modules/Editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/modules/Editable.js b/src/renderer/store/modules/Editable.js index c8f1d82..1c10641 100644 --- a/src/renderer/store/modules/Editable.js +++ b/src/renderer/store/modules/Editable.js @@ -94,7 +94,7 @@ const mutations = { Vue.set(state.data.arc, 'name', arcName) }, 'SET_EDIT_PUSHBACK' (state, isPushBackRoute) { - Vue.set(state.data.arc, 'isPushBackRoute', isPushBackRoute) + Vue.set(state.data.arc, 'isPushBackRoute', Number(isPushBackRoute)) }, 'SET_EDIT_DIRECTION' (state, direction) { Vue.set(state.data.arc, 'direction', direction) From 2178061b55663ecfbe17ad0ca22fd5c58bdee7a6 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Wed, 29 Jul 2020 13:56:28 +0200 Subject: [PATCH 022/146] Msgs --- src/renderer/utils/check_msg.json | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/renderer/utils/check_msg.json b/src/renderer/utils/check_msg.json index 7497839..fc2c09d 100644 --- a/src/renderer/utils/check_msg.json +++ b/src/renderer/utils/check_msg.json @@ -1,29 +1,29 @@ { - "LONG_ROUTE_START" : ["Start of long route", "Long description"], - "LONG_ROUTE_END": ["End of long route", "Long description"], - "EDGE_MISSING_DIRECTION": ["Edge missing direction", "Long description"], - "NO_RUNWAY_ROUTE": ["No way from parking to each runway", "Long description"], - "NO_PARKING_ROUTE": ["No way from runway to each parking", "Long description"], - "NO_PARKINGS": ["No parkings", "Long description"], - "NO_RUNWAYNODES": ["No Runwaynodes", "Long description"], - "NOT_LEGIT_END": ["Node not a legimate end", "Long description"], - "UNKNOWN_RADIUS" :["Unknown radius", "Long description"], - "OVERLAPPING_PARKINGS" :["Overlapping parkings", "Long description"], - "NAME_EMPTY" :["Name empty", "Long description"], - "TYPE_EMPTY" :["Parking type empty", "Long description"], - "PARKING_TYPE_INVALID" :["Parking type not valid", "Long description"], - "DUAL_PUSHBACK": ["Dual runway/ pushback node", "Long description"], - "RUNWAY_NODE_NOT_ON_RUNWAY" : ["Runwaynode not on runway", "Long description"], - "NON_RUNWAYNODE_ON_RUNWAY": ["Non Runwaynode on runway", "Long description"], - "PARKINGS_VALID": ["Parkings valid", "Long description"], - "NO_OVERLAPPING_PARKINGS": ["No parkings overlapping", "Long description"], - "NO_INVALID_ENDS": ["No invalid ends", "Long description"], - "ROUTES_FROM_PARKINGS_OK": ["Routes from parkings OK", "Long description"], - "ROUTES_FROM_RUNWAYS_OK": ["Routes from runways OK", "Long description"], - "PUSHBACK_ROUTES_OK": ["Pushback routes OK", "Long description"], - "UNCONNECTED_PUSHBACK": ["Unconnected Pushbacknode", "Long description"], - "NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", "Long description"], - "MULTIPLE_PUSHBACK": ["Multiple connected pushback points", "Long description"], + "LONG_ROUTE_START" : ["Start of long route", "Route segments of >2km are Taxidraw artefacts"], + "LONG_ROUTE_END": ["End of long route", "Route segments of >2km are Taxidraw artefacts"], + "EDGE_MISSING_DIRECTION": ["Edge missing direction", ""], + "NO_RUNWAY_ROUTE": ["No way from parking to each runway", ""], + "NO_PARKING_ROUTE": ["No way from runway to each parking", ""], + "NO_PARKINGS": ["No parkings", ""], + "NO_RUNWAYNODES": ["No Runwaynodes", ""], + "NOT_LEGIT_END": ["Node not a legimate end", "Taxiroutes must end either at a parking or on a runway"], + "UNKNOWN_RADIUS" :["Unknown radius", "Radii must be one from the list"], + "OVERLAPPING_PARKINGS" :["Overlapping parkings", ""], + "NAME_EMPTY" :["Name empty", ""], + "TYPE_EMPTY" :["Parking type empty", ""], + "PARKING_TYPE_INVALID" :["Parking type not valid", ""], + "DUAL_PUSHBACK": ["Dual runway/ pushback node", "A runway node can not be a hold node at the same time"], + "RUNWAY_NODE_NOT_ON_RUNWAY" : ["Runwaynode not on runway", ""], + "NON_RUNWAYNODE_ON_RUNWAY": ["Non Runwaynode on runway", ""], + "PARKINGS_VALID": ["Parkings valid", ""], + "NO_OVERLAPPING_PARKINGS": ["No parkings overlapping", ""], + "NO_INVALID_ENDS": ["No invalid ends", ""], + "ROUTES_FROM_PARKINGS_OK": ["Routes from parkings OK", ""], + "ROUTES_FROM_RUNWAYS_OK": ["Routes from runways OK", ""], + "PUSHBACK_ROUTES_OK": ["Pushback routes OK", ""], + "UNCONNECTED_PUSHBACK": ["Unconnected Pushbacknode", ""], + "NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", ""], + "MULTIPLE_PUSHBACK": ["Multiple connected pushback points", ""], "PUSHBACK_NOT_CONNECTED": ["Pushback Holding Point not Connected to Pushback Route", ""], "TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", ""], "PUSHBACK_EXIT_NOT_BIDRECTIONAL": ["Pushback Holding Point Exit route is not bidirectional", ""], From 0499ee82c250ebaaa0c8046c72366fd653bd8ebb Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sat, 1 Aug 2020 07:23:26 +0200 Subject: [PATCH 023/146] https://github.com/Portree-Kid/flightgear-airports/issues/83 --- src/renderer/components/Airport.vue | 12 +++- src/renderer/components/EditLayer.vue | 20 ++----- src/renderer/components/FlightgearMap.vue | 64 ++++++++++++++++++++- src/renderer/components/LeafletSidebar.vue | 6 +- src/renderer/components/Upload.vue | 66 +++++++++++++++++++--- src/renderer/components/event-bus.js | 14 +++++ src/renderer/loaders/groundnet_loader.js | 6 +- src/renderer/loaders/pavement_loader.js | 6 ++ src/renderer/store/modules/Loading.js | 39 +++++++++++++ src/renderer/store/modules/Parkings.js | 12 ++++ 10 files changed, 213 insertions(+), 32 deletions(-) create mode 100644 src/renderer/components/event-bus.js create mode 100644 src/renderer/store/modules/Loading.js diff --git a/src/renderer/components/Airport.vue b/src/renderer/components/Airport.vue index 5b44f15..2509fc6 100644 --- a/src/renderer/components/Airport.vue +++ b/src/renderer/components/Airport.vue @@ -58,9 +58,12 @@ You should have received a copy of the GNU General Public License along with FG const $ = require('jquery'); import 'element-ui/lib/theme-chalk/index.css' import {removeWip} from '../loaders/groundnet_functions' + import Vue from 'vue' + import { EventBus } from './event-bus.js'; export default { name: 'airport', + components: { }, props: {airport: Object, editing: Boolean}, mounted () { this.$forceUpdate(); @@ -83,7 +86,14 @@ You should have received a copy of the GNU General Public License along with FG this.$store.dispatch('removeWip', this.airport.icao); }, upload() { - + let airports = this.$store.state.Airports.airports + .filter(a => a.properties.icao.match(this.airport.icao)) + if (airports.length > 0) { + this.$store.commit('CENTER', [airports[0].geometry.coordinates[1], airports[0].geometry.coordinates[0]]) + } + Vue.set(this.$parent.$parent.$parent, 'uploadVisible', true) + this.$parent.$parent.$parent.$refs.upload.status() + this.$parent.$parent.$parent.$refs.upload.check() } }, computed: { diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 3b864b2..b57ad19 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -22,6 +22,8 @@ You should have received a copy of the GNU General Public License along with FG import L2 from 'leaflet-textpath' import Vue from 'vue' import { MessageBox } from 'element-ui'; + import { EventBus } from './event-bus.js'; + const turf = require('@turf/turf') @@ -131,24 +133,12 @@ You should have received a copy of the GNU General Public License along with FG l.addListeners() } }) - /* - this.groundnetLayerGroup.eachLayer(l => { - if (l instanceof L.TaxiwaySegment) { - var decorator = L.polylineDecorator(l, { - pattern: [ - // defines a pattern of 10px-wide dashes, repeated every 20px on the line - {offset: 5, repeat: 50, symbol: L.Symbol.arrowHead({pixelSize: 15, pathOptions: {fillOpacity: 1, weight: 0}})} - ] - }) - decorator.addTo(this.$parent.mapObject) - } - }) - */ - console.log(this.groundnetLayerGroup.maxId) this.groundnetLayerGroup.addTo(this.$parent.mapObject) this.icao = icao + console.log(EventBus) + EventBus.$emit('i-got-clicked', 1); }, visible (feature) { let bounds = this.$store.state.Settings.bounds @@ -644,7 +634,7 @@ You should have received a copy of the GNU General Public License along with FG if (this.featureLookup===undefined) { return } - console.log('Edited Parkings : ' + this.$store.state.Parkings.items) + console.debug('Edited Parkings : ' + this.$store.state.Parkings.items) this.$store.state.Parkings.items.forEach( newElement => { console.debug(newElement); if(this.featureLookup[newElement.index]) { diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index e5f7682..5256ded 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -78,6 +78,64 @@ You should have received a copy of the GNU General Public License along with FG name: 'flightgear-map', components: { LMap, LTileLayer, LMarker, LCircle, LeafletSidebar, AiLayer, EditBar, ToolBar, EditLayer, PavementLayer, LLayerGroup, LControl, ThresholdLayer, ToolLayer }, props: [], + created () { + this.loadingInstance = null + this.$store.watch( + function (state) { + return state.Loading.groundnetLoaded + }, + (newValue, oldValue) => { + // debugger + console.log('groundnetLoaded ' + oldValue + ' => ' + newValue + ' ' + this.groundnetLoaded + ' ' + this.pavementLoaded + ' ' + this.loadingInstance) + if (newValue !== oldValue) { + this.groundnetLoaded = newValue + if (!(this.groundnetLoaded && + this.pavementLoaded) && + (this.loadingInstance === null || this.loadingInstance === undefined)) { + this.loadingInstance = Loading.service({ fullscreen: false }) + } + if (this.groundnetLoaded && + this.pavementLoaded && + this.loadingInstance !== null) { + this.loadingInstance.close() + this.loadingInstance = null + } + } + } + , + { + deep: false, + immediate: true + } + ) + this.$store.watch( + function (state) { + return state.Loading.pavementLoaded + }, + (newValue, oldValue) => { + console.log('pavementLoaded ' + oldValue + ' => ' + newValue + ' ' + this.groundnetLoaded + ' ' + this.pavementLoaded + ' ' + this.loadingInstance) + if (newValue !== oldValue) { + this.pavementLoaded = newValue + if (!(this.groundnetLoaded && + this.pavementLoaded) && + (this.loadingInstance === null || this.loadingInstance === undefined)) { + this.loadingInstance = Loading.service({ fullscreen: false }) + } + if (this.groundnetLoaded && + this.pavementLoaded && + this.loadingInstance !== null) { + this.loadingInstance.close() + this.loadingInstance = null + } + } + } + , + { + deep: false, + immediate: true + } + ) + }, mounted () { this.$store.dispatch('getAirports') this.$store.subscribe((mutation, state) => { @@ -88,13 +146,10 @@ You should have received a copy of the GNU General Public License along with FG .filter(feature => this.visible(feature)) .map(feature => feature.properties.icao) if (airportsToLoad.length > 0 && airportsToLoad[0] !== this.editingAirport && this.zoom > 12) { - let loadingInstance = Loading.service({ fullscreen: true }) - this.$nextTick(() => { // Loading should be closed asynchronously this.$refs.pavementLayer.load(airportsToLoad[0]) this.$refs.editLayer.load(airportsToLoad[0]) this.$refs.thresholdLayer.load(airportsToLoad[0]) - loadingInstance.close() this.editingAirport = airportsToLoad[0] }) } @@ -111,6 +166,9 @@ You should have received a copy of the GNU General Public License along with FG }, data () { return { + loadingInstance: Object, + groundnetLoaded: false, + pavementLoaded: false, url: 'https://a.tile.openstreetmap.de/{z}/{x}/{y}.png', attribution: 'Flightgear Airports ' + require('electron').remote.app.getVersion() + ' Electron ' + diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index 3d16c98..6f6b406 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -11,6 +11,7 @@ You should have received a copy of the GNU General Public License along with FG --> diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index c845d84..5ac564f 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -68,6 +68,16 @@ You should have received a copy of the GNU General Public License along with FG deep: true //add this if u need to watch object properties change etc. } ); + this.$store.watch( + function (state) { + return state.Editable.data.multiarc; + }, + () => { this.editedMultiArc() } + , + { + deep: true //add this if u need to watch object properties change etc. + } + ); this.$store.watch( function (state) { return state.Editable.data.parking; @@ -658,6 +668,7 @@ You should have received a copy of the GNU General Public License along with FG !this.editing) { return; } + console.debug("Edit Type : " + this.$store.state.type); var arc = this.groundnetLayerGroup.getLayer(this.$store.state.Editable.index); if (arc && arc instanceof L.Polyline) { console.log('Edited Arc : ' + this.$store.state.Editable.index); @@ -665,6 +676,27 @@ You should have received a copy of the GNU General Public License along with FG arc.updateStyle(); } }, + editedMultiArc() { + if (!this.groundnetLayerGroup || + this.$store.state.Editable.data.multiarc === undefined || + this.$store.state.Editable.data.multiarc.ids === undefined || + this.featureLookup===undefined || + !this.editing) { + return; + } + console.debug("Edit Type : " + this.$store.state.Editable.data.multiarc.ids); + this.$store.state.Editable.data.multiarc.ids.forEach(id => { + console.debug(id); + var arc = this.groundnetLayerGroup.getLayer(id); + if (arc && arc instanceof L.Polyline) { + console.log('Edited Arc : ' + this.$store.state.Editable.index); + arc.options.attributes.direction = this.$store.state.Editable.data.multiarc.direction + arc.options.attributes.name = this.$store.state.Editable.data.multiarc.name + arc.options.attributes.isPushBackRoute = this.$store.state.Editable.data.multiarc.isPushBackRoute + arc.updateStyle(); + } + }); + }, //Update Node editedNode() { if (this.$store.state.Editable.index === undefined || @@ -824,11 +856,11 @@ You should have received a copy of the GNU General Public License along with FG this.$parent.mapObject.on('click', this.addParking) }, removeLayerClick (event) { - console.log(event) + console.debug(event) this.groundnetLayerGroup.removeLayer(event.target) }, addParking (event) { - console.log(event.latlng) + console.debug(event.latlng) if (event.latlng === undefined) { return } diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index 7002f4d..96e9fde 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -85,7 +85,7 @@ You should have received a copy of the GNU General Public License along with FG }, (newValue, oldValue) => { // debugger - console.log('setIcaoLoading ' + oldValue + ' => ' + newValue + ' ' + this.groundnetLoaded + ' ' + this.pavementLoaded + ' ' + this.loadingInstance) + console.log('setIcaoLoading ' + oldValue + ' => ' + newValue + ' groundnetLoaded ' + this.groundnetLoaded + ' pavementLoaded ' + this.pavementLoaded + ' ' + this.loadingInstance) if (newValue !== oldValue && newValue !== '') { this.groundnetLoaded = newValue if ((this.loadingInstance === null || this.loadingInstance === undefined)) { @@ -105,7 +105,7 @@ You should have received a copy of the GNU General Public License along with FG }, (newValue, oldValue) => { // debugger - console.log('groundnetLoaded ' + oldValue + ' => ' + newValue + ' ' + this.groundnetLoaded + ' ' + this.pavementLoaded + ' ' + this.loadingInstance) + console.log('groundnetLoaded ' + oldValue + ' => ' + newValue + ' groundnetLoaded ' + this.groundnetLoaded + ' pavementLoaded ' + this.pavementLoaded + ' ' + this.loadingInstance) if (newValue !== oldValue) { this.groundnetLoaded = newValue if (this.groundnetLoaded && diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index 746190d..967de5b 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -38,6 +38,7 @@ You should have received a copy of the GNU General Public License along with FG
+ @@ -74,6 +75,7 @@ You should have received a copy of the GNU General Public License along with FG import L from 'leaflet' import AirportEdit from './AirportEdit' import ArcEdit from './ArcEdit' + import ArcEditMulti from './ArcEditMulti' import CheckPanel from './CheckPanel' import FileSelect from './FileSelect' import Help from './Help' @@ -89,7 +91,7 @@ You should have received a copy of the GNU General Public License along with FG export default { name: 'leaflet-sidebar', - components: { Help, AirportEdit, ArcEdit, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, + components: { Help, AirportEdit, ArcEdit, ArcEditMulti, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, props: [], created () { window.addEventListener('keydown', this.doCommand) diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index 041b2e6..d048ef9 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -4,6 +4,7 @@ const Vue = require('vue'); var L = require('leaflet'); const store = require('../store'); const util = require('util'); +const assign = require('core-js/fn/object/assign'); const extendTaxiSegment = function (taxiwaySegment) { taxiwaySegment.__proto__.begin; @@ -36,7 +37,7 @@ const extendTaxiSegment = function (taxiwaySegment) { this.editLayer = editLayer; this._latlngs[0].glueindex = this.begin; this._latlngs.slice(-1)[0].glueindex = this.end; - if(this.featureLookup) { + if (this.featureLookup) { if (typeof this.featureLookup[this.begin] === 'undefined') { this.featureLookup[this.begin] = new Array(); } @@ -45,7 +46,7 @@ const extendTaxiSegment = function (taxiwaySegment) { } this.featureLookup[this.begin].push(this); this.featureLookup[this.end].push(this); - this.bidirectional = true; + this.bidirectional = true; } }; taxiwaySegment.__proto__.select = function () { @@ -53,50 +54,50 @@ const extendTaxiSegment = function (taxiwaySegment) { this.updateStyle(); }; taxiwaySegment.__proto__.selectVertex = function (index) { - this.getLatLngs().forEach( element => { - if (Number(element.glueindex) === index) { - if (element.__vertex._icon != null) { - element.__vertex.__proto__.deselect = function () { - if (this._icon != null) { - this._icon.style.setProperty('background-color','white'); - this._icon.style.setProperty('color','white'); - } else if (this.icon != null) { - if (this.icon.style != null) { - this.icon.style['background-color'] = 'white'; - } else { - this.setStyle({ color: 'white' }) + this.getLatLngs().forEach(element => { + if (Number(element.glueindex) === index) { + if (element.__vertex._icon != null) { + element.__vertex.__proto__.deselect = function () { + if (this._icon != null) { + this._icon.style.setProperty('background-color', 'white'); + this._icon.style.setProperty('color', 'white'); + } else if (this.icon != null) { + if (this.icon.style != null) { + this.icon.style['background-color'] = 'white'; + } else { + this.setStyle({ color: 'white' }) + } + } else if (this.options.icon != null) { + if (this.options.icon.style != null) { + this.options.icon.style['background-color'] = 'white'; + } else { + this.options.icon._setIconStyles({ color: 'white' }) + } + } } - } else if (this.options.icon != null) { - if (this.options.icon.style != null) { - this.options.icon.style['background-color'] = 'white'; + element.__vertex._icon.style.setProperty('background-color', 'red'); + element.__vertex._icon.style.setProperty('color', 'red'); + } else if (element.__vertex !== undefined && element.__vertex.icon != null) { + if (element.__vertex.icon.style != null) { + element.__vertex.icon.style['background-color'] = 'red'; } else { - this.options.icon._setIconStyles({ color: 'white' }) + element.__vertex.setStyle({ color: 'red' }) } - } + } else if (element.__vertex.options.icon != null) { + if (element.__vertex.options.icon.style != null) { + element.__vertex.options.icon.style['background-color'] = 'red'; + } else { + element.__vertex.options.icon._setIconStyles({ color: 'red' }) + } + } } - element.__vertex._icon.style.setProperty('background-color','red'); - element.__vertex._icon.style.setProperty('color','red'); - } else if (element.__vertex !== undefined && element.__vertex.icon != null) { - if (element.__vertex.icon.style != null) { - element.__vertex.icon.style['background-color'] = 'red'; - } else { - element.__vertex.setStyle({ color: 'red' }) - } - } else if (element.__vertex.options.icon != null) { - if (element.__vertex.options.icon.style != null) { - element.__vertex.options.icon.style['background-color'] = 'red'; - } else { - element.__vertex.options.icon._setIconStyles({ color: 'red' }) - } - } - } - }); + }); }; taxiwaySegment.__proto__.deselect = function () { this.options.attributes.selected = false; this.updateStyle(); - this.getLatLngs().forEach( element => { - if (element.__vertex!==undefined) { + this.getLatLngs().forEach(element => { + if (element.__vertex !== undefined) { if (element.__vertex._icon != null) { element.__vertex._icon.style['background-color'] = 'white'; } else if (element.__vertex.icon != null) { @@ -111,128 +112,170 @@ const extendTaxiSegment = function (taxiwaySegment) { } else { element.__vertex.options.icon._setIconStyles({ color: 'white' }) } - } + } } }); }; taxiwaySegment.__proto__.addListeners = function () { this.on('click', function (event) { - if (Number(store.default.state.Editable.index) >= 0 && - this.featureLookup[store.default.state.Editable.index] !== undefined) { + if (Number(store.default.state.Editable.index) >= 0 && + this.featureLookup[store.default.state.Editable.index] !== undefined) { this.featureLookup[store.default.state.Editable.index].forEach(element => { element.deselect(); }); } event.target.select(); - console.log("Click : " + event.target); - if (store.default.state.Editable.data.arc === undefined || - store.default.state.Editable.data.arc !== event.target.options.attributes) { - if (event.target.options.attributes === undefined) { - event.target.options.attributes = {}; - } - event.target.options.attributes.index = event.target._leaflet_id; + console.debug("Click : " + util.inspect(event.originalEvent)); + if (!event.originalEvent.ctrlKey) { + if (store.default.state.Editable.data.arc === undefined || + store.default.state.Editable.data.arc !== event.target.options.attributes) { + if (event.target.options.attributes === undefined) { + event.target.options.attributes = {}; + } + event.target.options.attributes.index = event.target._leaflet_id; - this.editLayer.featureLookup[event.target._leaflet_id] = []; - this.featureLookup[event.target._leaflet_id].push(this); - event.target.options.attributes.selected = true; - store.default.dispatch('setArc', event.target.options.attributes); - } + this.editLayer.featureLookup[event.target._leaflet_id] = []; + this.featureLookup[event.target._leaflet_id].push(this); + event.target.options.attributes.selected = true; + store.default.dispatch('setArc', event.target.options.attributes); + } + } else { + var arcs = event.target.expandArc(event.target.options.attributes); + var multiarc = {name: '', index: 900719925474099, ids: [] ,isPushBackRoute: null, direction: null}; + if (store.default.state.Editable.data.multiarc === undefined || + store.default.state.Editable.data.multiarc !== event.target.options.attributes) { + if (event.target.options.attributes === undefined) { + event.target.options.attributes = {}; + } + event.target.options.attributes.index = event.target._leaflet_id; + + this.editLayer.featureLookup[event.target._leaflet_id] = []; + this.featureLookup[event.target._leaflet_id].push(this); + event.target.options.attributes.selected = true; + + //multiarc.name = JSON.parse(JSON.stringify(event.target.options.attributes.name)); + //multiarc.isPushBackRoute = JSON.parse(JSON.stringify(event.target.options.attributes.isPushBackRoute)); + //multiarc.direction = JSON.parse(JSON.stringify(event.target.options.attributes.direction)); + if(event.target.options.attributes.name!==undefined) { + multiarc.name = assign(event.target.options.attributes.name); + } + multiarc.isPushBackRoute = assign(event.target.options.attributes.isPushBackRoute); + multiarc.direction = assign(event.target.options.attributes.direction); + + this.editLayer.featureLookup[900719925474099] = []; + + multiarc.ids = []; + + //TODO + store.default.dispatch('setMultiArc', multiarc); + } + var editLayer = this.editLayer; + arcs.forEach(id => { + console.debug(id); + var arc = editLayer.groundnetLayerGroup.getLayer(id); + if (arc && arc instanceof L.Polyline) { + editLayer.featureLookup[900719925474099].push(arc); + arc.select(); + } + }); + store.default.dispatch('setMultiArcIds', arcs); + } }); this.on('editable:drawing:move', function (event) { if (dragIndex >= 0) { this.selectVertex(dragIndex); - console.log('GlueDrag : '+ dragIndex + '\t' + event.target.dragIndex); + console.log('GlueDrag : ' + dragIndex + '\t' + event.target.dragIndex); this.follow(dragIndex, event); } }); this.on('editable:middlemarker:mousedown', event => { console.debug('editable:middlemarker:mousedown'); - } ), - this.on('editable:vertex:new', event => { - console.debug('editable:vertex:new ' + event.vertex.getIndex() + '\t' + event.vertex.getLastIndex() + '\t'); - // Find nearest node - let closest = this.editLayer.closestLayerSnap(event.latlng, 5) - let taxiwaySegment = event.latlng.__vertex.editor.feature; - if (taxiwaySegment.options.attributes === undefined) { - taxiwaySegment.options.attributes = { direction: 'bi-directional' }; - } - taxiwaySegment.updateStyle(); - if(event.vertex.getIndex() !== 0 && event.vertex.getIndex() !== event.vertex.getLastIndex()) { - var nextIndex = ++taxiwaySegment.editLayer.groundnetLayerGroup.maxId; - var splitOffNodes = taxiwaySegment.getLatLngs().splice(-1); - var remainingNodes = taxiwaySegment.getLatLngs(); - splitOffNodes.unshift(L.latLng(remainingNodes[1].lat, remainingNodes[1].lng, remainingNodes[1].alt)); - remainingNodes[1]['glueindex'] = nextIndex; - remainingNodes[1].attributes = { index: nextIndex, isOnRunway: 0 }; - taxiwaySegment.options.attributes.end = nextIndex; - splitOffNodes[0]['glueindex'] = nextIndex; - splitOffNodes[0].attributes = { index: nextIndex, isOnRunway: 0 }; - taxiwaySegment.setLatLngs(remainingNodes); - //taxiwaySegment.editor.refresh(); - //taxiwaySegment.editor.reset(); - if( splitOffNodes.length>1) { - var polyline = new L.Polyline(splitOffNodes, { attributes: {} }); - polyline.addTo(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); - polyline.addTo(taxiwaySegment.editLayer.groundnetLayerGroup); - extendTaxiSegment(polyline); - polyline.addListeners(); - polyline.setEditlayer(taxiwaySegment.editLayer); - polyline.enableEdit(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); - polyline.editor.refresh(); - //polyline.editor.reset(); - polyline.featureLookup = this.featureLookup; - polyline.options.attributes.name = taxiwaySegment.options.attributes.name; - polyline.options.attributes.direction = taxiwaySegment.options.attributes.direction; - polyline.options.attributes.isPushBackRoute = taxiwaySegment.options.attributes.isPushBackRoute; - polyline.options.attributes.begin = nextIndex; - polyline.options.attributes.end = taxiwaySegment.end; - polyline.updateStyle(); - polyline.begin = nextIndex; - polyline.end = taxiwaySegment.end; - taxiwaySegment.end = nextIndex; - this.editLayer.featureLookup[nextIndex] = []; - this.featureLookup[nextIndex].push(taxiwaySegment); - this.featureLookup[nextIndex].push(polyline); + }), + this.on('editable:vertex:new', event => { + console.debug('editable:vertex:new ' + event.vertex.getIndex() + '\t' + event.vertex.getLastIndex() + '\t'); + // Find nearest node + let closest = this.editLayer.closestLayerSnap(event.latlng, 5) + let taxiwaySegment = event.latlng.__vertex.editor.feature; + if (taxiwaySegment.options.attributes === undefined) { + taxiwaySegment.options.attributes = { direction: 'bi-directional' }; } - } else { - // Glue to another node - if (closest) { - event.latlng['glueindex'] = Number(closest.glueindex); - event.latlng.__vertex.setLatLng(closest.latlng); - event.latlng.attributes = { index: event.latlng.glueindex, isOnRunway: 0 }; - // Push Vertex to lookup - this.editLayer.featureLookup[event.latlng.glueindex].push(event.latlng.__vertex); - if (taxiwaySegment.options.attributes.begin === undefined) { - taxiwaySegment.options.attributes.begin = event.latlng['glueindex'] - } else { - taxiwaySegment.options.attributes.end = event.latlng['glueindex'] - } - if (taxiwaySegment.getLatLngs().length === 1) { - taxiwaySegment.begin = closest.glueindex; - } - taxiwaySegment.end = closest.glueindex; - console.log(`Closest : ${closest}`) - } else { - event.vertex.latlng['glueindex'] = ++this.editLayer.groundnetLayerGroup.maxId; - event.vertex.latlng.attributes = { index: event.vertex.latlng.glueindex, isOnRunway: 0 }; - this.editLayer.featureLookup[event.vertex.latlng.glueindex] = []; - this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(event.vertex); - this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(taxiwaySegment); - // taxiwaySegment.editor.refresh(); + taxiwaySegment.updateStyle(); + if (event.vertex.getIndex() !== 0 && event.vertex.getIndex() !== event.vertex.getLastIndex()) { + var nextIndex = ++taxiwaySegment.editLayer.groundnetLayerGroup.maxId; + var splitOffNodes = taxiwaySegment.getLatLngs().splice(-1); + var remainingNodes = taxiwaySegment.getLatLngs(); + splitOffNodes.unshift(L.latLng(remainingNodes[1].lat, remainingNodes[1].lng, remainingNodes[1].alt)); + remainingNodes[1]['glueindex'] = nextIndex; + remainingNodes[1].attributes = { index: nextIndex, isOnRunway: 0 }; + taxiwaySegment.options.attributes.end = nextIndex; + splitOffNodes[0]['glueindex'] = nextIndex; + splitOffNodes[0].attributes = { index: nextIndex, isOnRunway: 0 }; + taxiwaySegment.setLatLngs(remainingNodes); + //taxiwaySegment.editor.refresh(); //taxiwaySegment.editor.reset(); - if (taxiwaySegment.options.attributes.begin === undefined) { - taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex'] - taxiwaySegment.begin = event.vertex.latlng.glueindex; - } else if (taxiwaySegment.options.attributes.end === undefined || - (taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex && - Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex) !== taxiwaySegment.options.attributes.end)) { - taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex'] - taxiwaySegment.end = Number(event.vertex.latlng.glueindex); + if (splitOffNodes.length > 1) { + var polyline = new L.Polyline(splitOffNodes, { attributes: {} }); + polyline.addTo(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); + polyline.addTo(taxiwaySegment.editLayer.groundnetLayerGroup); + extendTaxiSegment(polyline); + polyline.addListeners(); + polyline.setEditlayer(taxiwaySegment.editLayer); + polyline.enableEdit(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); + polyline.editor.refresh(); + //polyline.editor.reset(); + polyline.featureLookup = this.featureLookup; + polyline.options.attributes.name = taxiwaySegment.options.attributes.name; + polyline.options.attributes.direction = taxiwaySegment.options.attributes.direction; + polyline.options.attributes.isPushBackRoute = taxiwaySegment.options.attributes.isPushBackRoute; + polyline.options.attributes.begin = nextIndex; + polyline.options.attributes.end = taxiwaySegment.end; + polyline.updateStyle(); + polyline.begin = nextIndex; + polyline.end = taxiwaySegment.end; + taxiwaySegment.end = nextIndex; + this.editLayer.featureLookup[nextIndex] = []; + this.featureLookup[nextIndex].push(taxiwaySegment); + this.featureLookup[nextIndex].push(polyline); + } + } else { + // Glue to another node + if (closest) { + event.latlng['glueindex'] = Number(closest.glueindex); + event.latlng.__vertex.setLatLng(closest.latlng); + event.latlng.attributes = { index: event.latlng.glueindex, isOnRunway: 0 }; + // Push Vertex to lookup + this.editLayer.featureLookup[event.latlng.glueindex].push(event.latlng.__vertex); + if (taxiwaySegment.options.attributes.begin === undefined) { + taxiwaySegment.options.attributes.begin = event.latlng['glueindex'] + } else { + taxiwaySegment.options.attributes.end = event.latlng['glueindex'] + } + if (taxiwaySegment.getLatLngs().length === 1) { + taxiwaySegment.begin = closest.glueindex; + } + taxiwaySegment.end = closest.glueindex; + console.log(`Closest : ${closest}`) + } else { + event.vertex.latlng['glueindex'] = ++this.editLayer.groundnetLayerGroup.maxId; + event.vertex.latlng.attributes = { index: event.vertex.latlng.glueindex, isOnRunway: 0 }; + this.editLayer.featureLookup[event.vertex.latlng.glueindex] = []; + this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(event.vertex); + this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(taxiwaySegment); + // taxiwaySegment.editor.refresh(); + //taxiwaySegment.editor.reset(); + if (taxiwaySegment.options.attributes.begin === undefined) { + taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex'] + taxiwaySegment.begin = event.vertex.latlng.glueindex; + } else if (taxiwaySegment.options.attributes.end === undefined || + (taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex && + Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex) !== taxiwaySegment.options.attributes.end)) { + taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex'] + taxiwaySegment.end = Number(event.vertex.latlng.glueindex); + } } } - } - //this.splitShape(taxiwaySegment.getLatLngs(), ) - }); + //this.splitShape(taxiwaySegment.getLatLngs(), ) + }); this.on('editable:vertex:deleted', event => { console.debug('editable:vertex:deleted') }); @@ -251,7 +294,7 @@ const extendTaxiSegment = function (taxiwaySegment) { if (Number(store.default.state.Editable.index) >= 0 && this.featureLookup[store.default.state.Editable.index] !== undefined) { this.featureLookup[store.default.state.Editable.index].forEach(element => { - if(element.deselect !== undefined) { + if (element.deselect !== undefined) { element.deselect(); } }); @@ -268,7 +311,7 @@ const extendTaxiSegment = function (taxiwaySegment) { this.editLayer.featureLookup[event.vertex.latlng.glueindex].forEach store.default.dispatch('setNode', event.vertex.latlng) this.selectVertex(store.default.state.Editable.index) - } + } } }); var dragIndex = -1; @@ -282,7 +325,7 @@ const extendTaxiSegment = function (taxiwaySegment) { if (Number(store.default.state.Editable.index) >= 0 && this.featureLookup[store.default.state.Editable.index] !== undefined) { this.featureLookup[store.default.state.Editable.index].forEach(element => { - if(element.deselect !== undefined) { + if (element.deselect !== undefined) { element.deselect(); } }); @@ -297,7 +340,7 @@ const extendTaxiSegment = function (taxiwaySegment) { parking[0].selectParking(); } else { this.selectVertex(Number(dragIndex)) - } + } } }); this.on('editable:vertex:dragend', function (event) { @@ -316,29 +359,79 @@ const extendTaxiSegment = function (taxiwaySegment) { if (parking.length > 0) { parking[0].selectParking(); } else { - if( Number(event.vertex.latlng.glueindex) !== store.default.state.Editable.index) { + if (Number(event.vertex.latlng.glueindex) !== store.default.state.Editable.index) { if (Number(store.default.state.Editable.index) >= 0 && - this.featureLookup[store.default.state.Editable.index] !== undefined) { - this.featureLookup[store.default.state.Editable.index].forEach(element => { - if(element.deselect !== undefined) { + this.featureLookup[store.default.state.Editable.index] !== undefined) { + this.featureLookup[store.default.state.Editable.index].forEach(element => { + if (element.deselect !== undefined) { element.deselect(); } }); - } - store.default.dispatch('setNode', event.vertex.latlng) + } + store.default.dispatch('setNode', event.vertex.latlng) } var lines = this.featureLookup[event.vertex.latlng.glueindex].filter(n => n instanceof L.Polyline); Vue.default.nextTick(function () { - lines.forEach( line => { + lines.forEach(line => { line.selectVertex(store.default.state.Editable.index) }); }) - } + } } catch (error) { console.error(error); } }); }; + + taxiwaySegment.__proto__.expandArc = function (attributes) { + var isPushBackRoute = attributes.isPushBackRoute; + var ids = []; + var walkedNodes = []; + var segmentIds = []; + console.debug('start Walk'); + ids = ids.concat(this.walkPushbackRoute(attributes.begin, walkedNodes, isPushBackRoute)); + ids = ids.concat(this.walkPushbackRoute(attributes.end, walkedNodes, isPushBackRoute)); + return ids; + } + + taxiwaySegment.__proto__.walkPushbackRoute = function (index, walkedNodes, isPushBackRoute) { + console.debug('Walk Level'); + walkedNodes.push(index) + var segmentIds = []; + var polyLines = this.featureLookup[index].filter(n => n instanceof L.Polyline); + if (polyLines===undefined || polyLines.length>2) { + console.debug('Walk ' + index + '\t' + polyLines.length); + return; + } + + polyLines.forEach(l => { + segmentIds.push(l._leaflet_id); + console.debug('Walk Next ' + index + '\t' + + (walkedNodes.indexOf(index)<0) + '\t'+ + l.begin + '\t'+ + (walkedNodes.indexOf(Number(l.begin))<0) + '\t'+ + l.end + '\t'+ + (walkedNodes.indexOf(Number(l.end))<0) + '\t'+ + l.options.attributes.direction + '\t' + + l.options.attributes.begin + '\t' + + l.options.attributes.end); + console.debug('Walk isPushBackRoute ' + l.options.attributes.isPushBackRoute + '\t' + isPushBackRoute + '\t' + (l.options.attributes.isPushBackRoute === isPushBackRoute)); + if(l.options.attributes.isPushBackRoute === isPushBackRoute ) { + console.debug(Number(l.begin) === index && walkedNodes.indexOf(Number(l.end)) < 0); + if (Number(l.begin) === index && walkedNodes.indexOf(Number(l.end)) < 0) { + console.debug( 'Walk forward ' + l.options.attributes.direction ); + segmentIds = segmentIds.concat(this.walkPushbackRoute(Number(l.end), walkedNodes, isPushBackRoute)) + } + console.debug(Number(l.end) === index && walkedNodes.indexOf(Number(l.begin)) < 0); + if (Number(l.end) === index && walkedNodes.indexOf(Number(l.begin)) < 0 ) { + console.debug( 'Walk backward ' + l.options.attributes.direction ); + segmentIds = segmentIds.concat(this.walkPushbackRoute(Number(l.begin), walkedNodes, isPushBackRoute)) + } + } + }); + return segmentIds; + } + /** * */ @@ -403,7 +496,7 @@ const extendTaxiSegment = function (taxiwaySegment) { style.color = '#3388ff'; } this.setStyle(style); - if(this._map !== null) { + if (this._map !== null) { if (this.options.attributes.direction === 'forward') { this.setText(null); this.setText(' > ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) @@ -413,8 +506,8 @@ const extendTaxiSegment = function (taxiwaySegment) { } else { this.setText(null); } - - } + + } }; }; diff --git a/src/renderer/store/modules/Editable.js b/src/renderer/store/modules/Editable.js index 1c10641..b1633fe 100644 --- a/src/renderer/store/modules/Editable.js +++ b/src/renderer/store/modules/Editable.js @@ -4,12 +4,13 @@ const state = { type: 'none', index: 'none', editing: false, - data: {airports: {}, parking: {}, arc: {}, node: {}, runway: {}} + data: {airports: {}, parking: {}, arc: {}, multiarc: {}, node: {}, runway: {}} } const SET_EDIT_AIRPORT = 'SET_EDIT_AIRPORT' const SET_EDIT_PARKING = 'SET_EDIT_PARKING' const SET_EDIT_ARC = 'SET_EDIT_ARC' +const SET_EDIT_MULTI_ARC = 'SET_EDIT_MULTI_ARC' const SET_EDIT_RUNWAY = 'SET_EDIT_RUNWAY' const mutations = { @@ -62,6 +63,29 @@ const mutations = { Vue.set(state, 'index', arc.index) Vue.set(state, 'type', 'arc') }, + SET_EDIT_MULTI_ARC (state, arc) { + if (arc === undefined) { + return + } + if (!state.data || state.type !== 'multiarc') { + Vue.set(state, 'data', {}) + } + Vue.set(state.data, 'multiarc', arc) + if (state.data.multiarc.name === undefined) { + Vue.set(state.data.multiarc, 'name', '') + } + Vue.set(state, 'index', arc.index) + Vue.set(state, 'type', 'multiarc') + }, + 'SET_EDIT_MULTI_ARC_IDS' (state, arcs) { + if (arcs === undefined) { + return + } + if (!state.data || state.type !== 'multiarc') { + return + } + state.data.multiarc.ids = state.data.multiarc.ids.concat(arcs.filter(n => n).filter((v, i, a) => a.indexOf(v) === i)) + }, 'SET_EDIT_PARKING_NAME' (state, parkingName) { Vue.set(state.data.parking, 'name', parkingName) }, @@ -91,13 +115,25 @@ const mutations = { Vue.set(state.data.parking, 'coords', coords) }, 'SET_EDIT_ARC_NAME' (state, arcName) { - Vue.set(state.data.arc, 'name', arcName) + if (state.type === 'arc') { + Vue.set(state.data.arc, 'name', arcName) + } else { + Vue.set(state.data.multiarc, 'name', arcName) + } }, 'SET_EDIT_PUSHBACK' (state, isPushBackRoute) { - Vue.set(state.data.arc, 'isPushBackRoute', Number(isPushBackRoute)) + if (state.type === 'arc') { + Vue.set(state.data.arc, 'isPushBackRoute', Number(isPushBackRoute)) + } else { + Vue.set(state.data.multiarc, 'isPushBackRoute', Number(isPushBackRoute)) + } }, 'SET_EDIT_DIRECTION' (state, direction) { - Vue.set(state.data.arc, 'direction', direction) + if (state.type === 'arc') { + Vue.set(state.data.arc, 'direction', direction) + } else { + Vue.set(state.data.multiarc, 'direction', direction) + } }, 'SET_EDIT_HOLDPOINTTYPE' (state, holdPointType) { Vue.set(state.data.node, 'holdPointType', holdPointType) @@ -132,6 +168,12 @@ const actions = { async setArc (context, arc) { context.commit(SET_EDIT_ARC, arc) }, + async setMultiArc (context, arc) { + context.commit(SET_EDIT_MULTI_ARC, arc) + }, + async setMultiArcIds (context, arc) { + context.commit('SET_EDIT_MULTI_ARC_IDS', arc) + }, async setNode (context, node) { context.commit('SET_EDIT_NODE', node.attributes) context.commit('SET_EDIT_NODE_COORDS', node.lat.toFixed(6) + ' ' + node.lng.toFixed(6)) diff --git a/src/renderer/store/modules/Loading.js b/src/renderer/store/modules/Loading.js index 75a16ee..d6cc7bf 100644 --- a/src/renderer/store/modules/Loading.js +++ b/src/renderer/store/modules/Loading.js @@ -31,9 +31,15 @@ const actions = { context.commit('SET_ICAO_LOADING', p) }, async setGroundnetLoaded (context, p) { + if (typeof p !== 'boolean') { + console.error('Not Boolean') + } context.commit('SET_GROUNDNET_LOADED', p) }, async setPavementLoaded (context, p) { + if (typeof p !== 'boolean') { + console.error('Not Boolean') + } context.commit('SET_PAVEMENT_LOADED', p) } } From e13127de4b1cf41b2ef98cec2a890bf6159b9b77 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Wed, 18 Nov 2020 22:03:35 +0100 Subject: [PATCH 056/146] #101 --- src/renderer/loaders/groundnet_writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index 3d5e686..a908f8e 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -206,7 +206,7 @@ var mapParkings = function (o) { console.debug(o.options.attributes.airlineCodes); parking['@airlineCodes'] = o.options.attributes.airlineCodes; } - if(o.options.attributes.number) { + if(o.options.attributes.number && o.options.attributes.number.trim() !== '') { console.debug(o.options.attributes.number); parking['@number'] = o.options.attributes.number; } From 41376bb130a2596c63d8e528a3e0073a3f04e2e1 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Thu, 19 Nov 2020 22:29:50 +0100 Subject: [PATCH 057/146] #61 Layercontrol fixed --- src/renderer/components/FlightgearMap.vue | 8 ++++++++ src/renderer/loaders/groundnet_writer.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index 96e9fde..a723f00 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -208,12 +208,20 @@ You should have received a copy of the GNU General Public License along with FG if (this.$refs.pavementLayer.getLayer() === e.layer) { // debugger var l = this.layersControl._layers.filter(l => l.name === 'APT Layer') + if (l.length > 0 && l[0].layer !== this.$refs.pavementLayer.getLayer()) { + this.layersControl.removeLayer(l[0].layer) + this.layersControl.addOverlay(this.$refs.pavementLayer.getLayer(), 'APT Layer') + } if (l.length === 0) { this.layersControl.addOverlay(this.$refs.pavementLayer.getLayer(), 'APT Layer') } } if (this.$refs.thresholdLayer.getLayer() === e.layer) { l = this.layersControl._layers.filter(l => l.name === 'Threshold Layer') + if (l.length > 0 && l[0].layer !== this.$refs.thresholdLayer.getLayer()) { + this.layersControl.removeLayer(l[0].layer) + this.layersControl.addOverlay(this.$refs.thresholdLayer.getLayer(), 'Threshold Layer') + } if (l.length === 0) { this.layersControl.addOverlay(this.$refs.thresholdLayer.getLayer(), 'Threshold Layer') } diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index a908f8e..155dbaf 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -206,7 +206,7 @@ var mapParkings = function (o) { console.debug(o.options.attributes.airlineCodes); parking['@airlineCodes'] = o.options.attributes.airlineCodes; } - if(o.options.attributes.number && o.options.attributes.number.trim() !== '') { + if(o.options.attributes.number !== undefined && o.options.attributes.number.trim() !== '') { console.debug(o.options.attributes.number); parking['@number'] = o.options.attributes.number; } From 56284283bf056a231b65451c62b8b0f3bee11c09 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sat, 21 Nov 2020 20:19:53 +0100 Subject: [PATCH 058/146] #51 Add Version --- src/renderer/components/Help.vue | 29 ++++++++++++++++-------- src/renderer/loaders/groundnet_writer.js | 7 +++++- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/renderer/components/Help.vue b/src/renderer/components/Help.vue index 5118886..582e14a 100644 --- a/src/renderer/components/Help.vue +++ b/src/renderer/components/Help.vue @@ -1,7 +1,18 @@ + @@ -51,7 +60,9 @@ }, computed: { - + version: function () { + return ' Flightgear Airports ' + require('electron').remote.app.getVersion() + } } } diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index 155dbaf..4fc2c74 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -206,7 +206,12 @@ var mapParkings = function (o) { console.debug(o.options.attributes.airlineCodes); parking['@airlineCodes'] = o.options.attributes.airlineCodes; } - if(o.options.attributes.number !== undefined && o.options.attributes.number.trim() !== '') { + if(o.options.attributes.number !== undefined && + typeof o.options.attributes.number === 'number' || ( + typeof o.options.attributes.number === 'string' && + o.options.attributes.number.trim() !== '' + ) + ) { console.debug(o.options.attributes.number); parking['@number'] = o.options.attributes.number; } From a43a6c476bb38fa994bb9c718ce33c26ca70413c Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 22 Nov 2020 14:20:03 +0100 Subject: [PATCH 059/146] Multiline Edit --- src/renderer/components/ArcEditMulti.vue | 2 +- src/renderer/store/modules/Editable.js | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/ArcEditMulti.vue b/src/renderer/components/ArcEditMulti.vue index fdefe0b..753eafc 100644 --- a/src/renderer/components/ArcEditMulti.vue +++ b/src/renderer/components/ArcEditMulti.vue @@ -84,7 +84,7 @@ You should have received a copy of the GNU General Public License along with FG // getter get: function () { return this.$store.state.Editable.data.multiarc.isPushBackRoute === '1' || - this.$store.state.Editable.data.multiarc.isPushBackRoute === 1 + Number(this.$store.state.Editable.data.multiarc.isPushBackRoute) === Number(1) }, // setter set: function (newValue) { diff --git a/src/renderer/store/modules/Editable.js b/src/renderer/store/modules/Editable.js index b1633fe..45270bf 100644 --- a/src/renderer/store/modules/Editable.js +++ b/src/renderer/store/modules/Editable.js @@ -1,3 +1,15 @@ +/** +Copyright 2020 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ + import Vue from 'vue' const state = { @@ -68,13 +80,15 @@ const mutations = { return } if (!state.data || state.type !== 'multiarc') { - Vue.set(state, 'data', {}) + Vue.set(state, 'data', {multiarc: {}}) } - Vue.set(state.data, 'multiarc', arc) + Vue.set(state.data.multiarc, 'isPushBackRoute', arc.isPushBackRoute) + Vue.set(state.data.multiarc, 'direction', arc.direction) if (state.data.multiarc.name === undefined) { Vue.set(state.data.multiarc, 'name', '') } Vue.set(state, 'index', arc.index) + Vue.set(state, 'type', 'multiarc') }, 'SET_EDIT_MULTI_ARC_IDS' (state, arcs) { @@ -84,6 +98,9 @@ const mutations = { if (!state.data || state.type !== 'multiarc') { return } + if (state.data.multiarc.ids === undefined) { + state.data.multiarc.ids = [] + } state.data.multiarc.ids = state.data.multiarc.ids.concat(arcs.filter(n => n).filter((v, i, a) => a.indexOf(v) === i)) }, 'SET_EDIT_PARKING_NAME' (state, parkingName) { From 3a9c1cd3c233d898fc9ae11217cc24a0cc33ff23 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Mon, 23 Nov 2020 07:05:09 +0100 Subject: [PATCH 060/146] #66 --- src/renderer/components/EditLayer.vue | 5 ++- src/renderer/components/FlightgearMap.vue | 5 +++ .../loaders/TaxiwaySegmentExtender.js | 31 +++++++++++++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 5ac564f..6f15642 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -139,7 +139,10 @@ You should have received a copy of the GNU General Public License along with FG } this.groundnetLayerGroup.eachLayer(l => { if (l instanceof L.TaxiwaySegment) { - l.addListeners() + l.addListeners() + } + if (l.updateArrows !== undefined) { + l.updateArrows(this.$store.state.Settings.zoom) } }) console.log(this.groundnetLayerGroup.maxId) diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index a723f00..473d276 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -327,6 +327,11 @@ You should have received a copy of the GNU General Public License along with FG this.$refs.airportLayer.setVisible(zoom < 12) this.$refs.pavementLayer.setVisible(zoom >= 12) } + this.$refs.editLayer.groundnetLayerGroup.eachLayer(function (layer) { + if (layer.updateArrows !== undefined) { + layer.updateArrows(zoom) + } + }) }, async centerUpdated (center) { if (center !== this.$store.state.Settings.center) { diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index d048ef9..0ae0130 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -485,8 +485,35 @@ const extendTaxiSegment = function (taxiwaySegment) { }) }; + taxiwaySegment.__proto__.updateArrows = function (zoom) { + if (this.options.attributes.direction === 'forward') { + this.setText(null); + if (zoom <= 16) { + this.setText(' >', { repeat: true, offset: 6, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 15px serif;' } }) + } else if (zoom <= 19 ) { + this.setText(' > ', { repeat: true, offset: 7, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 20px serif;' } }) + } else { + this.setText(' > ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) + } + } else if (this.options.attributes.direction === 'backward') { + this.setText(null); + if (zoom <= 16) { + this.setText(' <', { repeat: true, offset: 6, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 15px serif;' } }) + } else if (zoom <= 19 ) { + this.setText(' < ', { repeat: true, offset: 7, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 20px serif;' } }) + } else { + this.setText(' < ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) + } + } else { + this.setText(null); + } + } + taxiwaySegment.__proto__.updateStyle = function () { var style = {}; + if(!this.options.attributes) { + return; + } if (this.options.attributes.selected) { style.color = 'red'; } else if (this.options.attributes.isPushBackRoute) { @@ -499,10 +526,10 @@ const extendTaxiSegment = function (taxiwaySegment) { if (this._map !== null) { if (this.options.attributes.direction === 'forward') { this.setText(null); - this.setText(' > ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) + this.setText(' > ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) } else if (this.options.attributes.direction === 'backward') { this.setText(null); - this.setText(' < ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) + this.setText(' < ', { repeat: true, offset: 10, attributes: { fill: 'red', style: 'vertical-align: bottom; vertical-align: bottom; font-weight: bold; font: bold 30px serif;' } }) } else { this.setText(null); } From 91c1d93fd3c2e9f0869d2a7c776c49cf8c338e48 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Mon, 7 Dec 2020 22:19:27 +0100 Subject: [PATCH 061/146] Towerlayer --- src/renderer/components/FlightgearMap.vue | 26 ++++- src/renderer/components/ThresholdLayer.vue | 2 +- src/renderer/components/TowerLayer.vue | 104 ++++++++++++++++++ .../loaders/TaxiwaySegmentExtender.js | 3 + src/renderer/loaders/Threshold.js | 11 ++ src/renderer/loaders/Tower.js | 84 ++++++++++++++ src/renderer/loaders/tower_loader.js | 83 ++++++++++++++ static/tower.svg | 78 +++++++++++++ 8 files changed, 386 insertions(+), 5 deletions(-) create mode 100644 src/renderer/components/TowerLayer.vue create mode 100644 src/renderer/loaders/Tower.js create mode 100644 src/renderer/loaders/tower_loader.js create mode 100644 static/tower.svg diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index 473d276..79e97b7 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -30,8 +30,6 @@ You should have received a copy of the GNU General Public License along with FG - - + + + @@ -60,6 +61,7 @@ You should have received a copy of the GNU General Public License along with FG import ToolBar from './ToolBar' import EditLayer from './EditLayer' import ToolLayer from './ToolLayer' + import TowerLayer from './TowerLayer' import PavementLayer from './PavementLayer' import ThresholdLayer from './ThresholdLayer' @@ -75,7 +77,7 @@ You should have received a copy of the GNU General Public License along with FG }) export default { name: 'flightgear-map', - components: { LMap, LTileLayer, LMarker, LCircle, LeafletSidebar, AiLayer, EditBar, ToolBar, EditLayer, PavementLayer, LLayerGroup, LControl, ThresholdLayer, ToolLayer }, + components: { LMap, LTileLayer, LMarker, LCircle, LeafletSidebar, AiLayer, EditBar, ToolBar, EditLayer, TowerLayer, PavementLayer, LLayerGroup, LControl, ThresholdLayer, ToolLayer }, props: [], created () { this.loadingInstance = null @@ -160,6 +162,7 @@ You should have received a copy of the GNU General Public License along with FG this.$refs.pavementLayer.load(airportsToLoad[0]) this.$refs.editLayer.load(airportsToLoad[0]) this.$refs.thresholdLayer.load(airportsToLoad[0]) + this.$refs.towerLayer.load(airportsToLoad[0]) this.editingAirport = airportsToLoad[0] }) } @@ -169,7 +172,6 @@ You should have received a copy of the GNU General Public License along with FG if (this.$refs.airportLayer) { this.$refs.airportLayer.setVisible(this.zoom < 12) } - // console.log(this.groundnet) } }) @@ -226,6 +228,16 @@ You should have received a copy of the GNU General Public License along with FG this.layersControl.addOverlay(this.$refs.thresholdLayer.getLayer(), 'Threshold Layer') } } + if (this.$refs.towerLayer.getLayer() === e.layer) { + l = this.layersControl._layers.filter(l => l.name === 'Tower Layer') + if (l.length > 0 && l[0].layer !== this.$refs.towerLayer.getLayer()) { + this.layersControl.removeLayer(l[0].layer) + this.layersControl.addOverlay(this.$refs.towerLayer.getLayer(), 'Tower Layer') + } + if (l.length === 0) { + this.layersControl.addOverlay(this.$refs.towerLayer.getLayer(), 'Tower Layer') + } + } }, onSelectedPolygon (ring) { var parkings = this.$refs.editLayer.getParkings(ring) @@ -242,6 +254,7 @@ You should have received a copy of the GNU General Public License along with FG this.$refs.map.mapObject.options.minZoom = 1 } this.$refs.editLayer.enableEdit() + this.$refs.towerLayer.enableEdit() this.$refs.editBar.setEditing(event) this.$refs.toolBar.setEditing(event) this.$refs.sidebar.setEditing(event) @@ -325,6 +338,7 @@ You should have received a copy of the GNU General Public License along with FG if (zoom !== this.$store.state.Settings.zoom) { this.$store.dispatch('setZoom', zoom) this.$refs.airportLayer.setVisible(zoom < 12) + this.$refs.towerLayer.setVisible(this.zoom >= 12) this.$refs.pavementLayer.setVisible(zoom >= 12) } this.$refs.editLayer.groundnetLayerGroup.eachLayer(function (layer) { @@ -332,11 +346,15 @@ You should have received a copy of the GNU General Public License along with FG layer.updateArrows(zoom) } }) + if (this.$refs.towerLayer) { + this.$refs.towerLayer.zoomUpdated() + } }, async centerUpdated (center) { if (center !== this.$store.state.Settings.center) { this.$store.dispatch('setCenter', center) this.$refs.airportLayer.setVisible(this.zoom < 12) + this.$refs.towerLayer.setVisible(this.zoom >= 12) this.$refs.pavementLayer.setVisible(this.zoom >= 12) } }, diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index 4f8c779..4ba902b 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -68,7 +68,7 @@ edit: function () { console.log('Zoom : ' + this.$store.state.Settings.zoom) if (this.$store.state.Settings.zoom > 12) { - console.log() + console.log('Zoom above 12') } } } diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue new file mode 100644 index 0000000..3718b94 --- /dev/null +++ b/src/renderer/components/TowerLayer.vue @@ -0,0 +1,104 @@ + + + + + + diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index 0ae0130..073cac5 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -486,6 +486,9 @@ const extendTaxiSegment = function (taxiwaySegment) { }; taxiwaySegment.__proto__.updateArrows = function (zoom) { + if( this._map === null) { + return; + } if (this.options.attributes.direction === 'forward') { this.setText(null); if (zoom <= 16) { diff --git a/src/renderer/loaders/Threshold.js b/src/renderer/loaders/Threshold.js index 9038342..b50f506 100644 --- a/src/renderer/loaders/Threshold.js +++ b/src/renderer/loaders/Threshold.js @@ -1,3 +1,14 @@ +/* +Copyright 2020 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ /* eslint-disable */ const convert = require('geo-coordinates-parser'); const leaflet = require('leaflet'); diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js new file mode 100644 index 0000000..efe5e84 --- /dev/null +++ b/src/renderer/loaders/Tower.js @@ -0,0 +1,84 @@ +/* +Copyright 2020 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ +/* eslint-disable */ + +const convert = require('geo-coordinates-parser'); +const fs = require('fs'); +const path = require('path'); + +/**http://wiki.openstreetmap.org/wiki/Zoom_levels*/ + + +L.TowerMarker = L.Marker.extend({ + options: { + zIndexOffset: 10000, + }, + + initialize: function (latlng, options) { + L.Marker.prototype.initialize(latlng, options); + L.Util.setOptions(this, options); + this.svg = this.stripSVG('tower.svg'); + + this.isDragging = false; + }, + updateProperties: function(properties) { + this.heading = properties.heading; + this.updateIcon(); + }, + stripSVG: function(fName) { + var rx = /<\s*svg[^>]*>([\s\S]*)<\s*\/svg[^>]*>/gm; + var svg = fs.readFileSync(path.join(__static, '/', fName), 'utf8'); + var svg2 = rx.exec(svg); + return svg2[0]; + }, + updateIcon : function(map) { + if(map !== null) { + var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); + if(this._metersPP != metersPP) { + console.debug('Meters per pixel ' + metersPP); + var pixelSize = 32 / metersPP; + var scale = pixelSize/64; + var offset = -(64/2); + this.setIcon(L.divIcon({ + iconSize: null, + className: 'aircraft-marker-icon', + html: `
${this.svg}
`, + })); + this._metersPP = metersPP; + } + } + }, + onAdd : function(map) { + var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); + console.debug('Meters per pixel ' + metersPP); + this.updateIcon(map); + }, + metersPerPixel: function (latitude, zoomLevel) { + var earthCircumference = 40075017; + var latitudeRadians = latitude * (Math.PI / 180); + return earthCircumference * Math.cos(latitudeRadians) / Math.pow(2, zoomLevel + 8); + }, + + pixelValue: function (latitude, meters, zoomLevel) { + return meters / metersPerPixel(latitude, zoomLevel); + }, + + +}); + +//Builds a marker for a ai or multiplayer aircraft +var tower = function (n, options) { + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); + return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], options); +} + +module.exports = tower; diff --git a/src/renderer/loaders/tower_loader.js b/src/renderer/loaders/tower_loader.js new file mode 100644 index 0000000..e898bd1 --- /dev/null +++ b/src/renderer/loaders/tower_loader.js @@ -0,0 +1,83 @@ +/* +Copyright 2020 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ +/* eslint-disable */ +const fs = require('fs'); +const path = require('path'); +var xamel = require('xamel'); +const convert = require('geo-coordinates-parser'); + +const store = require('../store'); + +const util = require('util'); + +const tower = require('./Tower.js'); + + +var $ = require('jquery'); + +exports.readTowerXML = function (fDir, icao, force) { + try { + var layerGroup = L.layerGroup(); + layerGroup.maxId = 0; + var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.twr.xml'); + var fNew = path.join(fDir, icao[0], icao[1], icao[2], icao + '.twr.new.xml'); + + if (f == null || !fs.existsSync(f)) + return; + if (fNew != null && fs.existsSync(fNew) && !force) { + f = fNew; + } + + var features = new Array(); + + // map.on("editable:vertex:new", function (event) { + // log.console("Add vertex " + event); + // }); + + var xmlGroundnet = fs.readFileSync(f, 'utf8').toString(); + xamel.parse(xmlGroundnet, function (err, xml) { + console.debug("parsed " + path.basename(f)); + if (err !== null) { + console.error("Error in " + airline); + throw err; + } + + var towerNodes = xml.find('PropertyList/tower/twr'); + console.log("Tower " + towerNodes.length); + + var merged = new Array(); + + var nodesLookup = {}; + featureLookup = []; + + + towerNodes.map(n => { + var towerIcon = tower(n, layerGroup); + towerIcon.addTo(layerGroup); + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); + /* + var marker = new L.Circle([latlon.decimalLatitude, latlon.decimalLongitude], 5); + marker.addTo(layerGroup); + */ + + features.push(towerIcon); + }).sort(); + + return layerGroup; + }); + // var jsonAirports = JSON.parse(geoJSON); + // return jsonAirports; + } catch (error) { + console.error(error); + } + return layerGroup; +}; \ No newline at end of file diff --git a/static/tower.svg b/static/tower.svg new file mode 100644 index 0000000..93d5265 --- /dev/null +++ b/static/tower.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + From f4bc2f47ceed54e7465b5e3af8751a47e840b94c Mon Sep 17 00:00:00 2001 From: portree_kid Date: Tue, 8 Dec 2020 21:52:35 +0100 Subject: [PATCH 062/146] Threshold icons --- src/renderer/components/FlightgearMap.vue | 23 ++- src/renderer/components/ThresholdLayer.vue | 8 + src/renderer/loaders/Threshold.js | 191 +++++++-------------- src/renderer/loaders/Tower.js | 4 +- src/renderer/loaders/threshold_loader.js | 12 +- static/FGA_ACT_A_GA.svg | 2 + static/FGA_ACT_B_PROP.svg | 2 + static/FGA_ACT_B_SHORTEN.svg | 2 + static/FGA_ACT_C.svg | 3 + static/FGA_ACT_D.svg | 2 + static/FGA_ACT_E.svg | 2 + static/FGA_ACT_F.svg | 17 ++ static/FGA_THR.svg | 89 ++++++++++ 13 files changed, 220 insertions(+), 137 deletions(-) create mode 100644 static/FGA_ACT_A_GA.svg create mode 100644 static/FGA_ACT_B_PROP.svg create mode 100644 static/FGA_ACT_B_SHORTEN.svg create mode 100644 static/FGA_ACT_C.svg create mode 100644 static/FGA_ACT_D.svg create mode 100644 static/FGA_ACT_E.svg create mode 100644 static/FGA_ACT_F.svg create mode 100644 static/FGA_THR.svg diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index 79e97b7..ca6eade 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -162,7 +162,9 @@ You should have received a copy of the GNU General Public License along with FG this.$refs.pavementLayer.load(airportsToLoad[0]) this.$refs.editLayer.load(airportsToLoad[0]) this.$refs.thresholdLayer.load(airportsToLoad[0]) - this.$refs.towerLayer.load(airportsToLoad[0]) + if (this.$refs.towerLayer) { + this.$refs.towerLayer.load(airportsToLoad[0]) + } this.editingAirport = airportsToLoad[0] }) } @@ -228,7 +230,7 @@ You should have received a copy of the GNU General Public License along with FG this.layersControl.addOverlay(this.$refs.thresholdLayer.getLayer(), 'Threshold Layer') } } - if (this.$refs.towerLayer.getLayer() === e.layer) { + if (this.$refs.towerLayer !== undefined && this.$refs.towerLayer.getLayer() === e.layer) { l = this.layersControl._layers.filter(l => l.name === 'Tower Layer') if (l.length > 0 && l[0].layer !== this.$refs.towerLayer.getLayer()) { this.layersControl.removeLayer(l[0].layer) @@ -338,7 +340,12 @@ You should have received a copy of the GNU General Public License along with FG if (zoom !== this.$store.state.Settings.zoom) { this.$store.dispatch('setZoom', zoom) this.$refs.airportLayer.setVisible(zoom < 12) - this.$refs.towerLayer.setVisible(this.zoom >= 12) + if (this.$refs.towerLayer) { + this.$refs.towerLayer.setVisible(this.zoom >= 12) + } + if (this.$refs.thresholdLayer) { + this.$refs.thresholdLayer.setVisible(this.zoom >= 12) + } this.$refs.pavementLayer.setVisible(zoom >= 12) } this.$refs.editLayer.groundnetLayerGroup.eachLayer(function (layer) { @@ -346,6 +353,9 @@ You should have received a copy of the GNU General Public License along with FG layer.updateArrows(zoom) } }) + if (this.$refs.thresholdLayer) { + this.$refs.thresholdLayer.zoomUpdated() + } if (this.$refs.towerLayer) { this.$refs.towerLayer.zoomUpdated() } @@ -354,7 +364,12 @@ You should have received a copy of the GNU General Public License along with FG if (center !== this.$store.state.Settings.center) { this.$store.dispatch('setCenter', center) this.$refs.airportLayer.setVisible(this.zoom < 12) - this.$refs.towerLayer.setVisible(this.zoom >= 12) + if (this.$refs.thresholdLayer) { + this.$refs.thresholdLayer.setVisible(this.zoom >= 12) + } + if (this.$refs.towerLayer) { + this.$refs.towerLayer.setVisible(this.zoom >= 12) + } this.$refs.pavementLayer.setVisible(this.zoom >= 12) } }, diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index 4ba902b..545186a 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -62,7 +62,15 @@ this.visible = visible } } + }, + zoomUpdated () { + this.layerGroup.eachLayer(l => { + if (l instanceof L.Threshold) { + l.updateIcon(this.$parent.mapObject) + } + }) } + }, computed: { edit: function () { diff --git a/src/renderer/loaders/Threshold.js b/src/renderer/loaders/Threshold.js index b50f506..27d3e57 100644 --- a/src/renderer/loaders/Threshold.js +++ b/src/renderer/loaders/Threshold.js @@ -10,143 +10,76 @@ FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY W You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. */ /* eslint-disable */ + const convert = require('geo-coordinates-parser'); -const leaflet = require('leaflet'); -const turf = require('@turf/turf'); -const util = require('util'); -const store = require('../store'); +const fs = require('fs'); +const path = require('path'); -var $ = require('jquery'); -L.Threshold = L.Circle.extend({ - select() { - var style = {}; - style['color'] = 'red'; - this.setStyle(style); - }, - addListeners: function () { - this.on('editable:drawing:move', function (event) { - console.log("Move : ", event); - console.log("Move : ", event.latlng); - // Is it the edit vertex (Middle) moving? - if(event.target.editor._resizeLatLng.__vertex._icon !== event.sourceTarget._element){ - event.target.setLatLng(event.latlng); - event.target.updateVertexFromDirection(); - this.follow(event.target.id, event); +/**http://wiki.openstreetmap.org/wiki/Zoom_levels*/ + + +L.Threshold = L.Marker.extend({ + options: { + zIndexOffset: 20000, + }, + stripSVG: function(fName) { + var rx = /<\s*svg[^>]*>([\s\S]*)<\s*\/svg[^>]*>/gm; + var svg = fs.readFileSync(path.join(__static, '/', fName), 'utf8'); + var svg2 = rx.exec(svg); + return svg2[0]; + }, + updateIcon : function(map) { + console.debug(`Lat Lng Threshold ${this.getLatLng()}`); + if(map !== null) { + var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); + console.debug('Old Meters per pixel ' + this.metersPP); + console.debug('New Meters per pixel ' + metersPP); + if(this._metersPP != metersPP) { + var pixelSize = (this.iconSize/2) / metersPP; + var scale = pixelSize/this.iconSize; + var offset = 0;//-(this.iconSize/2); + this.setIcon(L.divIcon({ + iconSize: 64, + className: 'threshold-marker-icon', + html: `
${this.svg}
`, + })); + + this.update(this.getLatLng()); + console.debug(); + this.setLatLng(this.getLatLng()); + this._metersPP = metersPP; } - else if(event.target.editor._resizeLatLng.__vertex._icon === event.sourceTarget._element) { - event.target.updateDirectionFromVertex(); - event.target.updateVertexFromDirection(); - } - }); - /* - this.on('editable:vertex:drag', function (event) { - console.log("Drag : ", event); - }); - */ - this.on('click', function (event) { - console.log("Click : " + event.target); - store.default.dispatch('setParking', event.target.options.attributes); - this.select(); - this.unwatch = store.default.watch( - function (state) { - return state.Editable.data.parking; - }, - () => { - if (event.target instanceof L.Threshold) { - event.target.setStyle({color : '#3388ff'}); - this.unwatch(); - } - } - , - { - deep: true //add this if u need to watch object properties change etc. - } - ); - }); - this.on('editable:vertex:clicked', function (event) { - console.log(this.featureLookup[event.vertex.glueindex]); - if(event.target.editor._resizeLatLng.__vertex._icon !== event.sourceTarget._element){ - event.vertex._icon.style['background-color'] = 'red'; - store.default.dispatch('setParking', event.target.options.attributes); - this.unwatch = store.default.watch( - function (state) { - return state.Editable.data.parking; - }, - () => { - event.target.setStyle({color : '#3388ff'}); - this.unwatch(); - } - , - { - deep: true //add this if u need to watch object properties change etc. - } - ); + } + }, + onAdd : function(map) { + var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); + this.updateIcon(map); + }, + metersPerPixel: function (latitude, zoomLevel) { + var earthCircumference = 40075017; + var latitudeRadians = latitude * (Math.PI / 180); + return earthCircumference * Math.cos(latitudeRadians) / Math.pow(2, zoomLevel + 8); + }, - } - - }); - - this.on('editable:disable', function (event) { - event.target.removeDirection(); - }); - }, - updateStyle: function () { - - }, - turfToLatLng: function (turfPoint) { - return {lat: turfPoint.geometry.coordinates[1], lng: turfPoint.geometry.coordinates[0]}; - }, - extensions: function (editLayer) { - this.createDirection(); - if (typeof this.featureLookup[this.id] === 'undefined') { - this.featureLookup[this.id] = []; - } - this.featureLookup[this.id].push(this); - }, - - _getLatRadius: function () { - return this._mRadius; - }, - - _getLngRadius: function () { - return this._mRadius; + pixelValue: function (latitude, meters, zoomLevel) { + return meters / metersPerPixel(latitude, zoomLevel); }, + }); -var threshold = function (n, layerGroup) { - //console.log(n.attr('lat') + " " + n.attr('lon')); - var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); - //console.log(latlon.decimalLatitude); - //console.log(convert(n.attr('lat') + " " + n.attr('lon')).decimalLongitude); - const circle = new L.Threshold([latlon.decimalLatitude, latlon.decimalLongitude], { radius: 10, attributes: {} }); - circle.on('editable:enable', function (event) { - // event.target.createDirection(); - }); - /* - -*/ - //circle.attributes = { type: n.attr('type'), name: n.attr('name'), radius: Number(n.attr('radius')), airlineCodes: n.attr('airlineCodes'), heading: Number(n.attr('heading')) }; +L.Threshold.addInitHook(function(){ + this.svg = this.stripSVG('FGA_THR.svg'); + this.iconSize = 500; +}); - $.each( n.attrs, function( key, value ) { - console.log( '$', circle.id, key , value); - - if(isNaN(value)) - circle.options.attributes[ key ] = value; - else - circle.options.attributes[ key ] = Number( value); - }); - circle.addTo(layerGroup); - return circle; +//Builds a marker for a ai or multiplayer aircraft +var threshold = function (n, options) { + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); + var heading = n.find('hdg-deg/text()').text(); + + var marker = new L.Threshold([latlon.decimalLatitude, latlon.decimalLongitude], {heading: heading}); + return marker; } -module.exports = threshold; \ No newline at end of file +module.exports = threshold; diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js index efe5e84..0180eac 100644 --- a/src/renderer/loaders/Tower.js +++ b/src/renderer/loaders/Tower.js @@ -49,8 +49,8 @@ L.TowerMarker = L.Marker.extend({ var scale = pixelSize/64; var offset = -(64/2); this.setIcon(L.divIcon({ - iconSize: null, - className: 'aircraft-marker-icon', + iconSize: 64, + className: 'tower-marker-icon', html: `
${this.svg}
`, })); this._metersPP = metersPP; diff --git a/src/renderer/loaders/threshold_loader.js b/src/renderer/loaders/threshold_loader.js index 9b6b5da..31ae532 100644 --- a/src/renderer/loaders/threshold_loader.js +++ b/src/renderer/loaders/threshold_loader.js @@ -50,8 +50,16 @@ exports.readThresholdXML = function (fDir, icao, force) { thresholdNodes.map(n => { - var circle = threshold(n, layerGroup); - features.push(circle); + var icon = threshold(n); + icon.addTo(layerGroup); + + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); + /* + var marker = new L.Circle([latlon.decimalLatitude, latlon.decimalLongitude], 5); + marker.addTo(layerGroup); + */ + +// features.push(circle); }).sort(); return layerGroup; diff --git a/static/FGA_ACT_A_GA.svg b/static/FGA_ACT_A_GA.svg new file mode 100644 index 0000000..ea3bfb2 --- /dev/null +++ b/static/FGA_ACT_A_GA.svg @@ -0,0 +1,2 @@ + + diff --git a/static/FGA_ACT_B_PROP.svg b/static/FGA_ACT_B_PROP.svg new file mode 100644 index 0000000..cfb1b14 --- /dev/null +++ b/static/FGA_ACT_B_PROP.svg @@ -0,0 +1,2 @@ + + diff --git a/static/FGA_ACT_B_SHORTEN.svg b/static/FGA_ACT_B_SHORTEN.svg new file mode 100644 index 0000000..9fffc0e --- /dev/null +++ b/static/FGA_ACT_B_SHORTEN.svg @@ -0,0 +1,2 @@ + + diff --git a/static/FGA_ACT_C.svg b/static/FGA_ACT_C.svg new file mode 100644 index 0000000..1353d30 --- /dev/null +++ b/static/FGA_ACT_C.svg @@ -0,0 +1,3 @@ + + +image/svg+xml diff --git a/static/FGA_ACT_D.svg b/static/FGA_ACT_D.svg new file mode 100644 index 0000000..87895c4 --- /dev/null +++ b/static/FGA_ACT_D.svg @@ -0,0 +1,2 @@ + + diff --git a/static/FGA_ACT_E.svg b/static/FGA_ACT_E.svg new file mode 100644 index 0000000..502a9a4 --- /dev/null +++ b/static/FGA_ACT_E.svg @@ -0,0 +1,2 @@ + + diff --git a/static/FGA_ACT_F.svg b/static/FGA_ACT_F.svg new file mode 100644 index 0000000..fee4f5e --- /dev/null +++ b/static/FGA_ACT_F.svg @@ -0,0 +1,17 @@ + + + + + + +image/svg+xml + + + + + + + + + + diff --git a/static/FGA_THR.svg b/static/FGA_THR.svg new file mode 100644 index 0000000..aa41794 --- /dev/null +++ b/static/FGA_THR.svg @@ -0,0 +1,89 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + From edf0e23f8b42c70ac2913472d154dc9322f11668 Mon Sep 17 00:00:00 2001 From: Paterson Date: Tue, 15 Dec 2020 18:01:07 +0100 Subject: [PATCH 063/146] Migrate to Node v14.15.1 --- .electron-vue/webpack.renderer.config.js | 12 + .electron-vue/webpack.web.config.js | 13 +- package-lock.json | 282 ++++++++++++++--------- package.json | 3 +- 4 files changed, 196 insertions(+), 114 deletions(-) diff --git a/.electron-vue/webpack.renderer.config.js b/.electron-vue/webpack.renderer.config.js index e95ac70..6f4a90d 100644 --- a/.electron-vue/webpack.renderer.config.js +++ b/.electron-vue/webpack.renderer.config.js @@ -125,6 +125,18 @@ let rendererConfig = { new HtmlWebpackPlugin({ filename: 'index.html', template: path.resolve(__dirname, '../src/index.ejs'), + templateParameters(compilation, assets, options) { + return { + compilation: compilation, + webpack: compilation.getStats().toJson(), + webpackConfig: compilation.options, + htmlWebpackPlugin: { + files: assets, + options: options + }, + process, + }; + }, minify: { collapseWhitespace: true, removeAttributeQuotes: true, diff --git a/.electron-vue/webpack.web.config.js b/.electron-vue/webpack.web.config.js index bde6701..497e512 100644 --- a/.electron-vue/webpack.web.config.js +++ b/.electron-vue/webpack.web.config.js @@ -97,7 +97,18 @@ let webConfig = { new HtmlWebpackPlugin({ filename: 'index.html', template: path.resolve(__dirname, '../src/index.ejs'), - minify: { + templateParameters(compilation, assets, options) { + return { + compilation: compilation, + webpack: compilation.getStats().toJson(), + webpackConfig: compilation.options, + htmlWebpackPlugin: { + files: assets, + options: options + }, + process, + }; + }, minify: { collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true diff --git a/package-lock.json b/package-lock.json index 013c229..7f8865e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.21", + "version": "0.0.26", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1976,6 +1976,7 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "dev": true, + "optional": true, "requires": { "es6-promisify": "^5.0.0" } @@ -4232,13 +4233,15 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.1.tgz", "integrity": "sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==", - "dev": true + "dev": true, + "optional": true }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, + "optional": true, "requires": { "hoek": "2.x.x" } @@ -4467,7 +4470,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz", "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==", - "dev": true + "dev": true, + "optional": true }, "buffer-xor": { "version": "1.0.3", @@ -7267,13 +7271,15 @@ "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true + "dev": true, + "optional": true }, "es6-promisify": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "dev": true, + "optional": true, "requires": { "es6-promise": "^4.0.3" } @@ -8674,7 +8680,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -8695,12 +8702,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8715,17 +8724,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -8842,7 +8854,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -8854,6 +8867,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -8868,6 +8882,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -8875,12 +8890,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -8899,6 +8916,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -8979,7 +8997,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -8991,6 +9010,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -9076,7 +9096,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -9112,6 +9133,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -9131,6 +9153,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -9174,12 +9197,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -9881,7 +9906,8 @@ "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true + "dev": true, + "optional": true }, "home-or-tmp": { "version": "2.0.0", @@ -10064,6 +10090,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", "dev": true, + "optional": true, "requires": { "agent-base": "4", "debug": "3.1.0" @@ -10384,6 +10411,7 @@ "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", "dev": true, + "optional": true, "requires": { "httpreq": ">=0.4.22", "underscore": "~1.7.0" @@ -10393,7 +10421,8 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", - "dev": true + "dev": true, + "optional": true }, "https-browserify": { "version": "1.0.0", @@ -10569,9 +10598,9 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -10728,12 +10757,6 @@ "loose-envify": "^1.0.0" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -11039,7 +11062,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true + "dev": true, + "optional": true }, "is-regex": { "version": "1.0.4", @@ -11633,15 +11657,6 @@ "readable-stream": "^2.0.5" } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, "leaflet": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.5.1.tgz", @@ -11689,13 +11704,15 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", - "dev": true + "dev": true, + "optional": true }, "libmime": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", "dev": true, + "optional": true, "requires": { "iconv-lite": "0.4.15", "libbase64": "0.1.0", @@ -11706,7 +11723,8 @@ "version": "0.4.15", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", - "dev": true + "dev": true, + "optional": true } } }, @@ -11714,7 +11732,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", - "dev": true + "dev": true, + "optional": true }, "lineclip": { "version": "1.1.5", @@ -13160,9 +13179,9 @@ "dev": true }, "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -13172,14 +13191,14 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -13260,13 +13279,15 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", - "dev": true + "dev": true, + "optional": true }, "nodemailer-shared": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", "dev": true, + "optional": true, "requires": { "nodemailer-fetch": "1.6.0" } @@ -13299,7 +13320,8 @@ "version": "0.1.10", "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", - "dev": true + "dev": true, + "optional": true }, "nopt": { "version": "3.0.6", @@ -13731,15 +13753,6 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -13870,7 +13883,8 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "optional": true } } }, @@ -16087,90 +16101,130 @@ } }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "locate-path": "^3.0.0" } }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -16574,13 +16628,15 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz", "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==", - "dev": true + "dev": true, + "optional": true }, "smtp-connection": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", "dev": true, + "optional": true, "requires": { "httpntlm": "1.6.1", "nodemailer-shared": "1.1.0" @@ -16890,6 +16946,7 @@ "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.2.tgz", "integrity": "sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ==", "dev": true, + "optional": true, "requires": { "ip": "^1.1.5", "smart-buffer": "4.0.2" @@ -16900,6 +16957,7 @@ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "dev": true, + "optional": true, "requires": { "agent-base": "~4.2.1", "socks": "~2.3.2" @@ -16910,6 +16968,7 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "dev": true, + "optional": true, "requires": { "es6-promisify": "^5.0.0" } @@ -18246,7 +18305,8 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true + "dev": true, + "optional": true }, "union-value": { "version": "1.0.1", diff --git a/package.json b/package.json index fd4ca44..17646a7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "build": "node .electron-vue/build.js && electron-builder", "build:dir": "node .electron-vue/build.js && electron-builder --dir", "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", - "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js", "dev": "SET NODE_ENV=development&& node .electron-vue/dev-runner.js", "e2e": "npm run pack && mocha test/e2e", "lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test", @@ -170,7 +169,7 @@ "mocha": "^5.2.0", "multispinner": "^0.2.1", "node-loader": "^0.6.0", - "node-sass": "^4.9.2", + "node-sass": "^4.14.1", "require-dir": "^1.0.0", "sass-loader": "^7.0.3", "spectron": "^3.8.0", From 9e82084e525eac78339fa1e6f7252d717c2db077 Mon Sep 17 00:00:00 2001 From: Paterson Date: Fri, 18 Dec 2020 21:44:03 +0100 Subject: [PATCH 064/146] Path cleaned --- src/index.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ejs b/src/index.ejs index 1749ec7..6172fbc 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -6,7 +6,7 @@ <% if (htmlWebpackPlugin.options.nodeModules) { %> <% } %> From 0bb3021e3c68d2f75775f7094a2111dc854c7091 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 21 Dec 2020 16:35:31 +0100 Subject: [PATCH 065/146] Undefined layer if not found --- src/renderer/components/FlightgearMap.vue | 17 ++++++++------- src/renderer/components/ThresholdLayer.vue | 12 ++++++----- src/renderer/components/TowerLayer.vue | 24 +++++++++++++--------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index ca6eade..2d7cefa 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -196,7 +196,6 @@ You should have received a copy of the GNU General Public License along with FG }, methods: { ready (e) { - console.log(e) e.on('layeradd', this.onLayerAdd) }, onLayerAdd (e) { @@ -220,7 +219,7 @@ You should have received a copy of the GNU General Public License along with FG this.layersControl.addOverlay(this.$refs.pavementLayer.getLayer(), 'APT Layer') } } - if (this.$refs.thresholdLayer.getLayer() === e.layer) { + if (this.$refs.thresholdLayer !== undefined && this.$refs.thresholdLayer.getLayer() === e.layer) { l = this.layersControl._layers.filter(l => l.name === 'Threshold Layer') if (l.length > 0 && l[0].layer !== this.$refs.thresholdLayer.getLayer()) { this.layersControl.removeLayer(l[0].layer) @@ -229,6 +228,7 @@ You should have received a copy of the GNU General Public License along with FG if (l.length === 0) { this.layersControl.addOverlay(this.$refs.thresholdLayer.getLayer(), 'Threshold Layer') } + this.$refs.thresholdLayer.zoomUpdated() } if (this.$refs.towerLayer !== undefined && this.$refs.towerLayer.getLayer() === e.layer) { l = this.layersControl._layers.filter(l => l.name === 'Tower Layer') @@ -239,6 +239,7 @@ You should have received a copy of the GNU General Public License along with FG if (l.length === 0) { this.layersControl.addOverlay(this.$refs.towerLayer.getLayer(), 'Tower Layer') } + this.$refs.towerLayer.zoomUpdated() } }, onSelectedPolygon (ring) { @@ -348,11 +349,13 @@ You should have received a copy of the GNU General Public License along with FG } this.$refs.pavementLayer.setVisible(zoom >= 12) } - this.$refs.editLayer.groundnetLayerGroup.eachLayer(function (layer) { - if (layer.updateArrows !== undefined) { - layer.updateArrows(zoom) - } - }) + if (this.$refs.editLayer.groundnetLayerGroup) { + this.$refs.editLayer.groundnetLayerGroup.eachLayer(function (layer) { + if (layer.updateArrows !== undefined) { + layer.updateArrows(zoom) + } + }) + } if (this.$refs.thresholdLayer) { this.$refs.thresholdLayer.zoomUpdated() } diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index 545186a..1bdd105 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -64,11 +64,13 @@ } }, zoomUpdated () { - this.layerGroup.eachLayer(l => { - if (l instanceof L.Threshold) { - l.updateIcon(this.$parent.mapObject) - } - }) + if (this.layerGroup) { + this.layerGroup.eachLayer(l => { + if (l instanceof L.Threshold) { + l.updateIcon(this.$parent.mapObject) + } + }) + } } }, diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue index 3718b94..5fccdd2 100644 --- a/src/renderer/components/TowerLayer.vue +++ b/src/renderer/components/TowerLayer.vue @@ -60,11 +60,13 @@ You should have received a copy of the GNU General Public License along with FG } }, enableEdit () { - this.layerGroup.eachLayer(l => { - if (l instanceof L.TowerMarker) { - l.enableEdit(this.$parent.mapObject) - } - }) + if (this.layerGroup) { + this.layerGroup.eachLayer(l => { + if (l instanceof L.TowerMarker) { + l.enableEdit(this.$parent.mapObject) + } + }) + } }, save () { }, @@ -82,11 +84,13 @@ You should have received a copy of the GNU General Public License along with FG } }, zoomUpdated () { - this.layerGroup.eachLayer(l => { - if (l instanceof L.TowerMarker) { - l.updateIcon(this.$parent.mapObject) - } - }) + if (this.layerGroup) { + this.layerGroup.eachLayer(l => { + if (l instanceof L.TowerMarker) { + l.updateIcon(this.$parent.mapObject) + } + }) + } } }, computed: { From a9b2558cf28fe33193722a9c46903f293b7a7fa4 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 21 Dec 2020 16:36:07 +0100 Subject: [PATCH 066/146] Fix position of Tower Icon --- src/renderer/loaders/Threshold.js | 4 --- src/renderer/loaders/Tower.js | 46 ++++++++++++---------------- src/renderer/loaders/tower_loader.js | 4 +-- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/renderer/loaders/Threshold.js b/src/renderer/loaders/Threshold.js index 27d3e57..3677cd3 100644 --- a/src/renderer/loaders/Threshold.js +++ b/src/renderer/loaders/Threshold.js @@ -51,10 +51,6 @@ L.Threshold = L.Marker.extend({ } } }, - onAdd : function(map) { - var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); - this.updateIcon(map); - }, metersPerPixel: function (latitude, zoomLevel) { var earthCircumference = 40075017; var latitudeRadians = latitude * (Math.PI / 180); diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js index 0180eac..7beefcd 100644 --- a/src/renderer/loaders/Tower.js +++ b/src/renderer/loaders/Tower.js @@ -22,18 +22,6 @@ L.TowerMarker = L.Marker.extend({ options: { zIndexOffset: 10000, }, - - initialize: function (latlng, options) { - L.Marker.prototype.initialize(latlng, options); - L.Util.setOptions(this, options); - this.svg = this.stripSVG('tower.svg'); - - this.isDragging = false; - }, - updateProperties: function(properties) { - this.heading = properties.heading; - this.updateIcon(); - }, stripSVG: function(fName) { var rx = /<\s*svg[^>]*>([\s\S]*)<\s*\/svg[^>]*>/gm; var svg = fs.readFileSync(path.join(__static, '/', fName), 'utf8'); @@ -41,27 +29,28 @@ L.TowerMarker = L.Marker.extend({ return svg2[0]; }, updateIcon : function(map) { + console.debug(`Lat Lng Threshold ${this.getLatLng()}`); if(map !== null) { var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); - if(this._metersPP != metersPP) { - console.debug('Meters per pixel ' + metersPP); - var pixelSize = 32 / metersPP; - var scale = pixelSize/64; - var offset = -(64/2); + console.debug('Old Meters per pixel ' + this.metersPP); + console.debug('New Meters per pixel ' + metersPP); + if(this._metersPP != metersPP) { + var pixelSize = (this.iconSize/2) / metersPP; + var scale = pixelSize/this.iconSize; + var offset = 0;//-(this.iconSize/2); this.setIcon(L.divIcon({ iconSize: 64, - className: 'tower-marker-icon', - html: `
${this.svg}
`, + className: 'threshold-marker-icon', + html: `
${this.svg}
`, })); + + this.update(this.getLatLng()); + console.debug(); + this.setLatLng(this.getLatLng()); this._metersPP = metersPP; } } - }, - onAdd : function(map) { - var metersPP = this.metersPerPixel(map.getCenter().lat, map.getZoom()); - console.debug('Meters per pixel ' + metersPP); - this.updateIcon(map); - }, + }, metersPerPixel: function (latitude, zoomLevel) { var earthCircumference = 40075017; var latitudeRadians = latitude * (Math.PI / 180); @@ -75,10 +64,15 @@ L.TowerMarker = L.Marker.extend({ }); +L.TowerMarker.addInitHook(function(){ + this.svg = this.stripSVG('tower.svg'); + this.iconSize = 64; +}); + //Builds a marker for a ai or multiplayer aircraft var tower = function (n, options) { var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); - return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], options); + return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], {heading: 0}); } module.exports = tower; diff --git a/src/renderer/loaders/tower_loader.js b/src/renderer/loaders/tower_loader.js index e898bd1..f932126 100644 --- a/src/renderer/loaders/tower_loader.js +++ b/src/renderer/loaders/tower_loader.js @@ -63,12 +63,12 @@ exports.readTowerXML = function (fDir, icao, force) { towerNodes.map(n => { var towerIcon = tower(n, layerGroup); towerIcon.addTo(layerGroup); - var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); /* + //DEBUG Code + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); var marker = new L.Circle([latlon.decimalLatitude, latlon.decimalLongitude], 5); marker.addTo(layerGroup); */ - features.push(towerIcon); }).sort(); From 5aa33c6814f8684791260b97ea2e961439256263 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 22 Dec 2020 19:51:43 +0100 Subject: [PATCH 067/146] Fix pushback create --- src/renderer/components/EditLayer.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 6f15642..186f0ef 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -567,7 +567,7 @@ You should have received a copy of the GNU General Public License along with FG polyLine.addListeners() polyLine.on('editable:drawing:end', event => { - console.log(event) + console.debug(event) event.target.addTo(this.groundnetLayerGroup) }) }, @@ -585,11 +585,11 @@ You should have received a copy of the GNU General Public License along with FG polyLine.addListeners() polyLine.on('editable:drawing:end', event => { - console.log(event) + console.debug(event) event.target.addTo(this.groundnetLayerGroup) var pt = event.sourceTarget._latlngs[event.sourceTarget._latlngs.length-1]; - pt.options.attributes['holdPointType'] = 'PushBack' - var nIndex = pt.options.attributes.index + pt.attributes['holdPointType'] = 'PushBack' + var nIndex = pt.attributes.index var fa_icon = "
"; const icon = new L.DivIcon({ className: 'custom-div-icon', From 956e347517effe213608d29b284c607a17898652 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 22 Dec 2020 21:15:55 +0100 Subject: [PATCH 068/146] Panes --- src/renderer/components/ThresholdLayer.vue | 2 ++ src/renderer/components/TowerLayer.vue | 3 +++ src/renderer/loaders/Threshold.js | 2 +- src/renderer/loaders/Tower.js | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index 1bdd105..fff9563 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -29,6 +29,8 @@ return this.layerGroup }, load (icao) { + this.$parent.mapObject.createPane('threshold-pane') + this.$parent.mapObject.getPane('threshold-pane').style.zIndex = 550 // Callback for add this.layerGroup = readThresholdXML(this.$store.state.Settings.settings.airportsDirectory, icao, this.read) if (!this.layerGroup) { diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue index 5fccdd2..aa16b6e 100644 --- a/src/renderer/components/TowerLayer.vue +++ b/src/renderer/components/TowerLayer.vue @@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License along with FG console.debug([LMap, LMarker, L, LEdit]) }, mounted () { + }, beforeDestroy () { this.remove() @@ -37,6 +38,8 @@ You should have received a copy of the GNU General Public License along with FG return this.layerGroup }, load (icao) { + this.$parent.mapObject.createPane('tower-pane') + this.$parent.mapObject.getPane('tower-pane').style.zIndex = 550 // Callback for add this.layerGroup = readTowerXML(this.$store.state.Settings.settings.airportsDirectory, icao, this.read) if (!this.layerGroup) { diff --git a/src/renderer/loaders/Threshold.js b/src/renderer/loaders/Threshold.js index 3677cd3..953241e 100644 --- a/src/renderer/loaders/Threshold.js +++ b/src/renderer/loaders/Threshold.js @@ -74,7 +74,7 @@ var threshold = function (n, options) { var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); var heading = n.find('hdg-deg/text()').text(); - var marker = new L.Threshold([latlon.decimalLatitude, latlon.decimalLongitude], {heading: heading}); + var marker = new L.Threshold([latlon.decimalLatitude, latlon.decimalLongitude], {heading: heading, pane: 'threshold-pane'}); return marker; } diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js index 7beefcd..819aa7c 100644 --- a/src/renderer/loaders/Tower.js +++ b/src/renderer/loaders/Tower.js @@ -70,9 +70,9 @@ L.TowerMarker.addInitHook(function(){ }); //Builds a marker for a ai or multiplayer aircraft -var tower = function (n, options) { +var tower = function (n, options) { var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); - return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], {heading: 0}); + return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], {heading: 0, pane: 'tower-pane'}); } module.exports = tower; From 5c01f2a656feae367300cda45c045cb89b358422 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sat, 26 Dec 2020 20:50:55 +0100 Subject: [PATCH 069/146] Remove Menu --- src/main/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 6412511..25cb8e6 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1,6 +1,6 @@ 'use strict' -import { app, BrowserWindow } from 'electron' +import { app, BrowserWindow, Menu } from 'electron' const { ipcMain } = require('electron') ipcMain.on('OpenDebugger', (event, arg) => { @@ -20,6 +20,7 @@ const winURL = process.env.NODE_ENV === 'development' : `file://${__dirname}/index.html` function createWindow () { + Menu.setApplicationMenu(null) /** * Initial window options */ From 92f0b72456bc4bfcc1ee3ed734d90096f635d12e Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 27 Dec 2020 19:21:27 +0100 Subject: [PATCH 070/146] V0.0.27 --- .travis.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3e5327..275af57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,12 +75,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: '0.0.26' + name: '0.0.27' provider: releases api_key: secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= file_glob: true file: build/* on: - branches: '0.0.26' + branches: '0.0.27' repo: Portree-Kid/flightgear-airports diff --git a/package.json b/package.json index 17646a7..6272ab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.26", + "version": "0.0.27", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL v3", From 5fc343a7c1a3c61bd18bafdd6469d5746a08a918 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 27 Dec 2020 21:57:42 +0100 Subject: [PATCH 071/146] API_KEY --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 275af57..71b6f4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,8 +77,8 @@ jobs: draft: true name: '0.0.27' provider: releases - api_key: - secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= + api_key: + secure: gYevDrnBOPmUATTrkvryouwoH2R8yl3JpISN5U73UFZUXAl9wtTDQHK2gV0a2dLfZUFM/V8HAd9Tyy3SsfDbe8lPVvjVIPgEh48AVU2ip79NxGaUzD9L/VZyssLVVtec+v2t5ZaE8Ax5mJEs3Cvv6Mvja8dNOKo1oWp1qy5jvXY2hxhj3zsjcYhUDZVZeeAowFqITNNJS3xKCayGVLSd4VwASUmeNPo4dEfxV5gfJXddzUgE2CQWX+cPOrwsqlvMGrYIjJ6T9uXhbNnGFO5WxRGYbuZkNL0ShC2lT1z6grs7qVGHpoAIic2X5J+T2nSZ9iQoJy3jdpeOozD09AAO2OzawvhiDN5qK2w59u2ezzzkquH1T1kBzoUlTAzz2tQqAZJmMvQhwlmuFn5SVJproKNM7AVdUN+bF5PWznHPfv49BwiJ6NfHZujhZmp2u7wfRC+gSs9NxXawBpPOMR06Tq+e4OBxTE0XjlxpGQDWS8W+ADvW3d1a2plh4HWEq/FdhW8yj/3PuH13aVjuPXjpjQ0gR4+tUPdklcbY6vISKsxmOhODlIEdbMpuM/9Dd5Yn46VKOZM21rxoPiwy/m0jEwxtbH/rCk21/b0D7RjW5FWzZkZu3NJeQBO1VpjsYDh7A3JTqal/DMzOjx4z/UEfhVWdAEaHZUHBCyXgcebXb/M= file_glob: true file: build/* on: From 98b92ef308876e188c6040cd4593b95a9d369253 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 28 Dec 2020 22:02:40 +0100 Subject: [PATCH 072/146] API_KEY --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71b6f4f..89fe7de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,8 +78,7 @@ jobs: name: '0.0.27' provider: releases api_key: - secure: gYevDrnBOPmUATTrkvryouwoH2R8yl3JpISN5U73UFZUXAl9wtTDQHK2gV0a2dLfZUFM/V8HAd9Tyy3SsfDbe8lPVvjVIPgEh48AVU2ip79NxGaUzD9L/VZyssLVVtec+v2t5ZaE8Ax5mJEs3Cvv6Mvja8dNOKo1oWp1qy5jvXY2hxhj3zsjcYhUDZVZeeAowFqITNNJS3xKCayGVLSd4VwASUmeNPo4dEfxV5gfJXddzUgE2CQWX+cPOrwsqlvMGrYIjJ6T9uXhbNnGFO5WxRGYbuZkNL0ShC2lT1z6grs7qVGHpoAIic2X5J+T2nSZ9iQoJy3jdpeOozD09AAO2OzawvhiDN5qK2w59u2ezzzkquH1T1kBzoUlTAzz2tQqAZJmMvQhwlmuFn5SVJproKNM7AVdUN+bF5PWznHPfv49BwiJ6NfHZujhZmp2u7wfRC+gSs9NxXawBpPOMR06Tq+e4OBxTE0XjlxpGQDWS8W+ADvW3d1a2plh4HWEq/FdhW8yj/3PuH13aVjuPXjpjQ0gR4+tUPdklcbY6vISKsxmOhODlIEdbMpuM/9Dd5Yn46VKOZM21rxoPiwy/m0jEwxtbH/rCk21/b0D7RjW5FWzZkZu3NJeQBO1VpjsYDh7A3JTqal/DMzOjx4z/UEfhVWdAEaHZUHBCyXgcebXb/M= - file_glob: true + secure: "JnHZdzg4AsEcRn4uQkn15ELd8KqSQBgC3cOPRAEFVsOCRhh8aH8WFwAG0uZIjwU1F4qinK0sAayYllc5WrjHZ4/93FNDES3H4hEE1K3WDXG0cVxAt1JiDWVq6meEQWKRNO8zoT4aZa6vigOQhnaS5PE3KcdsaD5N6tkHxI+W7a4qBIUtbMjceKSFVDflJLLBWmMibuQ1JZ9gT1FES4yN18wj/bMM8x8V3xM6m7FPKfiVtnD0IpJKYNDVPQOdw7nJpzvVIzYVEgUTiRY2nVbslJkB8Lllh6zAC4B5vc8UTACf/S+j2z1ofAGajY8x8b0K3UDhg7b7vfTmPpmTJl1ZBGB5scyhRDneIOMr15QiAyKfStHpwdCz8MLV7H/tugPM348riT+JqecARjk/rIgc18/tL6lKQA4P4FG4mGp5s+eq+AAg2fdhyj7rL6kLw+z5J9170ch+ot7Ju6BUJVmvRAWxAg+yXCzyKdfen8RL+R7tdwJ0nFawtnkxwwZwLnr0792mchjl4JK+Q0sEb5J8DmBR1WVL+L3TN6G9HwUrFsm2eVCHAi0k5ExJLYoHV54kg+7uD8upACh3LRFIIFcvQWu52a7VTTwY+5Gsz91o8sAcJImo4E8Ii0wmFhcDPQ3HHa1dUGOofhpMcgPG15lsgdumUeulPz6fUQ3IxzBc8Uo=" file_glob: true file: build/* on: branches: '0.0.27' From 92009bfce00b50f090fa7fd311b6c99475bb2485 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 28 Dec 2020 22:33:38 +0100 Subject: [PATCH 073/146] API_KEY --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 89fe7de..73aaeb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,7 +78,8 @@ jobs: name: '0.0.27' provider: releases api_key: - secure: "JnHZdzg4AsEcRn4uQkn15ELd8KqSQBgC3cOPRAEFVsOCRhh8aH8WFwAG0uZIjwU1F4qinK0sAayYllc5WrjHZ4/93FNDES3H4hEE1K3WDXG0cVxAt1JiDWVq6meEQWKRNO8zoT4aZa6vigOQhnaS5PE3KcdsaD5N6tkHxI+W7a4qBIUtbMjceKSFVDflJLLBWmMibuQ1JZ9gT1FES4yN18wj/bMM8x8V3xM6m7FPKfiVtnD0IpJKYNDVPQOdw7nJpzvVIzYVEgUTiRY2nVbslJkB8Lllh6zAC4B5vc8UTACf/S+j2z1ofAGajY8x8b0K3UDhg7b7vfTmPpmTJl1ZBGB5scyhRDneIOMr15QiAyKfStHpwdCz8MLV7H/tugPM348riT+JqecARjk/rIgc18/tL6lKQA4P4FG4mGp5s+eq+AAg2fdhyj7rL6kLw+z5J9170ch+ot7Ju6BUJVmvRAWxAg+yXCzyKdfen8RL+R7tdwJ0nFawtnkxwwZwLnr0792mchjl4JK+Q0sEb5J8DmBR1WVL+L3TN6G9HwUrFsm2eVCHAi0k5ExJLYoHV54kg+7uD8upACh3LRFIIFcvQWu52a7VTTwY+5Gsz91o8sAcJImo4E8Ii0wmFhcDPQ3HHa1dUGOofhpMcgPG15lsgdumUeulPz6fUQ3IxzBc8Uo=" file_glob: true + secure: JnHZdzg4AsEcRn4uQkn15ELd8KqSQBgC3cOPRAEFVsOCRhh8aH8WFwAG0uZIjwU1F4qinK0sAayYllc5WrjHZ4/93FNDES3H4hEE1K3WDXG0cVxAt1JiDWVq6meEQWKRNO8zoT4aZa6vigOQhnaS5PE3KcdsaD5N6tkHxI+W7a4qBIUtbMjceKSFVDflJLLBWmMibuQ1JZ9gT1FES4yN18wj/bMM8x8V3xM6m7FPKfiVtnD0IpJKYNDVPQOdw7nJpzvVIzYVEgUTiRY2nVbslJkB8Lllh6zAC4B5vc8UTACf/S+j2z1ofAGajY8x8b0K3UDhg7b7vfTmPpmTJl1ZBGB5scyhRDneIOMr15QiAyKfStHpwdCz8MLV7H/tugPM348riT+JqecARjk/rIgc18/tL6lKQA4P4FG4mGp5s+eq+AAg2fdhyj7rL6kLw+z5J9170ch+ot7Ju6BUJVmvRAWxAg+yXCzyKdfen8RL+R7tdwJ0nFawtnkxwwZwLnr0792mchjl4JK+Q0sEb5J8DmBR1WVL+L3TN6G9HwUrFsm2eVCHAi0k5ExJLYoHV54kg+7uD8upACh3LRFIIFcvQWu52a7VTTwY+5Gsz91o8sAcJImo4E8Ii0wmFhcDPQ3HHa1dUGOofhpMcgPG15lsgdumUeulPz6fUQ3IxzBc8Uo= + file_glob: true file: build/* on: branches: '0.0.27' From e4363dd2a6d0cd59ec75f39ee7ccb90cdc8a49db Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 29 Dec 2020 19:38:37 +0100 Subject: [PATCH 074/146] V 0.0.28 --- .travis.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 73aaeb6..3fb5528 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,12 +75,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: '0.0.27' + name: '0.0.28' provider: releases api_key: secure: JnHZdzg4AsEcRn4uQkn15ELd8KqSQBgC3cOPRAEFVsOCRhh8aH8WFwAG0uZIjwU1F4qinK0sAayYllc5WrjHZ4/93FNDES3H4hEE1K3WDXG0cVxAt1JiDWVq6meEQWKRNO8zoT4aZa6vigOQhnaS5PE3KcdsaD5N6tkHxI+W7a4qBIUtbMjceKSFVDflJLLBWmMibuQ1JZ9gT1FES4yN18wj/bMM8x8V3xM6m7FPKfiVtnD0IpJKYNDVPQOdw7nJpzvVIzYVEgUTiRY2nVbslJkB8Lllh6zAC4B5vc8UTACf/S+j2z1ofAGajY8x8b0K3UDhg7b7vfTmPpmTJl1ZBGB5scyhRDneIOMr15QiAyKfStHpwdCz8MLV7H/tugPM348riT+JqecARjk/rIgc18/tL6lKQA4P4FG4mGp5s+eq+AAg2fdhyj7rL6kLw+z5J9170ch+ot7Ju6BUJVmvRAWxAg+yXCzyKdfen8RL+R7tdwJ0nFawtnkxwwZwLnr0792mchjl4JK+Q0sEb5J8DmBR1WVL+L3TN6G9HwUrFsm2eVCHAi0k5ExJLYoHV54kg+7uD8upACh3LRFIIFcvQWu52a7VTTwY+5Gsz91o8sAcJImo4E8Ii0wmFhcDPQ3HHa1dUGOofhpMcgPG15lsgdumUeulPz6fUQ3IxzBc8Uo= file_glob: true file: build/* on: - branches: '0.0.27' + branches: '0.0.28' repo: Portree-Kid/flightgear-airports diff --git a/package.json b/package.json index 6272ab3..2fd61f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.27", + "version": "0.0.28", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL v3", From c5891498e7c9142851311b455f8d24f69ad7ed38 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 29 Dec 2020 20:56:11 +0100 Subject: [PATCH 075/146] API_KEY --- .travis.yml | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fb5528..c53e056 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,14 @@ dist: xenial language: node_js workspaces: use: - - binaries + - binaries cache: directories: - node_modules - "$HOME/.electron" - - "$HOME/.cache" -addons: -before_install: + - "$HOME/.cache" +addons: +before_install: install: - source ~/.bashrc - npm install -g xvfb-maybe @@ -20,67 +20,65 @@ node_js: - 10.15.3 jobs: include: + matrix: - stage: Build binaries os: windows script: - - npm run build - - mkdir windows-binaries - - mv -v build/flightgear-airports* windows-binaries/ - - ls -l windows-binaries + - npm run build + - mkdir windows-binaries + - mv -v build/flightgear-airports* windows-binaries/ + - ls -l windows-binaries workspaces: create: name: windows-binaries paths: windows-binaries - os: linux script: - - npm run build - - mkdir linux-binaries - - mv -v build/flightgear-airports* linux-binaries/ - - ls -l linux-binaries + - npm run build + - mkdir linux-binaries + - mv -v build/flightgear-airports* linux-binaries/ + - ls -l linux-binaries workspaces: create: name: linux-binaries paths: linux-binaries - os: osx script: - - npm run build - - mkdir osx-binaries - - mv -v build/flightgear-airports* osx-binaries/ - - ls -l osx-binaries + - npm run build + - mkdir osx-binaries + - mv -v build/flightgear-airports* osx-binaries/ + - ls -l osx-binaries workspaces: create: name: osx-binaries paths: osx-binaries - stage: Deploy install: - - pwd - - tar -xzf ${CASHER_DIR}/osx-binaries-fetch.tgz - - find -name flightgear-airports* -# - find -name windows-binaries -# - find -name osx-binaries -# - find -name linux-binaries -# - ls -l | grep "^d" -# - ls -l "C:" - - cp ./Users/travis/build/Portree-Kid/flightgear-airports/osx-binaries/*.dmg build/ - - cp ./C:/Users/travis/build/Portree-Kid/flightgear-airports/windows-binaries/*.exe build/ - - cp ./linux-binaries/*.AppImage build/ - - ls -l "build/" + - pwd + - tar -xzf ${CASHER_DIR}/osx-binaries-fetch.tgz + - find -name flightgear-airports* + - cp ./Users/travis/build/Portree-Kid/flightgear-airports/osx-binaries/*.dmg + build/ + - cp ./C:/Users/travis/build/Portree-Kid/flightgear-airports/windows-binaries/*.exe + build/ + - cp ./linux-binaries/*.AppImage build/ + - ls -l "build/" script: skip workspaces: use: - - windows-binaries - - linux-binaries - - osx-binaries + - windows-binaries + - linux-binaries + - osx-binaries deploy: skip_cleanup: true overwrite: true draft: true - name: '0.0.28' + name: 0.0.28 provider: releases - api_key: - secure: JnHZdzg4AsEcRn4uQkn15ELd8KqSQBgC3cOPRAEFVsOCRhh8aH8WFwAG0uZIjwU1F4qinK0sAayYllc5WrjHZ4/93FNDES3H4hEE1K3WDXG0cVxAt1JiDWVq6meEQWKRNO8zoT4aZa6vigOQhnaS5PE3KcdsaD5N6tkHxI+W7a4qBIUtbMjceKSFVDflJLLBWmMibuQ1JZ9gT1FES4yN18wj/bMM8x8V3xM6m7FPKfiVtnD0IpJKYNDVPQOdw7nJpzvVIzYVEgUTiRY2nVbslJkB8Lllh6zAC4B5vc8UTACf/S+j2z1ofAGajY8x8b0K3UDhg7b7vfTmPpmTJl1ZBGB5scyhRDneIOMr15QiAyKfStHpwdCz8MLV7H/tugPM348riT+JqecARjk/rIgc18/tL6lKQA4P4FG4mGp5s+eq+AAg2fdhyj7rL6kLw+z5J9170ch+ot7Ju6BUJVmvRAWxAg+yXCzyKdfen8RL+R7tdwJ0nFawtnkxwwZwLnr0792mchjl4JK+Q0sEb5J8DmBR1WVL+L3TN6G9HwUrFsm2eVCHAi0k5ExJLYoHV54kg+7uD8upACh3LRFIIFcvQWu52a7VTTwY+5Gsz91o8sAcJImo4E8Ii0wmFhcDPQ3HHa1dUGOofhpMcgPG15lsgdumUeulPz6fUQ3IxzBc8Uo= - file_glob: true + api_key: + secure: VXCzO5904hY79ulatlwL6iTrYrSZU8xhdEotLZU+i/qWmXjKo9VGbc2vEziHa+gb+TeMO/CQVMeMfrAqQrxwjVjXHdg5RaJCtX7s/pM1wf1vDF8buyZakzvtuP1wT8Qq/fSmNt9MH+GPzSQhfO1aamyEkRSKhQY2MxlF7DE6yLo4v9bh7p8SFSp7Y5VstjwoxgNfNIC28dHnsAdAaQcw9BEVcXmfFmibTOjCwP6CwmWJjD+/u47JXgkmU0uueNyl4d5vOVGrCYPyQDbglBNa/0N2XmRGMyyyhLbqw/TXenKdG8VPSNF7fhlf+OTDJ3Fwj617tqX7NtuFYyPoC9lgPTEtJzM8UdIWody/xmmeRHGRtekoLfVveLtrnq8Q8eJ3AZK2/oYfhWi72Xvfr7Z0nwwWXgCAgafbpL6ShxD3vjTFd8b/3Fr0f+V3rpcS0Vf8zLECPnS4shQIvbbMjmAsnwPXPhTbBLVD/RuHrc5vNmLixZhVtEI8HfL4GxzdTk889NWIA4VpFp4Wq8be+vu2FBV2M8Mh201CeB0tl/vT0aFPUYg9pzJjaBBXUCoG6PBXSBpVkV4DXmnj34mXGJ7vsC9+3fwYNDAfNG6yBxi1uy03JoJga07CtYXFcezT3BIopmiYRdujBW3YXwW2L2VurODZLJYl6cqk/f5kolVV/kE= + file_glob: true file: build/* on: - branches: '0.0.28' + branches: 0.0.28 repo: Portree-Kid/flightgear-airports From 6bb3ec531d283bd170d54a555d8676c55c2e6b8d Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 29 Dec 2020 20:58:09 +0100 Subject: [PATCH 076/146] 0.0.27 --- .travis.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c53e056..93b8fe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,12 +73,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: 0.0.28 + name: 0.0.27 provider: releases api_key: secure: VXCzO5904hY79ulatlwL6iTrYrSZU8xhdEotLZU+i/qWmXjKo9VGbc2vEziHa+gb+TeMO/CQVMeMfrAqQrxwjVjXHdg5RaJCtX7s/pM1wf1vDF8buyZakzvtuP1wT8Qq/fSmNt9MH+GPzSQhfO1aamyEkRSKhQY2MxlF7DE6yLo4v9bh7p8SFSp7Y5VstjwoxgNfNIC28dHnsAdAaQcw9BEVcXmfFmibTOjCwP6CwmWJjD+/u47JXgkmU0uueNyl4d5vOVGrCYPyQDbglBNa/0N2XmRGMyyyhLbqw/TXenKdG8VPSNF7fhlf+OTDJ3Fwj617tqX7NtuFYyPoC9lgPTEtJzM8UdIWody/xmmeRHGRtekoLfVveLtrnq8Q8eJ3AZK2/oYfhWi72Xvfr7Z0nwwWXgCAgafbpL6ShxD3vjTFd8b/3Fr0f+V3rpcS0Vf8zLECPnS4shQIvbbMjmAsnwPXPhTbBLVD/RuHrc5vNmLixZhVtEI8HfL4GxzdTk889NWIA4VpFp4Wq8be+vu2FBV2M8Mh201CeB0tl/vT0aFPUYg9pzJjaBBXUCoG6PBXSBpVkV4DXmnj34mXGJ7vsC9+3fwYNDAfNG6yBxi1uy03JoJga07CtYXFcezT3BIopmiYRdujBW3YXwW2L2VurODZLJYl6cqk/f5kolVV/kE= file_glob: true file: build/* on: - branches: 0.0.28 + branches: 0.0.27 repo: Portree-Kid/flightgear-airports diff --git a/package.json b/package.json index 2fd61f7..6272ab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.28", + "version": "0.0.27", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL v3", From 3b55747ec6217c35bfa80f052ce0b7680dff979e Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 29 Dec 2020 21:08:23 +0100 Subject: [PATCH 077/146] Build Fix --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93b8fe7..3bfd549 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ node_js: - 10.15.3 jobs: include: - matrix: - stage: Build binaries os: windows script: @@ -57,10 +56,8 @@ jobs: - pwd - tar -xzf ${CASHER_DIR}/osx-binaries-fetch.tgz - find -name flightgear-airports* - - cp ./Users/travis/build/Portree-Kid/flightgear-airports/osx-binaries/*.dmg - build/ - - cp ./C:/Users/travis/build/Portree-Kid/flightgear-airports/windows-binaries/*.exe - build/ + - cp ./Users/travis/build/Portree-Kid/flightgear-airports/osx-binaries/*.dmg build/ + - cp ./C:/Users/travis/build/Portree-Kid/flightgear-airports/windows-binaries/*.exe build/ - cp ./linux-binaries/*.AppImage build/ - ls -l "build/" script: skip @@ -73,12 +70,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: 0.0.27 + name: '0.0.27' provider: releases api_key: secure: VXCzO5904hY79ulatlwL6iTrYrSZU8xhdEotLZU+i/qWmXjKo9VGbc2vEziHa+gb+TeMO/CQVMeMfrAqQrxwjVjXHdg5RaJCtX7s/pM1wf1vDF8buyZakzvtuP1wT8Qq/fSmNt9MH+GPzSQhfO1aamyEkRSKhQY2MxlF7DE6yLo4v9bh7p8SFSp7Y5VstjwoxgNfNIC28dHnsAdAaQcw9BEVcXmfFmibTOjCwP6CwmWJjD+/u47JXgkmU0uueNyl4d5vOVGrCYPyQDbglBNa/0N2XmRGMyyyhLbqw/TXenKdG8VPSNF7fhlf+OTDJ3Fwj617tqX7NtuFYyPoC9lgPTEtJzM8UdIWody/xmmeRHGRtekoLfVveLtrnq8Q8eJ3AZK2/oYfhWi72Xvfr7Z0nwwWXgCAgafbpL6ShxD3vjTFd8b/3Fr0f+V3rpcS0Vf8zLECPnS4shQIvbbMjmAsnwPXPhTbBLVD/RuHrc5vNmLixZhVtEI8HfL4GxzdTk889NWIA4VpFp4Wq8be+vu2FBV2M8Mh201CeB0tl/vT0aFPUYg9pzJjaBBXUCoG6PBXSBpVkV4DXmnj34mXGJ7vsC9+3fwYNDAfNG6yBxi1uy03JoJga07CtYXFcezT3BIopmiYRdujBW3YXwW2L2VurODZLJYl6cqk/f5kolVV/kE= file_glob: true file: build/* on: - branches: 0.0.27 + branches: '0.0.27' repo: Portree-Kid/flightgear-airports From b7954d15dfd5d504b4be8f900857b1ec1a9bc0ac Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 29 Dec 2020 22:08:23 +0100 Subject: [PATCH 078/146] API_KEY --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3bfd549..ef42939 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ jobs: name: '0.0.27' provider: releases api_key: - secure: VXCzO5904hY79ulatlwL6iTrYrSZU8xhdEotLZU+i/qWmXjKo9VGbc2vEziHa+gb+TeMO/CQVMeMfrAqQrxwjVjXHdg5RaJCtX7s/pM1wf1vDF8buyZakzvtuP1wT8Qq/fSmNt9MH+GPzSQhfO1aamyEkRSKhQY2MxlF7DE6yLo4v9bh7p8SFSp7Y5VstjwoxgNfNIC28dHnsAdAaQcw9BEVcXmfFmibTOjCwP6CwmWJjD+/u47JXgkmU0uueNyl4d5vOVGrCYPyQDbglBNa/0N2XmRGMyyyhLbqw/TXenKdG8VPSNF7fhlf+OTDJ3Fwj617tqX7NtuFYyPoC9lgPTEtJzM8UdIWody/xmmeRHGRtekoLfVveLtrnq8Q8eJ3AZK2/oYfhWi72Xvfr7Z0nwwWXgCAgafbpL6ShxD3vjTFd8b/3Fr0f+V3rpcS0Vf8zLECPnS4shQIvbbMjmAsnwPXPhTbBLVD/RuHrc5vNmLixZhVtEI8HfL4GxzdTk889NWIA4VpFp4Wq8be+vu2FBV2M8Mh201CeB0tl/vT0aFPUYg9pzJjaBBXUCoG6PBXSBpVkV4DXmnj34mXGJ7vsC9+3fwYNDAfNG6yBxi1uy03JoJga07CtYXFcezT3BIopmiYRdujBW3YXwW2L2VurODZLJYl6cqk/f5kolVV/kE= + secure: C+xfU2GatGzATuyZfONg7YZM1eWfKRCWVnLM1J9kBwh0m4aDLNCIRkm5LpD2DZdauF4n1N5/5j3/56b/CigglDvjz2CgzBH8oqDelCbKCWneeARTOO5NjRPbjEAUnE+qNeVnfW3ia6nFvD6rHWScK3MFAd/JtzYICuHF577+OBmDpe7X6nGlsUC7PH8Sc+nSF70MGQFyRklEEEzbMzIdaHumO4Q+KBDY5Zv6tVSsW1otG6aPJMXVzX9hcx6fLpkJphDK19heZvfvRMu50jwSL+Q7r3bN8eVTTahwLGfgwZP5HyM3JCisc1zZ2xeCUsqs+kGHrN/t/8MDfW0uN0tRYfZJxL7HQK9A06ZK63gDG0vCqYEuRWlAixGk0BF1UZ7AQryO6N0HgTZkOOqqoZb4jVvoLo6ak6PXdCUaqStf0f8hHptgCYi4ehvcRiwmamBnUukcFzVfGNS22j5xSCFZ/KTPH/JSPAIV3W8EFxZ1vjChFmVXT22nB4IVd5eDRWov4Q458Tk3IaPlu5yX05pZ/6w1alT6N3cZVkJ/cGjlFoa8GKmEbdn/ptqQECFImiGgrizMjkp4tinK4yAfcw9aDtG8kWThmPw1i3haSBhZgjI+VAXh0+r3+GkLMeDgn7wrGIuzYA2EX61K/O6I3a6ybG83NGoLaPfNlPup3YUjuF8= file_glob: true file: build/* on: From af03c5fe12b7f39b2d3efb815a977993e3da3149 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Wed, 30 Dec 2020 18:15:47 +0100 Subject: [PATCH 079/146] Not interactive when not editing --- src/renderer/components/EditLayer.vue | 10 +++++++- .../loaders/TaxiwaySegmentExtender.js | 25 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 186f0ef..4f89ae7 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -206,7 +206,6 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup = []; this.groundnetLayerGroup.eachLayer(l => { l.enableEdit() - l.featureLookup = this.featureLookup; if (typeof l.extensions === 'function') { l.extensions(this) @@ -214,6 +213,12 @@ You should have received a copy of the GNU General Public License along with FG if (typeof l.bringToFront === 'function') { l.bringToFront() } + if (typeof l.updateStyle === 'function') { + l.updateStyle() + } + if (typeof l.setInteractive === 'function') { + l.setInteractive(true) + } }) this.$store.dispatch('addWip', {icao: this.icao}); }, disableEdit () { @@ -221,6 +226,9 @@ You should have received a copy of the GNU General Public License along with FG this.editing = false this.$store.commit('SET_EDIT', false) this.groundnetLayerGroup.eachLayer(l => { + if (typeof l.setInteractive === 'function') { + l.setInteractive(false) + } l.disableEdit() }) }, diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index 073cac5..998a27c 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -512,6 +512,26 @@ const extendTaxiSegment = function (taxiwaySegment) { } } + taxiwaySegment.__proto__.setInteractive = function (interactive) { + if (this.getLayers) { + this.getLayers().forEach(layer => { + layer.setInteractive(interactive); + }); + return; + } + if (!this._path) { + return; + } + + this.options.interactive = interactive; + + if (interactive) { + L.DomUtil.addClass(this._path, 'leaflet-interactive'); + } else { + L.DomUtil.removeClass(this._path, 'leaflet-interactive'); + } + }; + taxiwaySegment.__proto__.updateStyle = function () { var style = {}; if(!this.options.attributes) { @@ -525,6 +545,11 @@ const extendTaxiSegment = function (taxiwaySegment) { else { style.color = '#3388ff'; } + if(this.editEnabled()) { + style.interactive = true; + } else { + style.interactive = false; + } this.setStyle(style); if (this._map !== null) { if (this.options.attributes.direction === 'forward') { From 4c0f09e8d97fc6ceeca997c483cc804b3aec29d8 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 31 Dec 2020 16:01:00 +0100 Subject: [PATCH 080/146] Fix Route Edit #40 --- src/renderer/components/EditLayer.vue | 8 ++++---- src/renderer/loaders/groundnet_writer.js | 13 +++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 4f89ae7..0d29af8 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -695,15 +695,15 @@ You should have received a copy of the GNU General Public License along with FG !this.editing) { return; } - console.debug("Edit Type : " + this.$store.state.Editable.data.multiarc.ids); + console.debug("Edit Type : " + this.$store.state.Editable.data.multiarc.ids + ' ' + String(this.$store.state.Editable.data.multiarc.direction)); this.$store.state.Editable.data.multiarc.ids.forEach(id => { console.debug(id); var arc = this.groundnetLayerGroup.getLayer(id); if (arc && arc instanceof L.Polyline) { console.log('Edited Arc : ' + this.$store.state.Editable.index); - arc.options.attributes.direction = this.$store.state.Editable.data.multiarc.direction - arc.options.attributes.name = this.$store.state.Editable.data.multiarc.name - arc.options.attributes.isPushBackRoute = this.$store.state.Editable.data.multiarc.isPushBackRoute + arc.options.attributes.direction = String(this.$store.state.Editable.data.multiarc.direction) + arc.options.attributes.name = String(this.$store.state.Editable.data.multiarc.name) + arc.options.attributes.isPushBackRoute = Number(this.$store.state.Editable.data.multiarc.isPushBackRoute) arc.updateStyle(); } }); diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index 4fc2c74..9e96d0b 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -201,7 +201,10 @@ var mapParkings = function (o) { var lat = convertLat(o.getLatLng()); var lon = convertLon(o.getLatLng()); // - var parking = { '@index': String(o['id']), '@type': o.options.attributes.type, '@name': o.options.attributes.name, '@lat': lat, '@lon': lon, '@heading': Number(o.options.attributes.heading%360).toFixed(1), '@radius': String(o.options.attributes.radius) }; + var parking = { '@index': String(o['id']), '@type': o.options.attributes.type, '@lat': lat, '@lon': lon, '@heading': Number(o.options.attributes.heading%360).toFixed(1), '@radius': String(o.options.attributes.radius) }; + if (o.options.attributes.name !== '' && o.options.attributes.name !== 'undefined' && o.options.attributes.name !== undefined) { + parking['@name'] = o.options.attributes.name; + } if( o.options.attributes.airlineCodes) { console.debug(o.options.attributes.airlineCodes); parking['@airlineCodes'] = o.options.attributes.airlineCodes; @@ -247,7 +250,7 @@ var mapHoldPoint = function (o) { var mapBeginNode = function (o) { if (o instanceof L.TaxiwaySegment) { - console.debug(o); + console.debug('Map Begin : ', o['begin']); // return { '@index': String(o['begin']), '@lat': convertLat(o._latlngs[0]), '@lon': convertLon(o._latlngs[0]), '@isOnRunway': '0', '@type': 'begin' }; } @@ -255,7 +258,7 @@ var mapBeginNode = function (o) { var mapEndNode = function (o) { if (o instanceof L.TaxiwaySegment) { - console.debug(o); + console.debug('Map End : ', o['end']); // return { '@index': String(o['end']), '@lat': convertLat(o._latlngs[1]), '@lon': convertLon(o._latlngs[1]), '@isOnRunway': '0', '@type': 'end' }; } @@ -295,6 +298,8 @@ var styleArc = function (attributes, arc) { } else { arc['@isPushBackRoute'] = "0"; } - arc['@name'] = attributes.name; + if ( attributes.name !== '' && attributes.name !== 'undefined') { + arc['@name'] = attributes.name; + } } } \ No newline at end of file From 03c3956d947935e5d416581640d54e176f231aee Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 31 Dec 2020 17:17:58 +0100 Subject: [PATCH 081/146] #75 more decimals --- src/renderer/loaders/groundnet_writer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index 9e96d0b..da34819 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -278,7 +278,7 @@ var convertLat = function (latlng) { var deg = mathjs.floor(mathjs.abs(latlng.lat)); var min = (mathjs.abs(latlng.lat) - deg) * 60; // console.debug(NS + deg + " " + min); - return NS + String(deg).padStart(2, '0') + " " + mathjs.round(min, 3); + return NS + String(deg).padStart(2, '0') + " " + mathjs.round(min, 6); } var convertLon = function (latlng) { @@ -287,7 +287,7 @@ var convertLon = function (latlng) { var deg = mathjs.floor(mathjs.abs(latlng.lng)); var min = (mathjs.abs(latlng.lng) - deg) * 60; // console.debug(NS + deg + " " + min); - return NS + String(deg).padStart(2, '0') + " " + mathjs.round(min, 3); + return NS + String(deg).padStart(2, '0') + " " + mathjs.round(min, 6); } var styleArc = function (attributes, arc) { From 6391ecf65d85ced991762af8a3235eeb3d7fdc3d Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 1 Jan 2021 22:00:15 +0100 Subject: [PATCH 082/146] API_KEY --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef42939..8d7688f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ jobs: name: '0.0.27' provider: releases api_key: - secure: C+xfU2GatGzATuyZfONg7YZM1eWfKRCWVnLM1J9kBwh0m4aDLNCIRkm5LpD2DZdauF4n1N5/5j3/56b/CigglDvjz2CgzBH8oqDelCbKCWneeARTOO5NjRPbjEAUnE+qNeVnfW3ia6nFvD6rHWScK3MFAd/JtzYICuHF577+OBmDpe7X6nGlsUC7PH8Sc+nSF70MGQFyRklEEEzbMzIdaHumO4Q+KBDY5Zv6tVSsW1otG6aPJMXVzX9hcx6fLpkJphDK19heZvfvRMu50jwSL+Q7r3bN8eVTTahwLGfgwZP5HyM3JCisc1zZ2xeCUsqs+kGHrN/t/8MDfW0uN0tRYfZJxL7HQK9A06ZK63gDG0vCqYEuRWlAixGk0BF1UZ7AQryO6N0HgTZkOOqqoZb4jVvoLo6ak6PXdCUaqStf0f8hHptgCYi4ehvcRiwmamBnUukcFzVfGNS22j5xSCFZ/KTPH/JSPAIV3W8EFxZ1vjChFmVXT22nB4IVd5eDRWov4Q458Tk3IaPlu5yX05pZ/6w1alT6N3cZVkJ/cGjlFoa8GKmEbdn/ptqQECFImiGgrizMjkp4tinK4yAfcw9aDtG8kWThmPw1i3haSBhZgjI+VAXh0+r3+GkLMeDgn7wrGIuzYA2EX61K/O6I3a6ybG83NGoLaPfNlPup3YUjuF8= + secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= file_glob: true file: build/* on: From 67b2220bbea11b333b64b5398c6b2dcda59adb77 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 1 Jan 2021 22:41:36 +0100 Subject: [PATCH 083/146] API_KEY --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d7688f..04a4099 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ jobs: name: '0.0.27' provider: releases api_key: - secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= + secure: xBF7Jld2WbEXVg5QOxZIC/T2hlKOkajebrNi7kfE8vGVRuZG1cbHWEtBVPxggxmIWvzSyKOACSufFywx8rjgXNP3e310+dp1WuEnOBlkTr6HO3FneTue5gKoPsFB8/r8/BMPWqY50lS2Vei367eINsdNiw4wWv2bzbB6uNBlo9ILRZjbyWnUv+j8+h9gmCg2nHLmHBGhXRMLqYFEHYvq1LrV+tjMNtMBdNiRVYBjpeWI1y7TMsxpdwKvrYF84L7r9IOkjg2DHIACy4SMnIeKi6b7Lr83aK5QwksHByMETxjaNPxgvmg9hPFaRoJsvwOLdgSDU/VpEar8uweOnumt2bdqdwV2t+99A1g41KcvbUI1aATPOWhpGxW+WLBBz40hpDBBwWJ/Il4rMUHfsQ162xoO9NvlKp4IE7pgK3ydGlJx6mYzMx3QB2eKnTFySaIekrkzZPIS3GX50cMclRw6jS3fueUmtNxjIv4hNHgRqE6pQfxhQnaUkHjdP7nglYs0muJotM2Tksyw3YRlLoFzc/siktCDr8ZXxj+rlV3TeoH2vba7f4zr0tYY9vlGAUlcrkBoJ4kDeA8Hm0GnbpWHBsSY4g199jOkgbr/kJ0HDrELv/JJl1c8yp3uSlcN82UgNS15H60D+0zg3Ls4KxvqXslrPh815Se5FqKoEpvZ5VQ= file_glob: true file: build/* on: From 84fd39c3b5aa3551decb9a065b71c4fc9e38e468 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sat, 2 Jan 2021 19:51:22 +0100 Subject: [PATCH 084/146] #90 add multiple airlines --- package-lock.json | 1562 +++++++++++++++++------ package.json | 4 +- src/renderer/components/AirportEdit.vue | 11 +- 3 files changed, 1165 insertions(+), 412 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f8865e..ad663e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.26", + "version": "0.0.27", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -158,13 +158,33 @@ } }, "@develar/schema-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.1.0.tgz", - "integrity": "sha512-qjCqB4ctMig9Gz5bd6lkdFr3bO6arOdQqptdBSpF1ZpCnjofieCciEzkoS9ujY9cMGyllYSCSmBJ3x9OKHXzoA==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } } }, "@electron/get": { @@ -199,6 +219,47 @@ "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", "dev": true }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@electron/universal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.0.4.tgz", + "integrity": "sha512-ajZoumi4XwqwmZe8YVhu4XGkZBCPyWZsVCQONPTIe9TUlleSN+dic3YpXlaWcilx/HOzTdldTKtabNTeI0gDoA==", + "dev": true, + "requires": { + "@malept/cross-spawn-promise": "^1.1.0", + "asar": "^3.0.3", + "debug": "^4.3.1", + "dir-compare": "^2.4.0", + "fs-extra": "^9.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -213,6 +274,58 @@ "integrity": "sha512-vKDJUuE2GAdBERaQWmmtsciAMzjwNrROXA5KTGSZvayAsmuTGjam5z6QNqNPCwDfVljLWuov1nEC3mEQf/n6fQ==", "dev": true }, + "@malept/cross-spawn-promise": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", + "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -1640,6 +1753,15 @@ "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, + "@types/fs-extra": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.6.tgz", + "integrity": "sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", @@ -1663,6 +1785,39 @@ "integrity": "sha512-iZeh1EgupfmAAOASk580R1SL5lWF3CsBVgVH0395qyNF8fhO16xy1UwAav2PdGxIIsYRn7RzJgMGjdsvam6YYg==", "dev": true }, + "@types/plist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/plist/-/plist-3.0.2.tgz", + "integrity": "sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*", + "xmlbuilder": ">=11.0.1" + } + }, + "@types/verror": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.4.tgz", + "integrity": "sha512-OjJdqx6QlbyZw9LShPwRW+Kmiegeg3eWNI41MQQKaG3vjdU2L9SRElntM51HmHBY1cu7izxQJ1lMYioQh3XMBg==", + "dev": true, + "optional": true + }, + "@types/yargs": { + "version": "15.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.12.tgz", + "integrity": "sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", + "dev": true + }, "@vue/component-compiler-utils": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.0.0.tgz", @@ -2428,48 +2583,49 @@ } }, "app-builder-bin": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-3.4.3.tgz", - "integrity": "sha512-qMhayIwi3juerQEVJMQ76trObEbfQT0nhUdxZz9a26/3NLT3pE6awmQ8S1cEnrGugaaM5gYqR8OElcDezfmEsg==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-3.5.12.tgz", + "integrity": "sha512-lQARM2AielmFoBeIo6LZigAe+58Wwe07ZWkt+wVeDxzyieNmeWjlvz/V5dKzinydwdHd+CNswN86sww46yijjA==", "dev": true }, "app-builder-lib": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-21.2.0.tgz", - "integrity": "sha512-aOX/nv77/Bti6NymJDg7p9T067xD8m1ipIEJR7B4Mm1GsJWpMm9PZdXtCRiMNRjHtQS5KIljT0g17781y6qn5A==", + "version": "22.10.4", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-22.10.4.tgz", + "integrity": "sha512-q7B1cr8Ry4a7o08EKShLfwsnIVf5By7YhVwcoqgEwPKxtoj1qF0kB4wyBP79rJylYi0Zj2cSkJJ/gD/ef9xhoQ==", "dev": true, "requires": { "7zip-bin": "~5.0.3", - "@develar/schema-utils": "~2.1.0", + "@develar/schema-utils": "~2.6.5", + "@electron/universal": "1.0.4", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "21.2.0", - "builder-util-runtime": "8.3.0", + "builder-util": "22.10.4", + "builder-util-runtime": "8.7.3", "chromium-pickle-js": "^0.2.0", - "debug": "^4.1.1", - "ejs": "^2.6.2", - "electron-publish": "21.2.0", - "fs-extra": "^8.1.0", - "hosted-git-info": "^2.7.1", + "debug": "^4.3.1", + "ejs": "^3.1.5", + "electron-publish": "22.10.4", + "fs-extra": "^9.0.1", + "hosted-git-info": "^3.0.7", "is-ci": "^2.0.0", - "isbinaryfile": "^4.0.2", - "js-yaml": "^3.13.1", + "isbinaryfile": "^4.0.6", + "js-yaml": "^3.14.1", "lazy-val": "^1.0.4", "minimatch": "^3.0.4", - "normalize-package-data": "^2.5.0", - "read-config-file": "5.0.0", - "sanitize-filename": "^1.6.2", - "semver": "^6.3.0", - "temp-file": "^3.3.4" + "normalize-package-data": "^3.0.0", + "read-config-file": "6.0.0", + "sanitize-filename": "^1.6.3", + "semver": "^7.3.4", + "temp-file": "^3.3.7" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "esprima": { @@ -2478,37 +2634,75 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "hosted-git-info": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", + "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", "dev": true, "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "lru-cache": "^6.0.0" } }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "normalize-package-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.0.tgz", + "integrity": "sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==", + "dev": true, + "requires": { + "hosted-git-info": "^3.0.6", + "resolve": "^1.17.0", + "semver": "^7.3.2", + "validate-npm-package-license": "^3.0.1" + } + }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } @@ -2650,6 +2844,41 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asar": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz", + "integrity": "sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "chromium-pickle-js": "^0.2.0", + "commander": "^5.0.0", + "glob": "^7.1.6", + "minimatch": "^3.0.4" + }, + "dependencies": { + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -2769,6 +2998,11 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -4247,57 +4481,112 @@ } }, "boxen": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", - "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", "camelcase": "^5.3.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-boxes": "^2.2.0", - "string-width": "^3.0.0", - "term-size": "^1.2.0", - "type-fest": "^0.3.0", - "widest-line": "^2.0.0" + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } @@ -4448,6 +4737,12 @@ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", @@ -4480,33 +4775,68 @@ "dev": true }, "builder-util": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-21.2.0.tgz", - "integrity": "sha512-Nd6CUb6YgDY8EXAXEIegx+1kzKqyFQ5ZM5BoYkeunAlwz/zDJoH1UCyULjoS5wQe5czNClFQy07zz2bzYD0Z4A==", + "version": "22.10.4", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-22.10.4.tgz", + "integrity": "sha512-XdcbFG3otEkNRKxW2wS1npNviCb/IrzusEQ55lMB+6YEHxBOfTbf8vnPt0pDumfwmxls9xczABU+mfqN/W4uDw==", "dev": true, "requires": { "7zip-bin": "~5.0.3", - "@types/debug": "^4.1.4", - "app-builder-bin": "3.4.3", + "@types/debug": "^4.1.5", + "@types/fs-extra": "^9.0.5", + "app-builder-bin": "3.5.12", "bluebird-lst": "^1.0.9", - "builder-util-runtime": "8.3.0", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "fs-extra": "^8.1.0", + "builder-util-runtime": "8.7.3", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "fs-extra": "^9.0.1", "is-ci": "^2.0.0", - "js-yaml": "^3.13.1", - "source-map-support": "^0.5.13", - "stat-mode": "^0.3.0", - "temp-file": "^3.3.4" + "js-yaml": "^3.14.1", + "source-map-support": "^0.5.19", + "stat-mode": "^1.0.0", + "temp-file": "^3.3.7" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "ms": "^2.1.1" + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" } }, "esprima": { @@ -4515,21 +4845,16 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -4549,34 +4874,43 @@ "dev": true }, "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "builder-util-runtime": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.3.0.tgz", - "integrity": "sha512-CSOdsYqf4RXIHh1HANPbrZHlZ9JQJXSuDDloblZPcWQVN62inyYoTQuSmY3KrgefME2Sv3Kn2MxHvbGQHRf8Iw==", + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.3.tgz", + "integrity": "sha512-1Q2ReBqFblimF5g/TLg2+0M5Xzv0Ih5LxJ/BMWXvEy/e6pQKeeEpbkPMGsN6OiQgkygaZo5VXCXIjOkOQG5EoQ==", "dev": true, "requires": { - "debug": "^4.1.1", + "debug": "^4.3.2", "sax": "^1.2.4" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -5239,9 +5573,9 @@ } }, "cli-boxes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", - "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, "cli-cursor": { @@ -5253,6 +5587,54 @@ "restore-cursor": "^2.0.0" } }, + "cli-truncate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", + "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", + "dev": true, + "optional": true, + "requires": { + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "optional": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "optional": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", @@ -5627,17 +6009,61 @@ } }, "configstore": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", - "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + } } }, "connect": { @@ -5934,9 +6360,9 @@ } }, "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "css": { @@ -6535,6 +6961,35 @@ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz", "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs=" }, + "dir-compare": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-2.4.0.tgz", + "integrity": "sha512-l9hmu8x/rjVC9Z2zmGzkhOEowZvW7pmYws5CWHutg8u1JgvsKWMx7Q/UODeu4djLZ4FgW5besw5yvMQnBHzuCA==", + "dev": true, + "requires": { + "buffer-equal": "1.0.0", + "colors": "1.0.3", + "commander": "2.9.0", + "minimatch": "3.0.4" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + } + } + }, "dir-glob": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", @@ -6556,18 +7011,18 @@ } }, "dmg-builder": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-21.2.0.tgz", - "integrity": "sha512-9cJEclnGy7EyKFCoHDYDf54pub/t92CQapyiUxU0w9Bj2vUvfoDagP1PMiX4XD5rPp96141h9A+QN0OB4VgvQg==", + "version": "22.10.4", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-22.10.4.tgz", + "integrity": "sha512-+28HZgKAuyCQnQwLSAwkHUqtMB/egHF5ACUABCB4Nev02/ZfjFPUTF/WloTaEbue34zLLUGxPXh+BJF8Xw26ow==", "dev": true, "requires": { - "app-builder-lib": "~21.2.0", - "bluebird-lst": "^1.0.9", - "builder-util": "~21.2.0", - "fs-extra": "^8.1.0", - "iconv-lite": "^0.5.0", - "js-yaml": "^3.13.1", - "sanitize-filename": "^1.6.2" + "app-builder-lib": "22.10.4", + "builder-util": "22.10.4", + "dmg-license": "^1.0.8", + "fs-extra": "^9.0.1", + "iconv-lite": "^0.6.2", + "js-yaml": "^3.14.1", + "sanitize-filename": "^1.6.3" }, "dependencies": { "esprima": { @@ -6576,30 +7031,19 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "iconv-lite": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.0.tgz", - "integrity": "sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -6608,6 +7052,24 @@ } } }, + "dmg-license": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dmg-license/-/dmg-license-1.0.8.tgz", + "integrity": "sha512-47GOb6b4yVzpovXC34heXElpH++ICg9GuWBeOTaokUNLAoAdWpE4VehudYEEtu96j2jXsgQWYf78nW7r+0Y3eg==", + "dev": true, + "optional": true, + "requires": { + "@types/plist": "^3.0.1", + "@types/verror": "^1.10.3", + "ajv": "^6.10.0", + "cli-truncate": "^1.1.0", + "crc": "^3.8.0", + "iconv-corefoundation": "^1.1.5", + "plist": "^3.0.1", + "smart-buffer": "^4.0.2", + "verror": "^1.10.0" + } + }, "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -6794,10 +7256,13 @@ "dev": true }, "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", - "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", - "dev": true + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", + "dev": true, + "requires": { + "jake": "^10.6.1" + } }, "electron": { "version": "7.2.4", @@ -6819,35 +7284,74 @@ } }, "electron-builder": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-21.2.0.tgz", - "integrity": "sha512-x8EXrqFbAb2L3N22YlGar3dGh8vwptbB3ovo3OF6K7NTpcsmM2zEoJv7GhFyX73rNzSG2HaWpXwGAtOp2JWiEw==", + "version": "22.10.4", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-22.10.4.tgz", + "integrity": "sha512-V+JtiizJd3kt24TT+0OHG7+oPAzjhhjmQVn9G6OC2WE7VBJxrDuD6lMVRgo6WlU8uvDCh7fTRUsdh0Tnu0GeQA==", "dev": true, "requires": { - "app-builder-lib": "21.2.0", + "@types/yargs": "^15.0.12", + "app-builder-lib": "22.10.4", "bluebird-lst": "^1.0.9", - "builder-util": "21.2.0", - "builder-util-runtime": "8.3.0", - "chalk": "^2.4.2", - "dmg-builder": "21.2.0", - "fs-extra": "^8.1.0", + "builder-util": "22.10.4", + "builder-util-runtime": "8.7.3", + "chalk": "^4.1.0", + "dmg-builder": "22.10.4", + "fs-extra": "^9.0.1", "is-ci": "^2.0.0", "lazy-val": "^1.0.4", - "read-config-file": "5.0.0", - "sanitize-filename": "^1.6.2", - "update-notifier": "^3.0.1", - "yargs": "^13.3.0" + "read-config-file": "6.0.0", + "sanitize-filename": "^1.6.3", + "update-notifier": "^5.0.1", + "yargs": "^16.2.0" }, "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } @@ -6985,29 +7489,74 @@ } }, "electron-publish": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-21.2.0.tgz", - "integrity": "sha512-mWavuoWJe87iaeKd0I24dNWIaR+0yRzshjNVqGyK019H766fsPWl3caQJnVKFaEyrZRP397v4JZVG0e7s16AxA==", + "version": "22.10.4", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.10.4.tgz", + "integrity": "sha512-cjVM0+9DQoV4TWfH8lVWoelJ89O2i5yDARVp5GCMHrB43XEU0Nr5eKYysgsbOSnZk5W8z1vfGpFWHj+AeAEDYg==", "dev": true, "requires": { + "@types/fs-extra": "^9.0.5", "bluebird-lst": "^1.0.9", - "builder-util": "~21.2.0", - "builder-util-runtime": "8.3.0", - "chalk": "^2.4.2", - "fs-extra": "^8.1.0", + "builder-util": "22.10.4", + "builder-util-runtime": "8.7.3", + "chalk": "^4.1.0", + "fs-extra": "^9.0.1", "lazy-val": "^1.0.4", - "mime": "^2.4.4" + "mime": "^2.4.7" }, "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "mime": { + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.7.tgz", + "integrity": "sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } @@ -7304,6 +7853,18 @@ "through": "~2.3.6" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -7800,34 +8361,6 @@ "safe-buffer": "^5.1.1" } }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, "exit-hook": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", @@ -8137,6 +8670,15 @@ "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==" }, + "filelist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz", + "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -8632,14 +9174,37 @@ "dev": true }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" + }, + "dependencies": { + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" + } } }, "fs-write-stream-atomic": { @@ -9367,12 +9932,6 @@ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, "get-uri": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.4.tgz", @@ -9481,12 +10040,20 @@ } }, "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "1.3.7" + }, + "dependencies": { + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + } } }, "global-modules": { @@ -10447,6 +11014,16 @@ "integrity": "sha1-pls0RZrWNnrbs3B6gqPJ+RYWcDA=", "dev": true }, + "iconv-corefoundation": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.5.tgz", + "integrity": "sha512-hI4m7udfV04OcjleOmDaR4gwXnH4xumxN+ZmywHDiKf2CmAzsT9SVYe7Y4pdnQbyZfXwAQyrElykbE5PrPRfmQ==", + "dev": true, + "optional": true, + "requires": { + "cli-truncate": "^1.1.0" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -10838,6 +11415,15 @@ "ci-info": "^2.0.0" } }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", @@ -10934,13 +11520,21 @@ } }, "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + }, + "dependencies": { + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + } } }, "is-lower-case": { @@ -10974,9 +11568,9 @@ } }, "is-npm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", - "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true }, "is-number": { @@ -11149,9 +11743,9 @@ "dev": true }, "isbinaryfile": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.3.tgz", - "integrity": "sha512-GQ9Gjhp3AsEbo8/L/pA+MYl/c4hRm5O/+uCkF4LMx1a556Wh4/d75H13qu9LldmhU4yKnlfNKBmEcCaze3b2Gw==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.6.tgz", + "integrity": "sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg==", "dev": true }, "isexe": { @@ -11289,6 +11883,26 @@ "semver": "^5.3.0" } }, + "jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "dev": true, + "requires": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + } + } + }, "javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -14215,6 +14829,27 @@ "find-up": "^2.1.0" } }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "dev": true, + "optional": true, + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" + }, + "dependencies": { + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true, + "optional": true + } + } + }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -14994,6 +15629,15 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -15136,16 +15780,15 @@ } }, "read-config-file": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-5.0.0.tgz", - "integrity": "sha512-jIKUu+C84bfnKxyJ5j30CxCqgXWYjZLXuVE/NYlMEpeni+dhESgAeZOZd0JZbg1xTkMmnCdxksDoarkOyfEsOg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.0.0.tgz", + "integrity": "sha512-PHjROSdpceKUmqS06wqwP92VrM46PZSTubmNIMJ5DrMwg1OgenSTSEHIkCa6TiOJ+y/J0xnG1fFwG3M+Oi1aNA==", "dev": true, "requires": { - "dotenv": "^8.0.0", + "dotenv": "^8.2.0", "dotenv-expand": "^5.1.0", - "fs-extra": "^8.1.0", "js-yaml": "^3.13.1", - "json5": "^2.1.0", + "json5": "^2.1.2", "lazy-val": "^1.0.4" }, "dependencies": { @@ -15155,21 +15798,10 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -15177,18 +15809,18 @@ } }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -15690,13 +16322,12 @@ } }, "registry-auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.0.0.tgz", - "integrity": "sha512-lpQkHxd9UL6tb3k/aHAVfnVtn+Bcs9ob5InuFLLEDqSqeq+AljB8GZW9xY0x7F+xYwEcjKe07nyoxzEYz6yvkw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { - "rc": "^1.2.8", - "safe-buffer": "^5.0.1" + "rc": "^1.2.8" } }, "registry-url": { @@ -16327,12 +16958,20 @@ "optional": true }, "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "send": { @@ -17203,9 +17842,9 @@ } }, "stat-mode": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.3.0.tgz", - "integrity": "sha512-QjMLR0A3WwFY2aZdV0okfFEJB5TRjkggXZjxP3A1RsWsNHNu3YPv8btmtc6iCFZ0Rul3FE93OYogvhOUClU+ng==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz", + "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", "dev": true }, "static-extend": { @@ -17627,9 +18266,9 @@ } }, "temp-file": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.6.tgz", - "integrity": "sha512-7TPldi8QJqRlPIF/Y33mVvo8+xDfi6+aVTCK4CrCaLqCoaOnVtf3SA4hCU0T5nhYDdOC7erw7o2uWfvijlk4Ug==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.7.tgz", + "integrity": "sha512-9tBJKt7GZAQt/Rg0QzVWA8Am8c1EFl+CAv04/aBVqlx5oyfQ508sFIABshQ0xbZu6mBrFLWIUXO/bbLYghW70g==", "dev": true, "requires": { "async-exit-hook": "^2.0.1", @@ -17650,13 +18289,10 @@ } }, "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true }, "terser": { "version": "4.3.9", @@ -18239,9 +18875,9 @@ "dev": true }, "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "type-is": { @@ -18265,6 +18901,15 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", @@ -18351,12 +18996,12 @@ } }, "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "^2.0.0" } }, "universalify": { @@ -18424,23 +19069,100 @@ "dev": true }, "update-notifier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", - "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.0.1.tgz", + "integrity": "sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg==", "dev": true, "requires": { - "boxen": "^3.0.0", - "chalk": "^2.0.1", - "configstore": "^4.0.0", + "boxen": "^4.2.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^3.0.0", + "is-installed-globally": "^0.3.2", + "is-npm": "^5.0.0", "is-yarn-global": "^0.3.0", - "latest-version": "^5.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.2", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "upper-case": { @@ -20156,43 +20878,50 @@ } }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { - "string-width": "^2.1.1" + "string-width": "^4.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.0" } } } @@ -20352,9 +21081,9 @@ } }, "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xml-char-classes": { @@ -20373,6 +21102,13 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==" }, + "xmldom": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", + "dev": true, + "optional": true + }, "xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", @@ -20405,103 +21141,115 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "color-convert": "^2.0.1" } }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, diff --git a/package.json b/package.json index 6272ab3..0222052 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ }, "nsis": { "oneClick": false, + "perMachine": true, "allowToChangeInstallationDirectory": true }, "linux": { @@ -94,6 +95,7 @@ "element-ui": "^2.13.2", "file-url": "^3.0.0", "fs": "0.0.1-security", + "fs-extra": "^9.0.1", "geo-coordinates-parser": "^1.2.4", "geodesy": "^2.2.0", "idb": "^4.0.5", @@ -143,7 +145,7 @@ "del": "^3.0.0", "devtron": "^1.4.0", "electron": "^7.2.4", - "electron-builder": "^21.2.0", + "electron-builder": "^22.10.4", "electron-devtools-installer": "^2.2.4", "eslint": "^4.19.1", "eslint-config-standard": "^11.0.0", diff --git a/src/renderer/components/AirportEdit.vue b/src/renderer/components/AirportEdit.vue index afa3542..9c504ed 100644 --- a/src/renderer/components/AirportEdit.vue +++ b/src/renderer/components/AirportEdit.vue @@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License along with FG Add an selectable airline to {{ icao }} {{ name }} Cancel @@ -193,7 +192,11 @@ export default { }, addAirline () { this.dialogVisible = false - this.$store.dispatch('addAirline', this.airlineCode) + this.airlineCode.split(/[ ,]/).forEach(element => { + if (element.length === 3) { + this.$store.dispatch('addAirline', element) + } + }) }, addFrequency () { this.$store.dispatch('addFrequency', {type: 'AWOS', value: 0}) From e6d473c73e2ceafc04ec0d78eb84d06f1b4021a8 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sat, 2 Jan 2021 22:21:09 +0100 Subject: [PATCH 085/146] #73 pushback above non pushback --- src/renderer/components/EditLayer.vue | 6 ++++++ src/renderer/loaders/groundnet_loader.js | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 0d29af8..2c0a8d2 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -46,6 +46,12 @@ You should have received a copy of the GNU General Public License along with FG // console.log(LSymbol) }, mounted () { + this.$parent.mapObject.createPane('pushback-pane') + this.$parent.mapObject.getPane('pushback-pane').style.zIndex = 512 + + this.$parent.mapObject.createPane('route-pane') + this.$parent.mapObject.getPane('route-pane').style.zIndex = 511 + this.selectionLayerGroup = L.layerGroup(); this.selectionLayerGroup.addTo(this.$parent.mapObject) this.$store.watch( diff --git a/src/renderer/loaders/groundnet_loader.js b/src/renderer/loaders/groundnet_loader.js index 1c3bb26..84c8b6f 100644 --- a/src/renderer/loaders/groundnet_loader.js +++ b/src/renderer/loaders/groundnet_loader.js @@ -176,7 +176,12 @@ exports.readGroundnetXML = function (fDir, icao, force) { var beginlatlon = convert(beginNode.attr('lat') + " " + beginNode.attr('lon')); var endlatlon = convert(endNode.attr('lat') + " " + endNode.attr('lon')); - var polyline = new L.Polyline([[beginlatlon.decimalLatitude, beginlatlon.decimalLongitude], [endlatlon.decimalLatitude, endlatlon.decimalLongitude]], { attributes: {} }).addTo(layerGroup); + var pane = 'route-pane'; + if(n.attr('isPushBackRoute') === '1') { + pane = 'pushback-pane'; + } + + var polyline = new L.Polyline([[beginlatlon.decimalLatitude, beginlatlon.decimalLongitude], [endlatlon.decimalLatitude, endlatlon.decimalLongitude]], { pane: pane, attributes: {} }).addTo(layerGroup); extendTaxiSegment(polyline); polyline.addListeners(); polyline._latlngs[0].attributes = {}; From 4dd17ad7261495e38b44fe52bd0dd6eb14c715d9 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 4 Jan 2021 22:18:38 +0100 Subject: [PATCH 086/146] #107 Tower position editable --- src/renderer/components/EditBar.vue | 1 + src/renderer/components/LeafletSidebar.vue | 4 +- src/renderer/components/TowerEdit.vue | 85 ++++++++++++++++++++++ src/renderer/components/TowerLayer.vue | 12 ++- src/renderer/components/Upload.vue | 51 +++++++++---- src/renderer/loaders/Tower.js | 19 ++++- src/renderer/loaders/tower_loader.js | 9 +-- src/renderer/loaders/tower_writer.js | 52 +++++++++++++ src/renderer/store/modules/Editable.js | 10 +++ 9 files changed, 215 insertions(+), 28 deletions(-) create mode 100644 src/renderer/components/TowerEdit.vue create mode 100644 src/renderer/loaders/tower_writer.js diff --git a/src/renderer/components/EditBar.vue b/src/renderer/components/EditBar.vue index 929e128..908f50f 100644 --- a/src/renderer/components/EditBar.vue +++ b/src/renderer/components/EditBar.vue @@ -138,6 +138,7 @@ You should have received a copy of the GNU General Public License along with FG }, saveDefered () { this.$parent.$parent.$refs.editLayer.save() + this.$parent.$parent.$refs.towerLayer.save() this.$parent.$parent.$refs.editLayer.disableEdit() this.scanGroundnets() Vue.set(this, 'saveDialogVisible', false) diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index 967de5b..f225dbc 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -40,6 +40,7 @@ You should have received a copy of the GNU General Public License along with FG + @@ -75,6 +76,7 @@ You should have received a copy of the GNU General Public License along with FG import L from 'leaflet' import AirportEdit from './AirportEdit' import ArcEdit from './ArcEdit' + import TowerEdit from './TowerEdit' import ArcEditMulti from './ArcEditMulti' import CheckPanel from './CheckPanel' import FileSelect from './FileSelect' @@ -91,7 +93,7 @@ You should have received a copy of the GNU General Public License along with FG export default { name: 'leaflet-sidebar', - components: { Help, AirportEdit, ArcEdit, ArcEditMulti, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, + components: { Help, AirportEdit, ArcEdit, ArcEditMulti, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, TowerEdit, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, props: [], created () { window.addEventListener('keydown', this.doCommand) diff --git a/src/renderer/components/TowerEdit.vue b/src/renderer/components/TowerEdit.vue new file mode 100644 index 0000000..316751a --- /dev/null +++ b/src/renderer/components/TowerEdit.vue @@ -0,0 +1,85 @@ + + + + diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue index aa16b6e..0b0a8b6 100644 --- a/src/renderer/components/TowerLayer.vue +++ b/src/renderer/components/TowerLayer.vue @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with FG import L from 'leaflet' import LEdit from 'leaflet-editable/src/Leaflet.Editable.js' import {readTowerXML} from '../loaders/tower_loader' + import {writeTowerXML} from '../loaders/tower_writer' export default { name: 'tower-layer', @@ -72,8 +73,17 @@ You should have received a copy of the GNU General Public License along with FG } }, save () { - }, + this.layerGroup.eachLayer(l => { + if (l instanceof L.TowerMarker) { + var latitude = l.getLatLng().lat.toFixed(6) + var longitude = l.getLatLng().lng.toFixed(6) + var height = l.elev_m + var o = {latitude: latitude, longitude: longitude, height: height} + writeTowerXML(this.$store.state.Settings.settings.airportsDirectory, l.icao, o) + } + }) + }, setVisible (visible) { if (this.layerGroup !== undefined) { if (visible !== this.visible) { diff --git a/src/renderer/components/Upload.vue b/src/renderer/components/Upload.vue index 3146762..c3cfb7c 100644 --- a/src/renderer/components/Upload.vue +++ b/src/renderer/components/Upload.vue @@ -7,8 +7,12 @@ E-Mail : {{this.$store.state.Settings.settings.email}}
I agree to release the groundnet under GPL v2
{{message}}
+ + Upload Tower + Upload Groundnet + - {{buttonText}} + {{buttonText}}
@@ -54,7 +58,7 @@ }, data () { return { - gplv2: false, message: null, error: false, progress: 0, max: 0, azure: false, success: false, uploading: false, buttonText: 'Upload' + gplv2: false, message: null, error: false, progress: 0, max: 0, azure: false, success: false, uploading: false, buttonText: 'Ok' } }, methods: { @@ -90,18 +94,17 @@ this.error = true; } }, - handleOkClicked () { - if( this.success ) { - // Upload success close - Vue.set(this.$parent, 'uploadVisible', false) - return; - } + closeClicked () { + Vue.set(this.$parent, 'uploadVisible', false) + return; + }, + handleOkClicked (type) { this.uploading = true; var f = path.join(this.$store.state.Settings.settings.airportsDirectory, this.icao[0], this.icao[1], this.icao[2], - this.icao + '.groundnet.new.xml'); + this.icao + `.${type}.new.xml`); if (f == null || !fs.existsSync(f)) { this.message = 'File doesn\'t exist'; @@ -119,7 +122,7 @@ var formData = new FormData(); formData.append("gpl", this.gplv2 ) formData.append("user_email", this.$store.state.Settings.settings.email) - formData.append('groundnet', blob, this.icao + '.groundnet.xml'); + formData.append('groundnet', blob, this.icao + `.${type}.xml`); var parent = this.$parent; var messageField = this.message; @@ -139,15 +142,15 @@ parent.$refs.upload.message == e.srcElement.statusText } else if(JSON.parse(e.srcElement.response).message.match('[A-Z0-9]* Imported Successfully')) { parent.$refs.upload.success = true - parent.$refs.upload.message = 'Uploaded Successfully' - parent.$refs.upload.buttonText = 'Ok' + parent.$refs.upload.message = `${type} Uploaded Successfully` parent.$store.commit('UPLOAD_WIP', parent.$store.state.Airports.currentAirport.icao) } else if(JSON.parse(e.srcElement.response).message === 'XML Errors') { var response = JSON.parse(e.srcElement.response); if (response.validationErrors) { + parent.$refs.upload.message = 'XML Errors : \n'; response.validationErrors.forEach(element => { - parent.$refs.upload.message += element.message + '\r\n'; + parent.$refs.upload.message += element.message + '\n'; }); } } else if(JSON.parse(e.srcElement.response) !== undefined) { @@ -282,7 +285,7 @@ } }, textClass: function () { - return !this.error?'center':'error' + return !this.error?'centermessage':'error' }, title: function () { return `Upload ${this.icao} to groundweb.` @@ -302,6 +305,22 @@ console.error('ICAO being set ' + newValue); } }, + tower_comittable: function () { + var f = path.join(this.$store.state.Settings.settings.airportsDirectory, + this.icao[0], + this.icao[1], + this.icao[2], + this.icao + '.twr.new.xml'); + return fs.existsSync(f) && this.gplv2 && this.max === 0 && this.azure && !this.uploading; + }, + groundnet_comittable: function () { + var f = path.join(this.$store.state.Settings.settings.airportsDirectory, + this.icao[0], + this.icao[1], + this.icao[2], + this.icao + '.groundnet.new.xml'); + return fs.existsSync(f) && this.$store.state.Check.results.filter(a => a.id>=0).length === 0 && this.gplv2 && this.max === 0 && this.azure && !this.uploading + }, comittable: function () { return this.$store.state.Check.results.filter(a => a.id>=0).length === 0 && this.gplv2 && this.max === 0 && this.azure && !this.uploading }, @@ -313,7 +332,9 @@ diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js index 819aa7c..81dce99 100644 --- a/src/renderer/loaders/Tower.js +++ b/src/renderer/loaders/Tower.js @@ -14,6 +14,7 @@ You should have received a copy of the GNU General Public License along with FG const convert = require('geo-coordinates-parser'); const fs = require('fs'); const path = require('path'); +const store = require('../store'); /**http://wiki.openstreetmap.org/wiki/Zoom_levels*/ @@ -60,19 +61,29 @@ L.TowerMarker = L.Marker.extend({ pixelValue: function (latitude, meters, zoomLevel) { return meters / metersPerPixel(latitude, zoomLevel); }, - - }); L.TowerMarker.addInitHook(function(){ this.svg = this.stripSVG('tower.svg'); this.iconSize = 64; + this.on('dragstart', function (event) { + console.debug("Drag Tower : ", event); + }); + this.on('dragend', function (event) { + console.debug("DragEnd Tower : ", event); + store.default.dispatch('setTowerCoords', + event.target.getLatLng().lat.toFixed(6) + ' ' + + event.target.getLatLng().lng.toFixed(6) + ' ' + + event.target.elev_m); + }); }); //Builds a marker for a ai or multiplayer aircraft var tower = function (n, options) { - var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); - return new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], {heading: 0, pane: 'tower-pane'}); + var latlon = convert(n.find('lat/text()').text() + " " + n.find('lon/text()').text()); + var marker = new L.TowerMarker([latlon.decimalLatitude, latlon.decimalLongitude], {pane: 'tower-pane'}); + marker.elev_m = n.find('elev-m/text()').text(); + return marker; } module.exports = tower; diff --git a/src/renderer/loaders/tower_loader.js b/src/renderer/loaders/tower_loader.js index f932126..b44932d 100644 --- a/src/renderer/loaders/tower_loader.js +++ b/src/renderer/loaders/tower_loader.js @@ -52,16 +52,11 @@ exports.readTowerXML = function (fDir, icao, force) { } var towerNodes = xml.find('PropertyList/tower/twr'); - console.log("Tower " + towerNodes.length); - - var merged = new Array(); - - var nodesLookup = {}; - featureLookup = []; - + console.log("Towers " + towerNodes.length); towerNodes.map(n => { var towerIcon = tower(n, layerGroup); + towerIcon['icao'] = icao towerIcon.addTo(layerGroup); /* //DEBUG Code diff --git a/src/renderer/loaders/tower_writer.js b/src/renderer/loaders/tower_writer.js new file mode 100644 index 0000000..14bff2b --- /dev/null +++ b/src/renderer/loaders/tower_writer.js @@ -0,0 +1,52 @@ +/* eslint-disable */ +const fs = require('fs'); +const path = require('path'); + +const store = require('../store'); + +const util = require('util'); + +const mathjs = require('mathjs'); + +var builder = require('xmlbuilder'); + +var featureLookup = []; +var parkings = []; +var pushBackNodeLookup = []; + + +exports.writeTowerXML = function (fDir, icao, coordinates) { + try { + try { fs.mkdirSync(path.join(fDir), { recursive: true })} catch (err) { } + try { fs.mkdirSync(path.join(fDir, icao[0]),{ recursive: true })} catch (err) { } + try { fs.mkdirSync(path.join(fDir, icao[0], icao[1]), { recursive: true })} catch (err) { } + try { fs.mkdirSync(path.join(fDir, icao[0], icao[1], icao[2]), { recursive: true })} catch (err) { } + + var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.twr.new.xml'); + var fBak = path.join(fDir, icao[0], icao[1], icao[2], icao + '.twr.bak.xml'); + + if( fs.existsSync(f) ) { + fs.copyFileSync(f, fBak); + } + if (f == null) + return; + var xmlObj = { PropertyList: { tower: { twr: map(coordinates)} } }; + + xmlString = builder.create(xmlObj).end({ pretty: true }); + fs.writeFileSync(f, xmlString); + console.debug(xmlString); + } catch (error) { + console.error(error); + } + return; +} + +var map = function (o) { + console.debug(o); + /** + -1.6286902 + 59.53396633 + 3.05 + */ + return { lon: o.longitude, lat: o.latitude, 'elev-m': o.height}; +} \ No newline at end of file diff --git a/src/renderer/store/modules/Editable.js b/src/renderer/store/modules/Editable.js index 45270bf..947863d 100644 --- a/src/renderer/store/modules/Editable.js +++ b/src/renderer/store/modules/Editable.js @@ -158,6 +158,13 @@ const mutations = { 'SET_EDIT_NODE_COORDS' (state, coords) { Vue.set(state.data.node, 'coords', coords) }, + 'SET_EDIT_TOWER_COORDS' (state, coords) { + state.type = 'tower' + state.data.tower = { coords: {} } + Vue.set(state.data.tower.coords, 'latitude', coords.split(' ')[0]) + Vue.set(state.data.tower.coords, 'longitude', coords.split(' ')[1]) + Vue.set(state.data.tower.coords, 'height', coords.split(' ')[2]) + }, 'SET_EDIT_ISONRUNWAY' (state, isOnRunway) { Vue.set(state.data.node, 'isOnRunway', isOnRunway) } @@ -194,6 +201,9 @@ const actions = { async setNode (context, node) { context.commit('SET_EDIT_NODE', node.attributes) context.commit('SET_EDIT_NODE_COORDS', node.lat.toFixed(6) + ' ' + node.lng.toFixed(6)) + }, + async setTowerCoords (context, node) { + context.commit('SET_EDIT_TOWER_COORDS', node) } } From 9b757150d56fbb19a481d8cce8ba7d0aa6ae87c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 21:41:11 +0000 Subject: [PATCH 087/146] build(deps): bump axios from 0.18.1 to 0.21.1 Bumps [axios](https://github.com/axios/axios) from 0.18.1 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.18.1...v0.21.1) Signed-off-by: dependabot[bot] --- package-lock.json | 28 ++++++++++++++++------------ package.json | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f8865e..b0a2ede 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.26", + "version": "0.0.27", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2814,12 +2814,18 @@ "dev": true }, "axios": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", - "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" + "follow-redirects": "^1.10.0" + }, + "dependencies": { + "follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + } } }, "babel-code-frame": { @@ -6209,6 +6215,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -8548,6 +8555,7 @@ "version": "1.5.10", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, "requires": { "debug": "=3.1.0" } @@ -10818,11 +10826,6 @@ "binary-extensions": "^1.0.0" } }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" - }, "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", @@ -12894,7 +12897,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "multicast-dns": { "version": "6.2.3", diff --git a/package.json b/package.json index 6272ab3..717040a 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "dependencies": { "@turf/intersect": "^6.1.3", "@turf/turf": "^5.1.6", - "axios": "^0.18.1", + "axios": "^0.21.1", "coordinate-parser": "^1.0.3", "dijkstrajs": "^1.0.1", "electron-debug": "^3.0.1", From 1bba5e215713073fd5c9d3bfd15dc3d592cfe668 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 7 Jan 2021 16:51:23 +0100 Subject: [PATCH 088/146] #108 --- src/renderer/components/EditBar.vue | 1 + src/renderer/components/LeafletSidebar.vue | 4 +- src/renderer/components/ThresholdEdit.vue | 95 ++++++++++++++++ src/renderer/components/ThresholdLayer.vue | 46 +++++++- src/renderer/components/TowerLayer.vue | 20 ++-- src/renderer/components/Upload.vue | 21 ++++ src/renderer/loaders/Threshold.js | 85 +++++++++++++-- src/renderer/loaders/threshold_loader.js | 29 +++-- src/renderer/loaders/threshold_writer.js | 120 +++++++++++++++++++++ src/renderer/loaders/tower_writer.js | 11 ++ src/renderer/store/modules/Editable.js | 16 ++- 11 files changed, 408 insertions(+), 40 deletions(-) create mode 100644 src/renderer/components/ThresholdEdit.vue create mode 100644 src/renderer/loaders/threshold_writer.js diff --git a/src/renderer/components/EditBar.vue b/src/renderer/components/EditBar.vue index 908f50f..074ccbe 100644 --- a/src/renderer/components/EditBar.vue +++ b/src/renderer/components/EditBar.vue @@ -139,6 +139,7 @@ You should have received a copy of the GNU General Public License along with FG saveDefered () { this.$parent.$parent.$refs.editLayer.save() this.$parent.$parent.$refs.towerLayer.save() + this.$parent.$parent.$refs.thresholdLayer.save() this.$parent.$parent.$refs.editLayer.disableEdit() this.scanGroundnets() Vue.set(this, 'saveDialogVisible', false) diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index f225dbc..c9cf7ed 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -40,6 +40,7 @@ You should have received a copy of the GNU General Public License along with FG + @@ -82,6 +83,7 @@ You should have received a copy of the GNU General Public License along with FG import FileSelect from './FileSelect' import Help from './Help' import NodeEdit from './NodeEdit' + import ThresholdEdit from './ThresholdEdit' import ParkingEdit from './ParkingEdit' import ParkingGroupEdit from './ParkingGroupEdit' // import ParkingList from './ParkingList' @@ -93,7 +95,7 @@ You should have received a copy of the GNU General Public License along with FG export default { name: 'leaflet-sidebar', - components: { Help, AirportEdit, ArcEdit, ArcEditMulti, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, TowerEdit, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, + components: { Help, AirportEdit, ArcEdit, ArcEditMulti, CheckPanel, NodeEdit, ParkingEdit, ParkingGroupEdit, RunScan, TowerEdit, ThresholdEdit, FileSelect, SettingsPanel, Search, Upload, WorkInProgress }, props: [], created () { window.addEventListener('keydown', this.doCommand) diff --git a/src/renderer/components/ThresholdEdit.vue b/src/renderer/components/ThresholdEdit.vue new file mode 100644 index 0000000..7b2710c --- /dev/null +++ b/src/renderer/components/ThresholdEdit.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index fff9563..dfabab7 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -5,6 +5,7 @@ import L from 'leaflet' import LEdit from 'leaflet-editable/src/Leaflet.Editable.js' import {readThresholdXML} from '../loaders/threshold_loader' + import {writeThresholdXML} from '../loaders/threshold_writer' export default { name: 'edit-layer', @@ -12,10 +13,17 @@ created () { }, mounted () { - console.log(LMap) - console.log(LMarker) - console.log(L) - console.log(LEdit) + console.debug(LMap, LMarker, L, LEdit) + this.$store.watch( + function (state) { + return state.Editable.data.threshold + }, + () => { this.editedThreshold() } + , + { + deep: true + } + ) }, beforeDestroy () { this.remove() @@ -25,6 +33,17 @@ } }, methods: { + editedThreshold () { + var rwy = this.$store.state.Editable.data.threshold.runway + var displacement = this.$store.state.Editable.data.threshold.displacement + this.layerGroup.eachLayer(l => { + if (l instanceof L.Threshold) { + if (l.rwy === rwy) { + l.setDisplacement(displacement) + } + } + }) + }, getLayer () { return this.layerGroup }, @@ -65,6 +84,25 @@ } } }, + save () { + if (this.layerGroup) { + var list = {} + + this.layerGroup.eachLayer(l => { + if (l instanceof L.Threshold) { + var latitude = l.originLatLng[0].toFixed(6) + var longitude = l.originLatLng[1].toFixed(6) + + if (list[l.index] === undefined) { + list[l.index] = [] + } + var o = {latitude: latitude, longitude: longitude, index: l.index, rwy: l.rwy, heading: l.heading, displacement: l.displacement, stopw_m: l.stopw_m} + list[l.index].push(o) + } + }) + writeThresholdXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, list) + } + }, zoomUpdated () { if (this.layerGroup) { this.layerGroup.eachLayer(l => { diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue index 0b0a8b6..72949b9 100644 --- a/src/renderer/components/TowerLayer.vue +++ b/src/renderer/components/TowerLayer.vue @@ -73,16 +73,18 @@ You should have received a copy of the GNU General Public License along with FG } }, save () { - this.layerGroup.eachLayer(l => { - if (l instanceof L.TowerMarker) { - var latitude = l.getLatLng().lat.toFixed(6) - var longitude = l.getLatLng().lng.toFixed(6) - var height = l.elev_m + if (this.layerGroup) { + this.layerGroup.eachLayer(l => { + if (l instanceof L.TowerMarker) { + var latitude = l.getLatLng().lat.toFixed(6) + var longitude = l.getLatLng().lng.toFixed(6) + var height = l.elev_m - var o = {latitude: latitude, longitude: longitude, height: height} - writeTowerXML(this.$store.state.Settings.settings.airportsDirectory, l.icao, o) - } - }) + var o = {latitude: latitude, longitude: longitude, height: height} + writeTowerXML(this.$store.state.Settings.settings.airportsDirectory, l.icao, o) + } + }) + } }, setVisible (visible) { if (this.layerGroup !== undefined) { diff --git a/src/renderer/components/Upload.vue b/src/renderer/components/Upload.vue index c3cfb7c..f1113fc 100644 --- a/src/renderer/components/Upload.vue +++ b/src/renderer/components/Upload.vue @@ -1,3 +1,15 @@ + + @@ -152,8 +223,7 @@ }, data () { - return { ok: true - } + return { ok: true, activeName: '0' } }, methods: { flightgearDirectorySelect: function (flightgearDirectory) { @@ -173,6 +243,16 @@ } }, computed: { + numberOfSaves: { + // getter + get: function () { + return this.$store.state.Settings.settings.numberOfSaves + }, + // setter + set: function (newValue) { + this.$store.commit('SET_NUMBER_OF_SAVES', newValue) + } + }, email: { // getter get: function () { @@ -293,5 +373,4 @@ padding: 5px; background-color: red; } - diff --git a/src/renderer/loaders/groundnet_loader.js b/src/renderer/loaders/groundnet_loader.js index 84c8b6f..45cd4ab 100644 --- a/src/renderer/loaders/groundnet_loader.js +++ b/src/renderer/loaders/groundnet_loader.js @@ -29,22 +29,37 @@ function addFrequencies (type, value) { } exports.addFeature = function (feature) { - featureLookup[feature.id] = new Array(); + featureLookup[feature.id] = []; } -exports.readGroundnetXML = function (fDir, icao, force) { +exports.listSaves = function (fDir, icao) { + var directory = path.join(fDir, icao[0], icao[1], icao[2]); + var files = fs.readdirSync(directory); + var ret = files + .filter(f => f.includes(icao) ) + .filter(f => f.includes('groundnet') ) + .map(f => { + try { + var fileDate = fs.lstatSync(path.join(directory, f)); + return {file: f, mtime: `${fileDate.mtime}`, mtimeMs: `${fileDate.mtimeMs}`}; + } catch (error) { + console.error(error); + } + }); + ret.forEach( f => { + console.debug(f); + }); + return ret; +} + +exports.readGroundnetXML = function (fDir, icao, f) { try { store.default.dispatch('setGroundnetLoaded', false); var layerGroup = L.layerGroup(); layerGroup.maxId = 0; - var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.xml'); - var fNew = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml'); - if (f == null || (!fs.existsSync(f) && force)|| (!fs.existsSync(f) && !fs.existsSync(fNew) )) + if (f == null || (!fs.existsSync(f) )) return layerGroup; - if (fNew != null && fs.existsSync(fNew) && !force) { - f = fNew; - } var features = new Array(); diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index da34819..bb8c9f2 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -65,11 +65,22 @@ exports.writeGroundnetXML = function (fDir, icao, featureList) { try { fs.mkdirSync(path.join(fDir, icao[0], icao[1]), { recursive: true })} catch (err) { } try { fs.mkdirSync(path.join(fDir, icao[0], icao[1], icao[2]), { recursive: true })} catch (err) { } + var fileNames = []; + for (let index = 1; index <= store.default.state.Settings.settings.numberOfSaves; index++) { + fileNames.push(path.join(fDir, icao[0], icao[1], icao[2], icao + `.groundnet.bak.${index}.xml`)); + } var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml'); - var fBak = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.bak.xml'); if( fs.existsSync(f) ) { - fs.copyFileSync(f, fBak); + var previous = ''; + fileNames.reverse().forEach(fBak => { + if (fs.existsSync(fBak) && previous !== '') { + console.debug( `Copy ${fBak} to ${previous}`); + fs.copyFileSync(fBak, previous); + } + previous = fBak; + }); + fs.copyFileSync(f, previous); } if (f == null) return; diff --git a/src/renderer/store/modules/Settings.js b/src/renderer/store/modules/Settings.js index a835589..83ac9b7 100644 --- a/src/renderer/store/modules/Settings.js +++ b/src/renderer/store/modules/Settings.js @@ -3,7 +3,7 @@ const path = require('path'); const fs = require('fs'); const state = { - settings: { flightgearDirectory: '.', testDirectory: '.', email: 'flightgearairports@example.org', name: 'unknown', phi_url: 'http://localhost:8080' }, + settings: { numberOfSaves: 1, flightgearDirectory: '.', testDirectory: '.', email: 'flightgearairports@example.org', name: 'unknown', phi_url: 'http://localhost:8080' }, zoom: 14, center: [47.413220, -1.219482], bounds: undefined, @@ -50,6 +50,9 @@ const mutations = { 'SET_NAME'(state, name) { state.settings.name = name }, + 'SET_NUMBER_OF_SAVES'(state, numberOfSaves) { + state.settings.numberOfSaves = numberOfSaves + }, 'SET_PHI_URL'(state, phi_url) { state.settings.phi_url = phi_url }, From ba1f5ef2e9c4f2d2784a5c4132302257b6717a81 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 15 Jan 2021 20:54:15 +0100 Subject: [PATCH 100/146] #120 --- src/renderer/components/TowerLayer.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/components/TowerLayer.vue b/src/renderer/components/TowerLayer.vue index b55e411..07e9f0a 100644 --- a/src/renderer/components/TowerLayer.vue +++ b/src/renderer/components/TowerLayer.vue @@ -41,6 +41,10 @@ You should have received a copy of the GNU General Public License along with FG load (icao) { this.$parent.mapObject.createPane('tower-pane') this.$parent.mapObject.getPane('tower-pane').style.zIndex = 550 + if (this.layerGroup !== undefined) { + this.layerGroup.removeFrom(this.$parent.mapObject) + } + // Callback for add this.layerGroup = readTowerXML(this.$store.state.Settings.settings.airportsDirectory, icao, this.read) if (!this.layerGroup) { From d3daa8724478f01850d186012e39fc15ae8d4650 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 17 Jan 2021 14:44:28 +0100 Subject: [PATCH 101/146] #117 --- src/renderer/components/EditLayer.vue | 46 +++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 685f8e7..c3df1d0 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -134,11 +134,18 @@ You should have received a copy of the GNU General Public License along with FG } this.$parent.$parent.setIcao(icao) this.icao = icao - var f = path.join(this.$store.state.Settings.settings.airportsDirectory, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml'); - if (!fs.existsSync(f)) { - f = path.join(this.$store.state.Settings.settings.airportsDirectory, icao[0], icao[1], icao[2], icao + '.groundnet.xml'); + var f = ''; + if (!filename) { + var f = path.join(this.$store.state.Settings.settings.airportsDirectory, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml') + if (!fs.existsSync(f)) { + f = path.join(this.$store.state.Settings.settings.airportsDirectory, icao[0], icao[1], icao[2], icao + '.groundnet.xml') + } + } else { + f = path.join(this.$store.state.Settings.settings.airportsDirectory, icao[0], icao[1], icao[2], filename) } + console.info(`Reload from : ${f}`) + this.groundnetLayerGroup = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao, f) if (this.groundnetLayerGroup === undefined) { console.warn('Groundnet for ICAO not loaded ' + icao) @@ -264,6 +271,9 @@ You should have received a copy of the GNU General Public License along with FG console.log('Remove : ' + this.$store.state.Editable.type) } }, + isOnRunway(latlng) { + return this.$parent.$parent.$refs.pavementLayer.isOnRunway(latlng) + }, findRouteToPushback (index) { if (this.featureLookup===undefined || this.featureLookup[index]===undefined) { return @@ -795,20 +805,7 @@ You should have received a copy of the GNU General Public License along with FG }) if (!hasRunwayNode && isOnRunway && latlng !== undefined) { - this.$store.state.Editable.data.node.holdPointType - const icon = new L.DivIcon({ - className: 'custom-div-icon', - html: "
", - iconSize: [30, 42], - iconAnchor: [15, 42] - }); - const node = new L.RunwayNode(latlng, { icon: icon }); - node.glueindex = nIndex; - node.addTo(this.groundnetLayerGroup); - this.featureLookup[nIndex].push(node); - node.featureLookup = this.featureLookup; - node.addListeners(); - node.extensions(); + this.addRunwayNode(latlng, nIndex) } if (!hasHoldPointNode && isHoldPoint) { var fa_icon = null; @@ -833,6 +830,21 @@ You should have received a copy of the GNU General Public License along with FG node.extensions(); } }, + addRunwayNode (latlng, nIndex) { + const icon = new L.DivIcon({ + className: 'custom-div-icon', + html: "
", + iconSize: [30, 42], + iconAnchor: [15, 42] + }); + const node = new L.RunwayNode(latlng, { icon: icon }); + node.glueindex = nIndex; + node.addTo(this.groundnetLayerGroup); + this.featureLookup[nIndex].push(node); + node.featureLookup = this.featureLookup; + node.addListeners(); + node.extensions(); + }, // Finde nearest node closestLayerSnap (eventLatlng, snap) { var layers = [] From 293655987378615e830d2ff02330fe79ec33c60d Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 17 Jan 2021 14:45:00 +0100 Subject: [PATCH 102/146] #119 --- package-lock.json | 34 +-- package.json | 8 +- src/renderer/components/PavementLayer.vue | 16 ++ src/renderer/leaflet/Runway.js | 18 +- .../loaders/TaxiwaySegmentExtender.js | 197 +++++++++--------- src/renderer/utils/check.js | 4 +- 6 files changed, 166 insertions(+), 111 deletions(-) diff --git a/package-lock.json b/package-lock.json index a94f034..991ac69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2091,9 +2091,9 @@ "dev": true }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "acorn-jsx": { @@ -7583,9 +7583,9 @@ "dev": true }, "element-ui": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.2.tgz", - "integrity": "sha512-r761DRPssMPKDiJZWFlG+4e4vr0cRG/atKr3Eqr8Xi0tQMNbtmYU1QXvFnKiFPFFGkgJ6zS6ASkG+sellcoHlQ==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz", + "integrity": "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==", "requires": { "async-validator": "~1.8.1", "babel-helper-vue-jsx-merge-props": "^2.0.0", @@ -8013,9 +8013,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -8302,12 +8302,20 @@ "dev": true }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "esrecurse": { diff --git a/package.json b/package.json index e0db463..4863e3a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,11 @@ "version": "0.0.28", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", - "license": "GPL v3", + "license": "GPL-3.0", + "repository": { + "type" : "git", + "url" : "https://github.com/Portree-Kid/flightgear-airports.git" + }, "main": "./dist/electron/main.js", "scripts": { "build": "node .electron-vue/build.js && electron-builder", @@ -92,7 +96,7 @@ "coordinate-parser": "^1.0.3", "dijkstrajs": "^1.0.1", "electron-debug": "^3.0.1", - "element-ui": "^2.14.1", + "element-ui": "^2.13.2", "file-url": "^3.0.0", "fs": "0.0.1-security", "fs-extra": "^9.0.1", diff --git a/src/renderer/components/PavementLayer.vue b/src/renderer/components/PavementLayer.vue index 3198945..e0118b7 100644 --- a/src/renderer/components/PavementLayer.vue +++ b/src/renderer/components/PavementLayer.vue @@ -5,6 +5,7 @@ import L from 'leaflet' import LEdit from 'leaflet-editable/src/Leaflet.Editable.js' import {readPavement} from '../loaders/pavement_loader' + import * as turf from '@turf/turf' export default { name: 'edit-layer', @@ -75,6 +76,21 @@ this.deferredMountedTo(this.$parent.mapObject) } }, + isOnRunway (latlng) { + var ret = false + this.pavement.eachLayer(l => { + if (l instanceof L.RunwayPolygon) { + console.debug(l) + if (turf.booleanContains(l.turfyRunway, this.latToTurf(latlng))) { + ret = true + } + } + }) + return ret + }, + latToTurf (turfPoint) { + return turf.point([turfPoint.lng, turfPoint.lat]) + }, setVisible (visible) { if (this.pavement !== undefined) { if (visible !== this.visible) { diff --git a/src/renderer/leaflet/Runway.js b/src/renderer/leaflet/Runway.js index 9db8c86..b13121c 100644 --- a/src/renderer/leaflet/Runway.js +++ b/src/renderer/leaflet/Runway.js @@ -12,14 +12,30 @@ You should have received a copy of the GNU General Public License along with FG /* eslint-disable */ +const turf = require('@turf/turf') + L.RunwayPolygon = L.Polygon.extend({ + turfyRunway: [], + + setTurfy: function (runwayPoints) { + var latLngs = runwayPoints.map(this.turfToLatLng); + latLngs.push(latLngs[0]); + this.turfyRunway = turf.polygon([latLngs]); + }, + + turfToLatLng: function (turfPoint) { + return [turfPoint.lng, turfPoint.lat]; + } }); var runwayPoly = function (runwayPoints) { var runwayPoly = new L.RunwayPolygon(runwayPoints); runwayPoly.setStyle({ color: 'grey', fillColor: 'grey', opacity: 0.5, fillOpacity: 0.5, interactive: false }); - + runwayPoly.setTurfy(runwayPoints); + console.debug(runwayPoints); return runwayPoly; } + + module.exports = runwayPoly; \ No newline at end of file diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index 7d50ea6..c54f791 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -159,7 +159,7 @@ const extendTaxiSegment = function (taxiwaySegment) { if (event.target.options.attributes.name !== undefined) { multiarc.name = assign(event.target.options.attributes.name); } - if(event.target.options.attributes.isPushBackRoute) { + if (event.target.options.attributes.isPushBackRoute) { multiarc.isPushBackRoute = assign(event.target.options.attributes.isPushBackRoute); } else { multiarc.isPushBackRoute = false; @@ -195,103 +195,114 @@ const extendTaxiSegment = function (taxiwaySegment) { this.on('editable:middlemarker:mousedown', event => { console.debug('editable:middlemarker:mousedown'); }), - this.on('editable:vertex:new', event => { - console.debug('editable:vertex:new ' + event.vertex.getIndex() + '\t' + event.vertex.getLastIndex() + '\t'); - // Find nearest node - let closest = this.editLayer.closestLayerSnap(event.latlng, 5) - let taxiwaySegment = event.vertex.editor.feature; - if (taxiwaySegment.options.attributes === undefined) { - taxiwaySegment.options.attributes = { direction: 'bi-directional' }; + this.on('editable:vertex:new', event => { + console.debug('editable:vertex:new ' + event.vertex.getIndex() + '\t' + event.vertex.getLastIndex() + '\t'); + // Find nearest node + let isOnRunway = this.editLayer.isOnRunway(event.latlng) + let closest = this.editLayer.closestLayerSnap(event.latlng, 5) + let taxiwaySegment = event.vertex.editor.feature; + if (taxiwaySegment.options.attributes === undefined) { + taxiwaySegment.options.attributes = { direction: 'bi-directional' }; + } + var isOnRunwayNum = 0; + if (isOnRunway) { + isOnRunwayNum = 1; + } + taxiwaySegment.updateStyle(); + if (event.vertex.getIndex() !== 0 && event.vertex.getIndex() !== event.vertex.getLastIndex()) { + var x = taxiwaySegment.getLatLngs().filter(l => l === event.vertex.latlng); + // Somehow the latlng is not in our Segment!? + if (taxiwaySegment.getLatLngs().length < 3 && x.length === 0) { + var fixed = taxiwaySegment.getLatLngs(); + fixed.splice(1, 0, event.vertex.latlng); + taxiwaySegment.setLatLngs(fixed); } - taxiwaySegment.updateStyle(); - if (event.vertex.getIndex() !== 0 && event.vertex.getIndex() !== event.vertex.getLastIndex()) { - var x = taxiwaySegment.getLatLngs().filter(l => l === event.vertex.latlng); - // Somehow the latlng is not in our Segment!? - if (taxiwaySegment.getLatLngs().length < 3 && x.length === 0) { - var fixed = taxiwaySegment.getLatLngs(); - fixed.splice(1, 0, event.vertex.latlng); - taxiwaySegment.setLatLngs(fixed); - } - var nextIndex = ++taxiwaySegment.editLayer.groundnetLayerGroup.maxId; - var splitOffNodes = taxiwaySegment.getLatLngs().splice(-1); - var remainingNodes = taxiwaySegment.getLatLngs(); - if (remainingNodes.length <= 1 || !remainingNodes[1]) { - console.error(remainingNodes); - } - splitOffNodes.unshift(L.latLng(remainingNodes[1].lat, remainingNodes[1].lng, remainingNodes[1].alt)); - remainingNodes[1]['glueindex'] = nextIndex; - remainingNodes[1].attributes = { index: nextIndex, isOnRunway: 0 }; - taxiwaySegment.options.attributes.end = nextIndex; - splitOffNodes[0]['glueindex'] = nextIndex; - splitOffNodes[0].attributes = { index: nextIndex, isOnRunway: 0 }; - taxiwaySegment.setLatLngs(remainingNodes); - //taxiwaySegment.editor.refresh(); - //taxiwaySegment.editor.reset(); - if (splitOffNodes.length > 1) { - var polyline = new L.Polyline(splitOffNodes, { attributes: {} }); - polyline.addTo(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); - polyline.addTo(taxiwaySegment.editLayer.groundnetLayerGroup); - extendTaxiSegment(polyline); - polyline.addListeners(); - polyline.setEditlayer(taxiwaySegment.editLayer); - polyline.enableEdit(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); - polyline.editor.refresh(); - //polyline.editor.reset(); - polyline.featureLookup = this.featureLookup; - polyline.options.attributes.name = taxiwaySegment.options.attributes.name; - polyline.options.attributes.direction = taxiwaySegment.options.attributes.direction; - polyline.options.attributes.isPushBackRoute = taxiwaySegment.options.attributes.isPushBackRoute; - polyline.options.attributes.begin = nextIndex; - polyline.options.attributes.end = taxiwaySegment.end; - polyline.updateStyle(); - polyline.begin = nextIndex; - polyline.end = taxiwaySegment.end; - taxiwaySegment.end = nextIndex; - this.editLayer.featureLookup[nextIndex] = []; - this.featureLookup[nextIndex].push(taxiwaySegment); - this.featureLookup[nextIndex].push(polyline); - } else { - console.error('SplitoffNodes Short ', splitOffNodes); - } + var nextIndex = ++taxiwaySegment.editLayer.groundnetLayerGroup.maxId; + var splitOffNodes = taxiwaySegment.getLatLngs().splice(-1); + var remainingNodes = taxiwaySegment.getLatLngs(); + if (remainingNodes.length <= 1 || !remainingNodes[1]) { + console.error('Not enough remaining nodes', remainingNodes); + } + splitOffNodes.unshift(L.latLng(remainingNodes[1].lat, remainingNodes[1].lng, remainingNodes[1].alt)); + remainingNodes[1]['glueindex'] = nextIndex; + remainingNodes[1].attributes = { index: nextIndex, isOnRunway: isOnRunwayNum }; + taxiwaySegment.options.attributes.end = nextIndex; + splitOffNodes[0]['glueindex'] = nextIndex; + splitOffNodes[0].attributes = { index: nextIndex, isOnRunway: isOnRunwayNum }; + taxiwaySegment.setLatLngs(remainingNodes); + //taxiwaySegment.editor.refresh(); + //taxiwaySegment.editor.reset(); + if (splitOffNodes.length > 1) { + var polyline = new L.Polyline(splitOffNodes, { attributes: {} }); + polyline.addTo(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); + polyline.addTo(taxiwaySegment.editLayer.groundnetLayerGroup); + extendTaxiSegment(polyline); + polyline.addListeners(); + polyline.setEditlayer(taxiwaySegment.editLayer); + polyline.enableEdit(taxiwaySegment.editLayer.$parent.$parent.$refs.map.mapObject); + polyline.editor.refresh(); + //polyline.editor.reset(); + polyline.featureLookup = this.featureLookup; + polyline.options.attributes.name = taxiwaySegment.options.attributes.name; + polyline.options.attributes.direction = taxiwaySegment.options.attributes.direction; + polyline.options.attributes.isPushBackRoute = taxiwaySegment.options.attributes.isPushBackRoute; + polyline.options.attributes.begin = nextIndex; + polyline.options.attributes.end = taxiwaySegment.end; + polyline.updateStyle(); + polyline.begin = nextIndex; + polyline.end = taxiwaySegment.end; + taxiwaySegment.end = nextIndex; + this.editLayer.featureLookup[nextIndex] = []; + this.featureLookup[nextIndex].push(taxiwaySegment); + this.featureLookup[nextIndex].push(polyline); } else { - // Glue to another node - if (closest) { - event.latlng['glueindex'] = Number(closest.glueindex); - event.latlng.__vertex.setLatLng(closest.latlng); - event.latlng.attributes = { index: event.latlng.glueindex, isOnRunway: 0 }; - // Push Vertex to lookup - this.editLayer.featureLookup[event.latlng.glueindex].push(event.latlng.__vertex); - if (taxiwaySegment.options.attributes.begin === undefined) { - taxiwaySegment.options.attributes.begin = event.latlng['glueindex'] - } else { - taxiwaySegment.options.attributes.end = event.latlng['glueindex'] - } - if (taxiwaySegment.getLatLngs().length === 1) { - taxiwaySegment.begin = closest.glueindex; - } - taxiwaySegment.end = closest.glueindex; - console.debug(`Closest : ${closest}`) + console.error('SplitoffNodes Short ', splitOffNodes); + } + } else { + // Glue to another node + if (closest) { + event.latlng['glueindex'] = Number(closest.glueindex); + event.latlng.__vertex.setLatLng(closest.latlng); + event.latlng.attributes = { index: event.latlng.glueindex, isOnRunway: isOnRunwayNum }; + // Push Vertex to lookup + this.editLayer.featureLookup[event.latlng.glueindex].push(event.latlng.__vertex); + if (isOnRunwayNum==1) { + this.editLayer.addRunwayNode(event.latlng, event.latlng['glueindex']) + } + if (taxiwaySegment.options.attributes.begin === undefined) { + taxiwaySegment.options.attributes.begin = event.latlng['glueindex'] } else { - event.vertex.latlng['glueindex'] = ++this.editLayer.groundnetLayerGroup.maxId; - event.vertex.latlng.attributes = { index: event.vertex.latlng.glueindex, isOnRunway: 0 }; - this.editLayer.featureLookup[event.vertex.latlng.glueindex] = []; - this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(event.vertex); - this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(taxiwaySegment); - // taxiwaySegment.editor.refresh(); - //taxiwaySegment.editor.reset(); - if (taxiwaySegment.options.attributes.begin === undefined) { - taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex'] - taxiwaySegment.begin = event.vertex.latlng.glueindex; - } else if (taxiwaySegment.options.attributes.end === undefined || - (taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex && - Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex) !== taxiwaySegment.options.attributes.end)) { - taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex'] - taxiwaySegment.end = Number(event.vertex.latlng.glueindex); - } + taxiwaySegment.options.attributes.end = event.latlng['glueindex'] + } + if (taxiwaySegment.getLatLngs().length === 1) { + taxiwaySegment.begin = closest.glueindex; + } + taxiwaySegment.end = closest.glueindex; + console.debug(`Closest : ${closest}`) + } else { + event.vertex.latlng['glueindex'] = ++this.editLayer.groundnetLayerGroup.maxId; + event.vertex.latlng.attributes = { index: event.vertex.latlng.glueindex, isOnRunway: isOnRunwayNum }; + this.editLayer.featureLookup[event.vertex.latlng.glueindex] = []; + this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(event.vertex); + this.editLayer.featureLookup[event.vertex.latlng.glueindex].push(taxiwaySegment); + if (isOnRunwayNum==1) { + this.editLayer.addRunwayNode(event.latlng, event.vertex.latlng['glueindex']) + } + // taxiwaySegment.editor.refresh(); + //taxiwaySegment.editor.reset(); + if (taxiwaySegment.options.attributes.begin === undefined) { + taxiwaySegment.options.attributes.begin = event.vertex.latlng['glueindex'] + taxiwaySegment.begin = event.vertex.latlng.glueindex; + } else if (taxiwaySegment.options.attributes.end === undefined || + (taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex && + Number(taxiwaySegment.getLatLngs()[taxiwaySegment.getLatLngs().length - 1].glueindex) !== taxiwaySegment.options.attributes.end)) { + taxiwaySegment.options.attributes.end = event.vertex.latlng['glueindex'] + taxiwaySegment.end = Number(event.vertex.latlng.glueindex); } } - //this.splitShape(taxiwaySegment.getLatLngs(), ) - }); + } + //this.splitShape(taxiwaySegment.getLatLngs(), ) + }); this.on('editable:vertex:deleted', event => { console.debug('editable:vertex:deleted') }); diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index d3a0689..c875fd0 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -87,7 +87,7 @@ async function checkGroundnet(data) { var directionalGraph = {}; var bidirectionalGraph = {}; - console.log(parkings); + console.debug(parkings); parkings.forEach(element => { directionalGraph[element] = {}; bidirectionalGraph[element] = {}; @@ -99,7 +99,7 @@ async function checkGroundnet(data) { var notOkNodes = []; //debugger; - console.log(edges); + console.debug(edges); if (edges === undefined) { resolve([{ id: -1, message: check_msg.NO_EDGES }]); } From 6ed5da1a990c778899339fe0f8932589d0fff72a Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 17 Jan 2021 14:48:21 +0100 Subject: [PATCH 103/146] #122 --- src/renderer/components/ParkingEdit.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ParkingEdit.vue b/src/renderer/components/ParkingEdit.vue index 1a5b41e..561cc76 100644 --- a/src/renderer/components/ParkingEdit.vue +++ b/src/renderer/components/ParkingEdit.vue @@ -254,7 +254,7 @@ const centerLatLng = convert(this.$store.state.Editable.data.parking.coords); const parkingSize = this.validRadii.indexOf(this.$store.state.Editable.data.parking.radius); if (parkingSize>=0) { - var newNoseWheel = turf.destination(this.latToTurf(centerLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading - 180, turfOptions); + var newNoseWheel = turf.destination(this.latToTurf(centerLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading, turfOptions); this.$store.commit('SET_EDIT_PARKING_NOSE_COORDS', this.turfToLatLng(newNoseWheel)); } } @@ -266,7 +266,7 @@ const noseWheelLatLng = convert(this.$store.state.Editable.data.parking.nosecoords); const parkingSize = this.validRadii.indexOf(this.$store.state.Editable.data.parking.radius); if (parkingSize>=0) { - var newCenter = turf.destination(this.latToTurf(noseWheelLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading, turfOptions); + var newCenter = turf.destination(this.latToTurf(noseWheelLatLng), this.validN2M[parkingSize]/1000, this.$store.state.Editable.data.parking.heading - 180, turfOptions); this.$store.commit('SET_EDIT_PARKING_COORDS', this.turfToLatLng(newCenter)); } } From 3ed45ee87e6c89fbc7999a41bb48f88c2874f9e4 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Sun, 17 Jan 2021 14:55:29 +0100 Subject: [PATCH 104/146] #121 --- src/renderer/components/ParkingEdit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/ParkingEdit.vue b/src/renderer/components/ParkingEdit.vue index 561cc76..e632afc 100644 --- a/src/renderer/components/ParkingEdit.vue +++ b/src/renderer/components/ParkingEdit.vue @@ -100,7 +100,7 @@ Date: Sun, 17 Jan 2021 18:20:00 +0100 Subject: [PATCH 105/146] New Tower icon (Ian Tolosa) --- src/renderer/loaders/Tower.js | 4 +- static/tower.svg | 174 +++++++++++++++++++++++----------- 2 files changed, 123 insertions(+), 55 deletions(-) diff --git a/src/renderer/loaders/Tower.js b/src/renderer/loaders/Tower.js index be60398..d43514a 100644 --- a/src/renderer/loaders/Tower.js +++ b/src/renderer/loaders/Tower.js @@ -40,7 +40,7 @@ L.TowerMarker = L.Marker.extend({ var scale = pixelSize/this.iconSize; var offset = 0;//-(this.iconSize/2); this.setIcon(L.divIcon({ - iconSize: 64, + iconSize: 32, className: 'threshold-marker-icon', html: `
${this.svg}
`, })); @@ -65,7 +65,7 @@ L.TowerMarker = L.Marker.extend({ L.TowerMarker.addInitHook(function(){ this.svg = this.stripSVG('tower.svg'); - this.iconSize = 64; + this.iconSize = 32; this.on('dragstart', function (event) { console.debug("Drag Tower : ", event); }); diff --git a/static/tower.svg b/static/tower.svg index 93d5265..62da8fa 100644 --- a/static/tower.svg +++ b/static/tower.svg @@ -1,6 +1,4 @@ - - - - - - + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + sodipodi:docname="FGA Tower Icon.svg" + viewBox="0 0 248.26501 249.26443" + height="32" + width="32" + id="svg833" + version="1.1"> + id="metadata839"> @@ -53,26 +26,121 @@ + + + - - - + inkscape:groupmode="layer"> + + + + + + + + + + + + + + + + + + From 1ad43169cca02f3f0915b2b835970d4b26f2d6c7 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 19 Jan 2021 21:29:00 +0100 Subject: [PATCH 106/146] v0.0.29 --- .travis.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2822333..ec4ee38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,12 +70,12 @@ jobs: skip_cleanup: true overwrite: true draft: true - name: '0.0.28' + name: '0.0.29' provider: releases api_key: secure: xBF7Jld2WbEXVg5QOxZIC/T2hlKOkajebrNi7kfE8vGVRuZG1cbHWEtBVPxggxmIWvzSyKOACSufFywx8rjgXNP3e310+dp1WuEnOBlkTr6HO3FneTue5gKoPsFB8/r8/BMPWqY50lS2Vei367eINsdNiw4wWv2bzbB6uNBlo9ILRZjbyWnUv+j8+h9gmCg2nHLmHBGhXRMLqYFEHYvq1LrV+tjMNtMBdNiRVYBjpeWI1y7TMsxpdwKvrYF84L7r9IOkjg2DHIACy4SMnIeKi6b7Lr83aK5QwksHByMETxjaNPxgvmg9hPFaRoJsvwOLdgSDU/VpEar8uweOnumt2bdqdwV2t+99A1g41KcvbUI1aATPOWhpGxW+WLBBz40hpDBBwWJ/Il4rMUHfsQ162xoO9NvlKp4IE7pgK3ydGlJx6mYzMx3QB2eKnTFySaIekrkzZPIS3GX50cMclRw6jS3fueUmtNxjIv4hNHgRqE6pQfxhQnaUkHjdP7nglYs0muJotM2Tksyw3YRlLoFzc/siktCDr8ZXxj+rlV3TeoH2vba7f4zr0tYY9vlGAUlcrkBoJ4kDeA8Hm0GnbpWHBsSY4g199jOkgbr/kJ0HDrELv/JJl1c8yp3uSlcN82UgNS15H60D+0zg3Ls4KxvqXslrPh815Se5FqKoEpvZ5VQ= file_glob: true file: build/* on: - branches: '0.0.28' + branches: '0.0.29' repo: Portree-Kid/flightgear-airports diff --git a/package.json b/package.json index 4863e3a..be6db24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.28", + "version": "0.0.29", "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL-3.0", From 092d0f2a243a07c142a69a717f8316fe63ff2c01 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 19 Jan 2021 21:44:25 +0100 Subject: [PATCH 107/146] v0.0.29 --- package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index be6db24..23edb8e 100644 --- a/package.json +++ b/package.json @@ -74,10 +74,12 @@ ] }, "mac": { - "icon": "build/icons/icon.icns" + "icon": "build/icons/icon.icns", + "publish": [] }, "win": { - "icon": "build/icons/icon.ico" + "icon": "build/icons/icon.ico", + "publish": [] }, "nsis": { "oneClick": false, @@ -86,7 +88,8 @@ }, "linux": { "icon": "build/icons", - "target": "AppImage" + "target": "AppImage", + "publish": [] } }, "dependencies": { From 8732819261245420c77b2052b259de109b62744b Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 19 Jan 2021 22:05:54 +0100 Subject: [PATCH 108/146] Removed GIT url --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 23edb8e..62242fb 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,6 @@ "author": "portree_kid ", "description": "An software to design Flightgear groundnets", "license": "GPL-3.0", - "repository": { - "type" : "git", - "url" : "https://github.com/Portree-Kid/flightgear-airports.git" - }, "main": "./dist/electron/main.js", "scripts": { "build": "node .electron-vue/build.js && electron-builder", From bf56736ab97753c9f6102da7b83f1029809f2c25 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 21 Jan 2021 07:55:37 +0100 Subject: [PATCH 109/146] Fix gaps in IDs --- src/renderer/loaders/groundnet_loader.js | 4 ++ src/renderer/loaders/groundnet_writer.js | 53 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/src/renderer/loaders/groundnet_loader.js b/src/renderer/loaders/groundnet_loader.js index 45cd4ab..5a068c3 100644 --- a/src/renderer/loaders/groundnet_loader.js +++ b/src/renderer/loaders/groundnet_loader.js @@ -56,6 +56,7 @@ exports.readGroundnetXML = function (fDir, icao, f) { try { store.default.dispatch('setGroundnetLoaded', false); var layerGroup = L.layerGroup(); + layerGroup.minId = 9999999999; layerGroup.maxId = 0; if (f == null || (!fs.existsSync(f) )) @@ -113,6 +114,7 @@ exports.readGroundnetXML = function (fDir, icao, f) { nodesLookup[n.attr('index')] = n; featureLookup[n.attr('index')] = new Array(); featureLookup[n.attr('index')].push(circle); + layerGroup.minId = Math.min(layerGroup.minId, Number(n.attr('index'))) layerGroup.maxId = Math.max(layerGroup.maxId, Number(n.attr('index'))) features.push(circle); }).sort(); @@ -139,7 +141,9 @@ exports.readGroundnetXML = function (fDir, icao, f) { } //console.log(latlon.decimalLatitude); + layerGroup.minId = Math.min(layerGroup.minId, Number(n.attr('index'))) layerGroup.maxId = Math.max(layerGroup.maxId, Number(n.attr('index'))) + console.debug(`Min Id : ${layerGroup.minId} Max Id : ${layerGroup.maxId} `); nodesLookup[n.attr('index')] = n; if (n.attr('isOnRunway') === '1') { diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index bb8c9f2..5cb17fa 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -57,6 +57,12 @@ function walkPushbackRoute (index, walkedNodes, pushBackNodes) { }); } +/** + * + * @param {*} fDir The directory + * @param {*} icao + * @param {*} featureList + */ exports.writeGroundnetXML = function (fDir, icao, featureList) { try { @@ -91,6 +97,8 @@ exports.writeGroundnetXML = function (fDir, icao, featureList) { var parkings = featureList.map(mapParkings).filter(n => n); var runwayNodes = featureList.map(mapRunwayNodes).filter(n => n); var holdNodes = featureList.map(mapHoldPoint).filter(n => n); + + holdNodes.forEach(n => { pushBackNodeLookup[n['@index']] = n; }); @@ -189,6 +197,51 @@ exports.writeGroundnetXML = function (fDir, icao, featureList) { var unicomList = store.default.state.Frequencies.items.filter(f => f.type === 'UNICOM').map(mapFrequency); + + var gapStart = -1; + var gapEnd = -1; + + do { + gapStart = -1; + gapEnd = -1; + var allIds = parkings.map(n => Number(n['@index'])) + .concat(uniqueNodes.map(n => Number(n['@index']))) + .sort((a, b) => a - b); + + allIds.forEach((element, index, array) => { + if (index > 0 && array[index-1] + 1 != element && gapStart == -1 ) { + gapStart = array[index-1]; + gapEnd = element; + } + }); + var gap = gapEnd - gapStart -1; + + parkings = parkings.map(n => { + if (n['@index']>gapStart) { + n['@index'] = String(n['@index'] - gap); + } + if (n['@pushbackRoute']>gapStart) { + n['@pushbackRoute'] = String(n['@pushbackRoute'] - gap); + } + return n; + }); + uniqueNodes = uniqueNodes.map(n => { + if (n['@index']>gapStart) { + n['@index'] = String(n['@index'] - gap); + } + return n; + }); + arcList = arcList.map(n => { + if (n['@begin']>gapStart) { + n['@begin'] = String(n['@begin'] - gap); + } + if (n['@end']>gapStart) { + n['@end'] = String(n['@end'] - gap); + } + return n; + }); + } while( gapStart > 0 && gapEnd > 0); + var xmlObj = { groundnet: { version: 1, fgaversion: version, name: name, 'frequencies': { APPROACH: approachList, DEPARTURE: departureList, AWOS: awosList, CLEARANCE: clearanceList, GROUND: groundList, TOWER: towerList, UNICOM: unicomList }, parkingList: { Parking: parkings }, TaxiNodes: { node: uniqueNodes }, TaxiWaySegments: { arc: arcList } } }; From 9f6a9a094355ed52aa41f412d9552487ffc695e0 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Wed, 27 Jan 2021 15:35:10 +0100 Subject: [PATCH 110/146] Add ICAO even if one find --- src/renderer/components/Search.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/Search.vue b/src/renderer/components/Search.vue index 036b4a0..b7ce85e 100644 --- a/src/renderer/components/Search.vue +++ b/src/renderer/components/Search.vue @@ -36,7 +36,7 @@ }, methods: { goto (icao) { - console.log(icao) + console.debug('Goto : ' + icao) let airports = this.$store.state.Airports.airports .filter(a => a.properties.icao.match(icao)) if (airports.length > 0) { @@ -126,7 +126,7 @@ }, computed: { searched: function () { - console.log(this.searchterm) + console.debug('Search : ' + this.searchterm) if (this.searchterm !== this.lastSearchTerm) { let searchRegex = new RegExp(this.searchterm, 'i') let result = this.$store.state.Airports.airports @@ -136,10 +136,12 @@ .filter(a => searchRegex.test(a.properties.icao) || searchRegex.test(a.properties.name)) // .map(a => console.log(a.properties)) .map(a => ({ icao: a.properties.icao, name: a.properties.name })) + let icaoResult = result.filter(a => a.icao === this.searchterm) if (result !== undefined && - result.length === 0 && + icaoResult.length === 0 && this.searchterm !== undefined && - this.searchterm.length >= 3) { + this.searchterm.length >= 3 && + this.searchterm.length <= 4) { this.$store.dispatch('getAirport', this.searchterm) } this.lastResult = result From b95a468cdc9a5c6531736385b3a0dea7d0694895 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jan 2021 20:49:16 +0000 Subject: [PATCH 111/146] build(deps-dev): bump electron from 7.2.4 to 9.4.0 Bumps [electron](https://github.com/electron/electron) from 7.2.4 to 9.4.0. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) - [Commits](https://github.com/electron/electron/compare/v7.2.4...v9.4.0) Signed-off-by: dependabot[bot] --- package-lock.json | 126 ++++++++++++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 95 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 991ac69..9b749a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.28", + "version": "0.0.29", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -188,29 +188,30 @@ } }, "@electron/get": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.12.2.tgz", - "integrity": "sha512-vAuHUbfvBQpYTJ5wB7uVIDq5c/Ry0fiTBMs7lnEYAo/qXXppIVcWdfBr57u6eRnKdVso7KSiH6p/LbQAG6Izrg==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.12.3.tgz", + "integrity": "sha512-NFwSnVZQK7dhOYF1NQCt+HGqgL1aNdj0LUSx75uCqnZJqyiWCVdAMFV4b4/kC8HjUJAnsvdSEmjEt4G2qNQ9+Q==", "dev": true, "requires": { "debug": "^4.1.1", "env-paths": "^2.2.0", + "filenamify": "^4.1.0", "fs-extra": "^8.1.0", "global-agent": "^2.0.2", "global-tunnel-ng": "^2.7.1", "got": "^9.6.0", "progress": "^2.0.3", - "sanitize-filename": "^1.6.2", + "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "env-paths": { @@ -235,6 +236,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -4470,9 +4477,9 @@ "dev": true }, "boolean": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.1.tgz", - "integrity": "sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.2.tgz", + "integrity": "sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==", "dev": true, "optional": true }, @@ -7272,9 +7279,9 @@ } }, "electron": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/electron/-/electron-7.2.4.tgz", - "integrity": "sha512-Z+R692uTzXgP8AHrabE+kkrMlQJ6pnAYoINenwj9QSqaD2YbO8IuXU9DMCcUY0+VpA91ee09wFZJNUKYPMnCKg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-9.4.0.tgz", + "integrity": "sha512-hOC4q0jkb+UDYZRy8vrZ1IANnq+jznZnbkD62OEo06nU+hIbp2IrwDRBNuSLmQ3cwZMVir0WSIA1qEVK0PkzGA==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -7283,9 +7290,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.48.tgz", - "integrity": "sha512-m3Nmo/YaDUfYzdCQlxjF5pIy7TNyDTAJhIa//xtHcF0dlgYIBKULKnmloCPtByDxtZXrWV8Pge1AKT6/lRvVWg==", + "version": "12.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz", + "integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw==", "dev": true } } @@ -8700,6 +8707,23 @@ "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", "dev": true }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.2.0.tgz", + "integrity": "sha512-pkgE+4p7N1n7QieOopmn3TqJaefjdWXwEkj2XLZJLKfOgcQKkn11ahvGNgTD8mLggexLiDFQxeTs14xVU22XPA==", + "dev": true, + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.1", + "trim-repeated": "^1.0.0" + } + }, "fill-range": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", @@ -10040,16 +10064,36 @@ }, "dependencies": { "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz", + "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==", "dev": true, "optional": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "optional": true } @@ -16627,13 +16671,13 @@ } }, "roarr": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.3.tgz", - "integrity": "sha512-AEjYvmAhlyxOeB9OqPUzQCo3kuAkNfuDk/HqWbZdFsqDFpapkTjiw+p4svNEoRLvuqNTxqfL+s+gtD4eDgZ+CA==", + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", + "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", "dev": true, "optional": true, "requires": { - "boolean": "^3.0.0", + "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", @@ -18101,6 +18145,15 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "style-loader": { "version": "0.21.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", @@ -18121,12 +18174,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -18785,6 +18838,15 @@ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", diff --git a/package.json b/package.json index 62242fb..4ce144c 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "css-loader": "^0.28.11", "del": "^3.0.0", "devtron": "^1.4.0", - "electron": "^7.2.4", + "electron": "^9.4.0", "electron-builder": "^22.10.4", "electron-devtools-installer": "^2.2.4", "eslint": "^4.19.1", From bd4bdd6b51bc1c984399f86cafc291e99e778682 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 29 Jan 2021 17:03:11 +0100 Subject: [PATCH 112/146] Traffic Generator --- src/renderer/components/AirlineItem.vue | 95 ++++++++++ src/renderer/components/AirportEdit.vue | 215 +++++++++++++---------- src/renderer/components/ParkingItem.vue | 11 ++ src/renderer/components/TrafficList.vue | 97 ++++++++++ src/renderer/loaders/groundnet_loader.js | 24 +-- src/renderer/loaders/traffic_loader.js | 122 +++++++++++++ src/renderer/loaders/traffic_writer.js | 180 +++++++++++++++++++ src/renderer/store/modules/Parkings.js | 2 +- 8 files changed, 640 insertions(+), 106 deletions(-) create mode 100644 src/renderer/components/AirlineItem.vue create mode 100644 src/renderer/components/TrafficList.vue create mode 100644 src/renderer/loaders/traffic_loader.js create mode 100644 src/renderer/loaders/traffic_writer.js diff --git a/src/renderer/components/AirlineItem.vue b/src/renderer/components/AirlineItem.vue new file mode 100644 index 0000000..3bc4f35 --- /dev/null +++ b/src/renderer/components/AirlineItem.vue @@ -0,0 +1,95 @@ + + + + + + + + diff --git a/src/renderer/components/AirportEdit.vue b/src/renderer/components/AirportEdit.vue index 9c504ed..96928cb 100644 --- a/src/renderer/components/AirportEdit.vue +++ b/src/renderer/components/AirportEdit.vue @@ -16,12 +16,13 @@ You should have received a copy of the GNU General Public License along with FG title="Add Airline" :visible.sync="dialogVisible" width="40%" - :before-close="handleClose"> + :before-close="handleClose" + > Add an selectable airline to {{ icao }} {{ name }} - + Cancel Confirm @@ -31,116 +32,143 @@ You should have received a copy of the GNU General Public License along with FG title="Import File" :visible.sync="showImportFile" width="20%" - :before-close="handleClose"> - Beware wip will be overwritten - - - - - - - - - + :before-close="handleClose" + > + Beware wip will be overwritten + + + + + + + + + Cancel Confirm

{{ icao }} {{ name }}

-
- - - - - - - - - - - - - - - - Airlines : - - {{item.value}} - - - - - +
+ + + + + + + + + + + + + + + + Airlines : + + {{ + item.value + }} + + + + +
- - -
- - - - Add + + +
+ + + + Add
-
- - - - - Traffic : + + + + + + Traffic : Flights : {{ flights }} - GIT/Terrasync : + GIT/Terrasync : Parking Positions : {{ parking }} Groundnet Nodes : - {{groundnet}} + {{ groundnet }} - Work : + Work : Work Parking Positions : {{ wipparking }} Work Groundnet Nodes : - {{wipgroundnet}} + {{ wipgroundnet }} Saved : - {{date}} + {{ date }} Uploaded : - {{upload_date}} + {{ upload_date }} - -
+ + + + +
@@ -149,8 +177,9 @@ You should have received a copy of the GNU General Public License along with FG import FileSelect from './FileSelect' import Frequency from './Frequency' import ParkingList from './ParkingList' + import TrafficList from './TrafficList' import Upload from './Upload' - + const fs = require('fs') const path = require('path') @@ -159,7 +188,7 @@ export default { return {showImportFile: false, activeTab: 'first', editing: false, uploadVisible: false, dialogVisible: false, airlineCode: '', fileImport: null} }, components: { - EditButton, FileSelect, Frequency, ParkingList, Upload + EditButton, FileSelect, Frequency, ParkingList, TrafficList, Upload }, methods: { fileImportFileName (f) { @@ -291,10 +320,10 @@ export default { + + diff --git a/src/renderer/loaders/groundnet_loader.js b/src/renderer/loaders/groundnet_loader.js index 5a068c3..feb90fd 100644 --- a/src/renderer/loaders/groundnet_loader.js +++ b/src/renderer/loaders/groundnet_loader.js @@ -23,9 +23,9 @@ function addFrequencies (type, value) { value.split(' ').forEach(frequencyValue => { if( value.length > 0) { var frequency = {type: type, value: frequencyValue}; - frequencies.push(frequency); + frequencies.push(frequency); } - }) + }) } exports.addFeature = function (feature) { @@ -38,10 +38,10 @@ exports.listSaves = function (fDir, icao) { var ret = files .filter(f => f.includes(icao) ) .filter(f => f.includes('groundnet') ) - .map(f => { + .map(f => { try { var fileDate = fs.lstatSync(path.join(directory, f)); - return {file: f, mtime: `${fileDate.mtime}`, mtimeMs: `${fileDate.mtimeMs}`}; + return {file: f, mtime: `${fileDate.mtime}`, mtimeMs: `${fileDate.mtimeMs}`}; } catch (error) { console.error(error); } @@ -99,7 +99,7 @@ exports.readGroundnetXML = function (fDir, icao, f) { addFrequencies('UNICOM', unicom); store.default.dispatch('setFrequencies', frequencies); - + var parkingNodes = xml.find('groundnet/parkingList/Parking'); console.debug("Parking Nodes length" + parkingNodes.length); @@ -118,9 +118,9 @@ exports.readGroundnetXML = function (fDir, icao, f) { layerGroup.maxId = Math.max(layerGroup.maxId, Number(n.attr('index'))) features.push(circle); }).sort(); - - store.default.dispatch('setParkings', parkingNodes.map( - p => ({index: Number(p.attrs.index), name: String(p.attrs.name), number: String(p.attrs.number), type: String(p.attrs.type)} + + store.default.dispatch('setParkings', parkingNodes.map( + p => ({index: Number(p.attrs.index), radius: Number(p.attrs.radius), name: String(p.attrs.name), number: String(p.attrs.number), type: String(p.attrs.type)} )).sort((p1, p2) => { if (p1.name === p2.name) { return p1.number?p1.number.localeCompare(p2.number):-1; @@ -134,7 +134,7 @@ exports.readGroundnetXML = function (fDir, icao, f) { //attrs.lat //console.log(n.attr('lat') + " " + n.attr('lon')); try { - var latlon = convert(n.attr('lat') + " " + n.attr('lon')); + var latlon = convert(n.attr('lat') + " " + n.attr('lon')); } catch (error) { console.warn(n.attr('lat') + " " + n.attr('lon')); convert(n.attr('lat') + " " + n.attr('lon')); @@ -186,7 +186,7 @@ exports.readGroundnetXML = function (fDir, icao, f) { if (element instanceof L.Polyline && element.end === n.attr('begin') && element.begin === n.attr('end')) { element.bidirectional = true; element.options.attributes.direction = 'bi-directional' - bidirectional = true; + bidirectional = true; element.updateStyle(); } }); @@ -194,11 +194,11 @@ exports.readGroundnetXML = function (fDir, icao, f) { if (!bidirectional) { var beginlatlon = convert(beginNode.attr('lat') + " " + beginNode.attr('lon')); var endlatlon = convert(endNode.attr('lat') + " " + endNode.attr('lon')); - + var pane = 'route-pane'; if(n.attr('isPushBackRoute') === '1') { pane = 'pushback-pane'; - } + } var polyline = new L.Polyline([[beginlatlon.decimalLatitude, beginlatlon.decimalLongitude], [endlatlon.decimalLatitude, endlatlon.decimalLongitude]], { pane: pane, attributes: {} }).addTo(layerGroup); extendTaxiSegment(polyline); diff --git a/src/renderer/loaders/traffic_loader.js b/src/renderer/loaders/traffic_loader.js new file mode 100644 index 0000000..05d7814 --- /dev/null +++ b/src/renderer/loaders/traffic_loader.js @@ -0,0 +1,122 @@ +/* +Copyright 2021 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ +/* eslint-disable */ +const fs = require('fs'); +const path = require('path'); +var xamel = require('xamel'); + +const store = require('../store'); + +const util = require('util'); + +exports.readTrafficXML = function (f) { + try { + var ret = []; + var xmlTraffic = fs.readFileSync(f, 'utf8').toString(); + xamel.parse(xmlTraffic, function (err, xml) { + console.debug("parsed " + path.basename(f)); + if (err !== null) { + console.error("Error in " + airline); + throw err; + } + + var requiredAircraft = xml.find('trafficlist/aircraft'); + console.log("Aircraft " + requiredAircraft.length); + + ret.concat(requiredAircraft); + var flights = xml.find('trafficlist/flight'); + console.log("Flights " + flights.length); + ret.concat(flights); + console.log(ret.length); + ret = ret.concat(flights.map(flightMapper)).concat(requiredAircraft.map(aircraftMapper)) + return ret; + }); + return ret; + } catch (error) { + console.error(error); + } +}; + +/* +* + Hebridean_1047 + HBR_BN_2 + VFR + + EGPU + + + 50 + + EGEO + + + WEEK + +*/ + +function flightMapper(params) { + return { + id: `${btoa(buildId(params))}`, + callsign: params.find('callsign').text(), + arrival: { + port: params.find('arrival/port').text(), + time: params.find('arrival/time').text() + }, + departure: { + port: params.find('departure/port').text(), + time: params.find('departure/time').text() + } + }; +} + +function buildId(params) { + return `${params.find('callsign').text()}_`+ + `${params.find('arrival/port').text()}_`+ + `${params.find('arrival/time').text()}_`+ + `${params.find('departure/port').text()}_` + + `${params.find('departure/time').text()}`; +} + +/* + + Aircraft/BN-2/BN-2-Hebridean.xml + HBR + HBR + EGEO + HBR_BN_2 + BN2 + 0 + 8 + gate + turboprop_transport + G-HEBO + false + +*/ + +function aircraftMapper(params) { + return { + model: params.find('model').text(), + livery: params.find('livery').text(), + airline: params.find('airline').text(), + 'home-port': params.find('home-port').text(), + 'required-aircraft': params.find('required-aircraft').text(), + actype: params.find('actype').text(), + offset: params.find('offset').text(), + radius: params.find('radius').text(), + flighttype: params.find('flighttype').text(), + 'performance-class': params.find('performance-class').text(), + 'registration': params.find('registration').text(), + 'heavy': params.find('heavy').text(), + }; +} \ No newline at end of file diff --git a/src/renderer/loaders/traffic_writer.js b/src/renderer/loaders/traffic_writer.js new file mode 100644 index 0000000..08a762e --- /dev/null +++ b/src/renderer/loaders/traffic_writer.js @@ -0,0 +1,180 @@ +/* +Copyright 2021 Keith Paterson + +This file is part of FG Airports. + +FG Airports is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. +*/ + +/* eslint-disable */ +const fs = require('fs'); +const path = require('path'); + +const store = require('../store'); + +const util = require('util'); + +const mathjs = require('mathjs'); + +var builder = require('xmlbuilder'); + +var parkingStats = (acc, cur) => { + if (!acc[cur.radius]) { + acc[cur.radius] = { count: 0, radius: cur.radius } + } + acc[cur.radius].count += 1 + return acc +}; + +/** + + + + Aircraft/BN-2/BN-2-Hebridean.xml + HBR + HBR + EGEO + HBR_BN_2 + BN2 + 0 + 8 + gate + turboprop_transport + G-HEBS + false + + + Hebridean_1047 + HBR_BN_2 + VFR + + EGPU + + + 50 + + EGEO + + + WEEK + + + */ + +var writeTrafficXML = function (fDir, parkings, aircraft) { + try { + var icao = store.default.state.Airports.currentAirport.icao; + var aircraftList = aircraft; + + try { fs.mkdirSync(path.join(fDir), { recursive: true }) } catch (err) { } + try { fs.mkdirSync(path.join(fDir, 'TST'), { recursive: true }) } catch (err) { } + + var f = path.join(fDir, 'TST', icao + '.xml'); + + + var parkingData = parkings.reduce(parkingStats, {}); + + /* + * + + Hebridean_1001 + HBR_BN_2 + VFR + + EGEO + + + 50 + + EGEY + + + WEEK + + */ + + var flightMapper = function (pStat) { + var ret = []; + var blockSize = Math.min( pStat[1].count/6, 6); + for (let index = 0; index < pStat[1].count; index++) { + var aircraft = this[index]; + var minutes = `${Math.floor(index/blockSize)}`.padStart(2, '0'); + var seconds = `${index}`.padStart(2, '0'); + for (let weekday = 0; weekday < 7; weekday++) { + ret.push({ + callsign: `Test_${index}_${weekday}`, + 'required-aircraft': aircraft['required-aircraft'], + fltrules: 'VFR', + departure: { + port: icao, + time: `${weekday}/12:${minutes}:${seconds}` + }, + 'cruise-alt': 50, + arrival: { + port: icao, + time: `${weekday}/13:${minutes}:${seconds}` + }, + repeat: 'WEEK' + }); + } + } + return ret; + } + + /* + + Aircraft/BN-2/BN-2-Hebridean.xml + HBR + HBR + EGEO + HBR_BN_2 + BN2 + 0 + 8 + gate + turboprop_transport + G-HEBO + false + + + */ + var aircraftMapper = function (pStat) { + var ret = []; + if (typeof this === 'undefined') { + return; + } + var possibleAircraft = this.filter(a => a.radius <= pStat[1].radius); + + for (let index = 0; index < pStat[1].count; index++) { + var aircraft = possibleAircraft[Math.floor(Math.random() * possibleAircraft.length)]; + aircraft['required-aircraft'] = `GG-${index}`; + aircraft.registration = `GG-${index}`; + aircraft['home-port'] = icao; + ret.push(aircraft); + } + return ret; + } + + + var aircraftList = Object.entries(parkingData).flatMap(aircraftMapper, aircraft).sort(); + var flightList = Object.entries(parkingData).flatMap(flightMapper, aircraftList).sort(); + + var xmlObj = { trafficList: { aircraft: aircraftList, flight: flightList } }; + + var xmlString = builder.create(xmlObj).end({ pretty: true }); + fs.writeFileSync(f, xmlString); + console.debug(xmlString); + } catch (error) { + console.error(error); + } + return; +} + + +export { writeTrafficXML as writeTrafficXML }; \ No newline at end of file diff --git a/src/renderer/store/modules/Parkings.js b/src/renderer/store/modules/Parkings.js index 287664e..0f5a3c8 100644 --- a/src/renderer/store/modules/Parkings.js +++ b/src/renderer/store/modules/Parkings.js @@ -43,7 +43,7 @@ const mutations = { const actions = { async addParking (context, p) { - context.commit('ADD_FREADD_PARKINGQUENCY', p) + context.commit('ADD_PARKING', p) }, async updatedParking (context, p) { context.commit('UPDATE_PARKING', p) From 737f9a7b56d7ea18c0a090ed83465d976662dbb8 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 29 Jan 2021 22:38:40 +0100 Subject: [PATCH 113/146] #76 --- package-lock.json | 2 +- src/renderer/components/EditLayer.vue | 157 ++++++++++-------- src/renderer/components/ToolBar.vue | 11 +- .../loaders/TaxiwaySegmentExtender.js | 13 +- 4 files changed, 108 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 991ac69..2879ee0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flightgear-airports", - "version": "0.0.28", + "version": "0.0.29", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index c3df1d0..842dad6 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -39,9 +39,8 @@ You should have received a copy of the GNU General Public License along with FG components: {}, props: [], created () { - [LMap, LMarker, L, LEdit, L2] - console.log('Created Editlayer') + console.debug('Created Editlayer') // console.log(LSymbol) }, mounted () { @@ -51,8 +50,6 @@ You should have received a copy of the GNU General Public License along with FG this.$parent.mapObject.createPane('route-pane') this.$parent.mapObject.getPane('route-pane').style.zIndex = 511 - this.selectionLayerGroup = L.layerGroup(); - this.selectionLayerGroup.addTo(this.$parent.mapObject) this.$store.watch( function (state) { return state.Editable.data.node; @@ -113,6 +110,9 @@ You should have received a copy of the GNU General Public License along with FG } }, methods: { + getIdLayerGroup() { + return this.idLayerGroup; + }, getParkings(ring) { var poly = turf.polygon(ring); var parkings = [] @@ -122,16 +122,16 @@ You should have received a copy of the GNU General Public License along with FG var tp = turf.point([l.getLatLng().lat, l.getLatLng().lng]); if (turf.booleanPointInPolygon(tp, poly)) { parkings.push(l); - } + } } }) this.selection = parkings; return parkings; }, - load (icao, filename) { + load (icao, filename) { if (this.groundnetLayerGroup !== undefined) { this.groundnetLayerGroup.removeFrom(this.$parent.mapObject) - } + } this.$parent.$parent.setIcao(icao) this.icao = icao var f = ''; @@ -156,7 +156,7 @@ You should have received a copy of the GNU General Public License along with FG } this.groundnetLayerGroup.eachLayer(l => { if (l instanceof L.TaxiwaySegment) { - l.addListeners() + l.addListeners() } if (l.updateArrows !== undefined) { l.updateArrows(this.$store.state.Settings.zoom) @@ -166,7 +166,7 @@ You should have received a copy of the GNU General Public License along with FG } }) - console.log(this.groundnetLayerGroup.maxId) + console.debug(`MaxId : ${this.groundnetLayerGroup.maxId}`) this.buildLookup() this.groundnetLayerGroup.addTo(this.$parent.mapObject) @@ -212,7 +212,7 @@ You should have received a copy of the GNU General Public License along with FG this.selection.forEach(element => { element.updateRadius(event.wingspan/2) }); - break; + break; default: break; } @@ -222,7 +222,7 @@ You should have received a copy of the GNU General Public License along with FG this.editable = true this.editing = true this.$store.commit('SET_EDIT', true) - + this.featureLookup = []; this.groundnetLayerGroup.eachLayer(l => { l.enableEdit() @@ -240,7 +240,30 @@ You should have received a copy of the GNU General Public License along with FG l.setInteractive(true) } }) - this.$store.dispatch('addWip', {icao: this.icao}); + this.$store.dispatch('addWip', {icao: this.icao}); + }, + showTooltips() { + this.groundnetLayerGroup.eachLayer(l => { + if (l instanceof L.Polyline) { + l.getLatLngs().forEach(l => { + if (l.__vertex && !l.__vertex.getTooltip()) { + l.__vertex.bindTooltip(l.glueindex, {permanent: true}); + } + }); + } + }); + setTimeout(this.closeTooltips.bind(this), 2000); + }, + closeTooltips() { + this.groundnetLayerGroup.eachLayer(l => { + if (l instanceof L.Polyline) { + l.getLatLngs().forEach(l => { + if (l.__vertex && l.__vertex.getTooltip()) { + l.__vertex.unbindTooltip(); + } + }); + } + }); }, disableEdit () { this.editable = false @@ -278,7 +301,7 @@ You should have received a copy of the GNU General Public License along with FG if (this.featureLookup===undefined || this.featureLookup[index]===undefined) { return } - var parking = this.featureLookup[index].filter(n => n instanceof L.ParkingSpot) + var parking = this.featureLookup[index].filter(n => n instanceof L.ParkingSpot) var walkedNodes = [index] var pushBackNodes = [] this.walkPushbackRoute(index, walkedNodes, pushBackNodes) @@ -304,28 +327,28 @@ You should have received a copy of the GNU General Public License along with FG } }); }, - removeArc (arc) { + removeArc (arc) { console.debug('Remove Arc : ' + arc); var arcLayer = this.groundnetLayerGroup.getLayer(this.$store.state.Editable.index); - arcLayer.removeFrom(this.groundnetLayerGroup); + arcLayer.removeFrom(this.groundnetLayerGroup); }, removeParking (index) { if(this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); + console.error("Lookup " + index + " failed "); return; } this.featureLookup[index].forEach((element, i) => { if (element instanceof L.ParkingSpot) { - element.removeFrom(this.groundnetLayerGroup); + element.removeFrom(this.groundnetLayerGroup); } }); }, show (index) { if(Number.isNaN(index)) { return; - } + } if(this.featureLookup===undefined || this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); + console.error("Lookup " + index + " failed "); this.buildLookup() } if (Number(this.$store.state.Editable.index) >= 0 && @@ -394,12 +417,12 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup[layer.glueindex].push(layer); } else { console.warn(layer) - } + } }) }, getPointCoords (index) { if(this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); + console.error("Lookup " + index + " failed "); return; } return this.featureLookup[index].map((element, i) => { @@ -429,14 +452,14 @@ You should have received a copy of the GNU General Public License along with FG }).filter(n => n); }, /** - * + * */ setPointCoords (index, coordinates) { var position = new Coordinates(coordinates); var latlng = {lat: position.latitude, lng: position.longitude }; if(this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); + console.error("Lookup " + index + " failed "); return; } return this.featureLookup[index].map((element, i) => { @@ -459,7 +482,7 @@ You should have received a copy of the GNU General Public License along with FG else if (element instanceof L.Polyline) { element._latlngs.forEach((e1, index1) => { if (e1.attributes.index===index && ( - latlng.lat !== element.getLatLngs()[index1].lat || + latlng.lat !== element.getLatLngs()[index1].lat || latlng.lng !== element.getLatLngs()[index1].lng ) ) { @@ -484,12 +507,12 @@ You should have received a copy of the GNU General Public License along with FG element.editor.feature.setLatLngs(element.latlngs); element.editor.feature.updateMiddle(); */ - } + } }); }, refreshLookup(index) { //element.__vertex - this.featureLookup[index] = this.featureLookup[index].filter(item => { + this.featureLookup[index] = this.featureLookup[index].filter(item => { return !(item instanceof L.Editable.VertexMarker && item.editor.__vertex === undefined) } ); @@ -502,7 +525,7 @@ You should have received a copy of the GNU General Public License along with FG }, removeNode (index) { if(this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); + console.error("Lookup " + index + " failed "); return; } try { @@ -520,31 +543,31 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup[Number(element.end)] = this.featureLookup[Number(element.end)].filter(item => item !== element); this.refreshLookup(Number(element.end)) } - element.removeFrom(this.groundnetLayerGroup); + element.removeFrom(this.groundnetLayerGroup); element.removeFrom(this.$parent.mapObject); } else { element.getLatLngs().forEach((e1, index1) => { console.debug('Remove Long' + index1 + ' ' + e1); if (e1.attributes.index===index) { - var splitOffNodes = element.getLatLngs().splice(index1); + var splitOffNodes = element.getLatLngs().splice(index1); element.editor.refresh(); element.editor.reset(); splitOffNodes.splice(0, 1); if( splitOffNodes.length>1) { var polyline = new L.Polyline(splitOffNodes, { attributes: {} }).addTo(layerGroup); extendTaxiSegment(polyline); - polyline.addListeners(); + polyline.addListeners(); polyline.setEditlayer(this); polyline.enableEdit(); polyline.editor.refresh(); polyline.editor.reset(); - polyline.addTo(this.groundnetLayerGroup); + polyline.addTo(this.groundnetLayerGroup); polyline.end = element.end; // Remove from end lookup this.featureLookup[element.options.attributes.end] = this.featureLookup[element.options.attributes.end].filter(item => item !== element); // push to the end lookup - this.featureLookup[element.options.attributes.end].push(polyline); + this.featureLookup[element.options.attributes.end].push(polyline); } if(element.getLatLngs().length === 1) { this.featureLookup[index] = this.featureLookup[index].filter(item => item !== element); @@ -561,8 +584,8 @@ You should have received a copy of the GNU General Public License along with FG element.removeFrom(this.groundnetLayerGroup); } else { console.warn('WTF' + element); - } - }); + } + }); } catch (error) { console.error(error); } @@ -602,7 +625,7 @@ You should have received a copy of the GNU General Public License along with FG console.debug(event) event.target.addTo(this.groundnetLayerGroup) }) - }, + }, drawPushbackPolyline () { var polyLine = this.$parent.mapObject.editTools.startPolyline() polyLine.addTo(this.groundnetLayerGroup) @@ -619,7 +642,7 @@ You should have received a copy of the GNU General Public License along with FG polyLine.on('editable:drawing:end', event => { console.debug(event) event.target.addTo(this.groundnetLayerGroup) - var pt = event.sourceTarget._latlngs[event.sourceTarget._latlngs.length-1]; + var pt = event.sourceTarget._latlngs[event.sourceTarget._latlngs.length-1]; pt.attributes['holdPointType'] = 'PushBack' var nIndex = pt.attributes.index var fa_icon = "
"; @@ -653,18 +676,18 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup[this.$store.state.Editable.index].forEach((element,index) => { if (element instanceof L.ParkingSpot) { element.options.attributes = Object.assign({}, this.$store.state.Editable.data.parking) - element.updateVertexFromDirection(); - element.updateWheelPos(); - element.updateBox(); + element.updateVertexFromDirection(); + element.updateWheelPos(); + element.updateBox(); } }) if (this.$store.state.Editable.data.parking.coords) { - this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.parking.coords) + this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.parking.coords) } }, editedParkings() { if (this.featureLookup===undefined) { - console.warn("Lookup undefined"); + console.warn("Lookup undefined"); this.buildLookup() } if (this.featureLookup===undefined) { @@ -679,7 +702,7 @@ You should have received a copy of the GNU General Public License along with FG element.options.attributes.name = newElement.name element.options.attributes.number = newElement.number element.options.attributes.type = newElement.type - //element.updateVertexFromDirection(); + //element.updateVertexFromDirection(); } }) } @@ -690,10 +713,10 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup[this.$store.state.Editable.index].forEach((element,index) => { if (element instanceof L.ParkingSpot) { element.options.attributes = Object.assign({}, this.$store.state.Editable.data.parking) - element.updateVertexFromDirection(); + element.updateVertexFromDirection(); } }) -*/ +*/ }, editedArc() { if (!this.groundnetLayerGroup || @@ -709,7 +732,7 @@ You should have received a copy of the GNU General Public License along with FG console.log('Edited Arc : ' + this.$store.state.Editable.index); arc.options.attributes = Object.assign({}, this.$store.state.Editable.data.arc) arc.updateStyle(); - } + } }, editedMultiArc() { if (!this.groundnetLayerGroup || @@ -729,7 +752,7 @@ You should have received a copy of the GNU General Public License along with FG arc.options.attributes.name = String(this.$store.state.Editable.data.multiarc.name) arc.options.attributes.isPushBackRoute = Number(this.$store.state.Editable.data.multiarc.isPushBackRoute) arc.updateStyle(); - } + } }); }, //Update Node @@ -739,11 +762,11 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup===undefined || !this.editing) { return; - } + } var isOnRunway = Number(this.$store.state.Editable.data.node.isOnRunway); var isHoldPoint = this.$store.state.Editable.data.node.holdPointType !== 'none' && this.$store.state.Editable.data.node.holdPointType !== undefined; - var nIndex = this.$store.state.Editable.index; + var nIndex = this.$store.state.Editable.index; var hasRunwayNode = false; var hasHoldPointNode = false; var latlng; @@ -752,14 +775,14 @@ You should have received a copy of the GNU General Public License along with FG if (isOnRunway === 0) { // We shouldn't have a RunwayNode element.removeFrom(this.groundnetLayerGroup); - this.featureLookup[nIndex].splice(index,1); + this.featureLookup[nIndex].splice(index,1); } hasRunwayNode = true; } else if (element instanceof L.HoldNode) { if (!isHoldPoint) { // We shouldn't have a RunwayNode element.removeFrom(this.groundnetLayerGroup); - this.featureLookup[nIndex].splice(index,1); + this.featureLookup[nIndex].splice(index,1); } else { var fa_icon; if (this.$store.state.Editable.data.node.holdPointType === 'PushBack') { @@ -792,17 +815,17 @@ You should have received a copy of the GNU General Public License along with FG latlng = element._latlngs[1]; } } else if (element instanceof L.Polyline) { - element._latlngs.forEach(element => { - if(element.__vertex && Number(element.glueindex) === Number(nIndex)){ + element._latlngs.forEach(element => { + if(element.__vertex && Number(element.glueindex) === Number(nIndex)){ if (this.$store.state.Editable.data.node.coords) { - this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.node.coords) + this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.node.coords) var position = new Coordinates(this.$store.state.Editable.data.node.coords); latlng = {lat: position.latitude, lng: position.longitude }; } } }); - } - + } + }) if (!hasRunwayNode && isOnRunway && latlng !== undefined) { this.addRunwayNode(latlng, nIndex) @@ -881,7 +904,7 @@ You should have received a copy of the GNU General Public License along with FG } } else { console.log(layer) - } + } }) layers.sort((l1, l2) => l1.d - l2.d) if (layers.length > 0) { @@ -910,9 +933,9 @@ You should have received a copy of the GNU General Public License along with FG circle.addListeners() circle.enableEdit() circle.extensions() - circle.updateVertexFromDirection(); - circle.updateWheelPos(); - circle.updateBox(); + circle.updateVertexFromDirection(); + circle.updateWheelPos(); + circle.updateBox(); if (Number(this.$store.state.Editable.index) >= 0 && this.featureLookup[this.$store.state.Editable.index]!==undefined) { this.featureLookup[this.$store.state.Editable.index].forEach(element => { @@ -934,7 +957,7 @@ You should have received a copy of the GNU General Public License along with FG }, link (index) { var layers = [] - var centerLatLng = null + var centerLatLng = null this.featureLookup[index].forEach(layer => { if (layer instanceof L.Polyline) { // console.log(layer._latlngs) @@ -943,7 +966,7 @@ You should have received a copy of the GNU General Public License along with FG if (Number.isNaN(latlng.glueindex)) { console.warn('No glueindex : ' + latlng.__vertex); } - + if (Number(latlng.glueindex) === index) { centerLatLng = latlng; } @@ -1014,9 +1037,9 @@ You should have received a copy of the GNU General Public License along with FG } }) } - }) + }) featureLookup[glueindex] = []; - }); + }); }, save () { var xml = [] @@ -1024,7 +1047,7 @@ You should have received a copy of the GNU General Public License along with FG //console.debug(l) xml.push(l) }) - writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml) + writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml) }, //Copy to test directory test() { @@ -1040,16 +1063,16 @@ You should have received a copy of the GNU General Public License along with FG this.$message({ type: 'info', message: `Copied to ${fNew}` - }); + }); } catch (error) { this.$message({ type: 'error', message: `Copy error : ${error}` - }); + }); } }, setVisible(visible) { - if (this.layerGroup) { + if (this.layerGroup) { if (visible) { this.layerGroup.addTo(this.$parent.mapObject) } else { diff --git a/src/renderer/components/ToolBar.vue b/src/renderer/components/ToolBar.vue index 143f48b..222a9c5 100644 --- a/src/renderer/components/ToolBar.vue +++ b/src/renderer/components/ToolBar.vue @@ -11,6 +11,12 @@ You should have received a copy of the GNU General Public License along with FG --> @@ -191,7 +239,7 @@ From 091e7853ebffdfa924c70a181cb379c73fdc3654 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 1 Jun 2021 14:44:43 +0200 Subject: [PATCH 131/146] #138 --- src/renderer/components/AirlineItem.vue | 16 ++++++++++------ src/renderer/loaders/traffic_loader.js | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/AirlineItem.vue b/src/renderer/components/AirlineItem.vue index 3bc4f35..8038296 100644 --- a/src/renderer/components/AirlineItem.vue +++ b/src/renderer/components/AirlineItem.vue @@ -12,9 +12,8 @@ You should have received a copy of the GNU General Public License along with FG @@ -68,12 +67,17 @@ export default { }, traffic: function () { if (this.filename) { - return this.trafficFile.filter(f => f.callsign).filter(f => + var aircraftLookup = this.trafficFile.filter(a => a['required-aircraft']) + .reduce((req, acc) => { + req[acc['required-aircraft']] = acc + return req + }, {}) + var ret = this.trafficFile.filter(f => f.callsign).filter(f => (f.departure.port === this.$store.state.Airports.currentAirport.icao && this.direction === 0) || (f.arrival.port === this.$store.state.Airports.currentAirport.icao && this.direction === 1) - ) + ).map(obj => ({ ...obj, flighttype: aircraftLookup[obj['required-aircraft']].flighttype })) + return ret } - console.debug(this.filename) }, aircraft: function () { if (this.filename) { diff --git a/src/renderer/loaders/traffic_loader.js b/src/renderer/loaders/traffic_loader.js index 05d7814..4818896 100644 --- a/src/renderer/loaders/traffic_loader.js +++ b/src/renderer/loaders/traffic_loader.js @@ -68,6 +68,7 @@ function flightMapper(params) { return { id: `${btoa(buildId(params))}`, callsign: params.find('callsign').text(), + 'required-aircraft': params.find('required-aircraft').text(), arrival: { port: params.find('arrival/port').text(), time: params.find('arrival/time').text() From b2ddb08374a2b899b33aaf71a6fbd41bcda542c9 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Wed, 2 Jun 2021 12:12:52 +0200 Subject: [PATCH 132/146] #130 --- src/renderer/components/ParkingEdit.vue | 38 ++++++++++++++----------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/renderer/components/ParkingEdit.vue b/src/renderer/components/ParkingEdit.vue index 4c7065a..60a4294 100644 --- a/src/renderer/components/ParkingEdit.vue +++ b/src/renderer/components/ParkingEdit.vue @@ -177,8 +177,7 @@ :step="0.1" :precision="1" :disabled="!editing || calculate === 'Heading'" - @focus="headingFocussed = true" - @blur="headingFocussed = false" + @change="headingChange" > @@ -245,7 +244,24 @@ const turfOptions = { units: 'kilometers' }; export default { + mounted() { + this.$store.watch( + function (state) { + return state.Editable.data.parking; + }, + () => { this.editedParking() } + , + { + deep: true //add this if u need to watch object properties change etc. + } + ); + }, methods: { + editedParking() { + this.externalChange = true + this.heading = Number(this.$store.state.Editable.data.parking.heading); + this.externalChange = false + }, rotate() { var heading = this.$store.state.Editable.data.parking.heading + 90; while (heading>=360) { @@ -254,9 +270,7 @@ while (heading<0) { heading += 360 } - this.rotateFocussed = true; this.headingChange(heading); - this.rotateFocussed = false; }, headingChange( newValue ) { while (newValue>=360) { @@ -265,8 +279,8 @@ while (newValue<0) { newValue += 360 } - if ( Math.abs( ( this.$store.state.Editable.data.parking.heading - newValue ) >= 0 && Math.abs( this.$store.state.Editable.data.parking.heading - newValue ) <= 0.1 ) - || this.headingFocussed || this.rotateFocussed) { + if ( ( Math.abs( this.$store.state.Editable.data.parking.heading - newValue ) >= 0 && Math.abs( this.$store.state.Editable.data.parking.heading - newValue ) <= 0.1 ) + || !this.externalChange) { if (Number(this.$store.state.Editable.data.parking.heading) !== newValue) { this.$store.commit('SET_EDIT_PARKING_HEADING', newValue) } @@ -331,7 +345,7 @@ } } }, - data () { return {rotateFocussed: false, headingFocussed: false, coordFocussed: false, noseCoordFocussed: false, calculateState: 'Nose Wheel', noseWheel: '', validRadii: [7.5, 10, 14, 18, 26, 33, 40], validN2M: [5, 5, 6, 10, 15, 24, 24] } }, + data () { return {rotateFocussed: false, externalChange: false, coordFocussed: false, noseCoordFocussed: false, calculateState: 'Nose Wheel', noseWheel: '', validRadii: [7.5, 10, 14, 18, 26, 33, 40], validN2M: [5, 5, 6, 10, 15, 24, 24], heading: 0 }}, computed: { editing: { get: function () { @@ -451,16 +465,6 @@ this.calcCenter(); } }, - heading: { - // getter - get: function () { - return this.$store.state.Editable.data.parking.heading - }, - // setter - set: function (newValue) { - this.headingChange(newValue) - } - }, wingspan: { // getter get: function () { From f56d8ad926ad3b548802eeae567107fb7e65b2d0 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 3 Jun 2021 11:32:48 +0200 Subject: [PATCH 133/146] Check --- src/renderer/components/CheckPanel.vue | 10 ++++++---- src/renderer/utils/check.js | 4 ++-- src/renderer/utils/check_msg.json | 18 +++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/renderer/components/CheckPanel.vue b/src/renderer/components/CheckPanel.vue index 0996905..abf4770 100644 --- a/src/renderer/components/CheckPanel.vue +++ b/src/renderer/components/CheckPanel.vue @@ -5,24 +5,26 @@
- +

Check not run

- - + + + {{ result.message[0] }} - +
diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index eab5fb2..03833c7 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -302,11 +302,11 @@ async function checkGroundnet(data) { this.postMessage(['progress', 1]); if (parkings.length === 0) { - notOkNodes.push({ id: 0, message: check_msg.NO_PARKINGS }); + notOkNodes.push({ id: -2, message: check_msg.NO_PARKINGS }); } this.postMessage(['progress', 1]); if (runwayNodeIDs.length === 0) { - notOkNodes.push({ id: 0, message: check_msg.NO_RUNWAY_NODES }); + notOkNodes.push({ id: -2, message: check_msg.NO_RUNWAY_NODES }); } this.postMessage(['progress', 1]); var allEnds = Object.entries(bidirectionalGraph).filter( diff --git a/src/renderer/utils/check_msg.json b/src/renderer/utils/check_msg.json index fc2c09d..dc3723a 100644 --- a/src/renderer/utils/check_msg.json +++ b/src/renderer/utils/check_msg.json @@ -1,29 +1,29 @@ { "LONG_ROUTE_START" : ["Start of long route", "Route segments of >2km are Taxidraw artefacts"], "LONG_ROUTE_END": ["End of long route", "Route segments of >2km are Taxidraw artefacts"], - "EDGE_MISSING_DIRECTION": ["Edge missing direction", ""], + "EDGE_MISSING_DIRECTION": ["Edge missing direction", "Each edge must have a direction (forward, backward, bi-directional)"], "NO_RUNWAY_ROUTE": ["No way from parking to each runway", ""], "NO_PARKING_ROUTE": ["No way from runway to each parking", ""], "NO_PARKINGS": ["No parkings", ""], - "NO_RUNWAYNODES": ["No Runwaynodes", ""], + "NO_RUNWAY_NODES": ["No Runwaynodes", "Fine for parking only"], "NOT_LEGIT_END": ["Node not a legimate end", "Taxiroutes must end either at a parking or on a runway"], "UNKNOWN_RADIUS" :["Unknown radius", "Radii must be one from the list"], - "OVERLAPPING_PARKINGS" :["Overlapping parkings", ""], - "NAME_EMPTY" :["Name empty", ""], - "TYPE_EMPTY" :["Parking type empty", ""], - "PARKING_TYPE_INVALID" :["Parking type not valid", ""], + "OVERLAPPING_PARKINGS" :["Overlapping parkings", "Parkings must not overlap"], + "NAME_EMPTY" :["Name empty", "Name of parking must not be empty"], + "TYPE_EMPTY" :["Parking type empty", "The parking type must not be empty"], + "PARKING_TYPE_INVALID" :["Parking type not valid", "The type of parking must be one of ()"], "DUAL_PUSHBACK": ["Dual runway/ pushback node", "A runway node can not be a hold node at the same time"], "RUNWAY_NODE_NOT_ON_RUNWAY" : ["Runwaynode not on runway", ""], "NON_RUNWAYNODE_ON_RUNWAY": ["Non Runwaynode on runway", ""], - "PARKINGS_VALID": ["Parkings valid", ""], + "PARKINGS_VALID": ["Parkings valid", "All Ok"], "NO_OVERLAPPING_PARKINGS": ["No parkings overlapping", ""], "NO_INVALID_ENDS": ["No invalid ends", ""], "ROUTES_FROM_PARKINGS_OK": ["Routes from parkings OK", ""], "ROUTES_FROM_RUNWAYS_OK": ["Routes from runways OK", ""], "PUSHBACK_ROUTES_OK": ["Pushback routes OK", ""], "UNCONNECTED_PUSHBACK": ["Unconnected Pushbacknode", ""], - "NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", ""], - "MULTIPLE_PUSHBACK": ["Multiple connected pushback points", ""], + "NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", "There is no route to the pushback hold point"], + "MULTIPLE_PUSHBACK": ["Multiple connected pushback points", "There are more than one possible pushback holdpoint routes."], "PUSHBACK_NOT_CONNECTED": ["Pushback Holding Point not Connected to Pushback Route", ""], "TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", ""], "PUSHBACK_EXIT_NOT_BIDRECTIONAL": ["Pushback Holding Point Exit route is not bidirectional", ""], From f9d0469466bb2b098daa1d786ee76cb0cf77c9c6 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 3 Jun 2021 15:03:22 +0200 Subject: [PATCH 134/146] Unique Trafficlist --- src/renderer/components/AirlineItem.vue | 13 +++++++------ src/renderer/components/TrafficList.vue | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/AirlineItem.vue b/src/renderer/components/AirlineItem.vue index 8038296..507cf06 100644 --- a/src/renderer/components/AirlineItem.vue +++ b/src/renderer/components/AirlineItem.vue @@ -10,10 +10,10 @@ FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY W You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. --> @@ -74,8 +74,9 @@ export default { }, {}) var ret = this.trafficFile.filter(f => f.callsign).filter(f => (f.departure.port === this.$store.state.Airports.currentAirport.icao && this.direction === 0) || - (f.arrival.port === this.$store.state.Airports.currentAirport.icao && this.direction === 1) - ).map(obj => ({ ...obj, flighttype: aircraftLookup[obj['required-aircraft']].flighttype })) + (f.arrival.port === this.$store.state.Airports.currentAirport.icao && this.direction === 1)) + .map(obj => ({ ...obj, flighttype: aircraftLookup[obj['required-aircraft']].flighttype })) + .filter((v, i, a) => a.findIndex(t => (t.id === v.id)) === i) return ret } }, diff --git a/src/renderer/components/TrafficList.vue b/src/renderer/components/TrafficList.vue index 08c6103..362086d 100644 --- a/src/renderer/components/TrafficList.vue +++ b/src/renderer/components/TrafficList.vue @@ -81,7 +81,7 @@ You should have received a copy of the GNU General Public License along with FG airlineCodes.push({value: element, label: element}) }) } - return airlineCodes + return airlineCodes.filter((v, i, a) => a.indexOf(v) === i) } } } From 0f4b82807ec50180c388381a7762352cde2ab515 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 3 Jun 2021 15:35:44 +0200 Subject: [PATCH 135/146] #133 --- src/renderer/components/SettingsPanel.vue | 24 ++++++++++++++---- src/renderer/utils/logger.js | 31 +++++++++++++++-------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/renderer/components/SettingsPanel.vue b/src/renderer/components/SettingsPanel.vue index 4c24817..13e7dc5 100644 --- a/src/renderer/components/SettingsPanel.vue +++ b/src/renderer/components/SettingsPanel.vue @@ -219,13 +219,27 @@ name: 'settings-panel', components: { DirectorySelect, FileSelect }, props: [], - mounted () { - }, - data () { - return { ok: true, activeName: '0' } + return { ok: true, activeName: '0', scanStoreLogging: false } + }, + mounted () { + console.debug('Mount') + this.$store.watch( + function (state) { + console.debug('Mount ' + JSON.stringify(state)) + return state.Settings.settings + }, + () => { this.loggingChanged() } + , + { + deep: true // add this if u need to watch object properties change etc. + } + ) }, methods: { + loggingChanged () { + this.scanStoreLogging = this.$store.state.Settings.settings.scanLogging === 1 + }, flightgearDirectorySelect: function (flightgearDirectory) { console.log(flightgearDirectory) this.$store.commit('FLIGHTGEAR_DIRECTORY', flightgearDirectory) @@ -344,7 +358,7 @@ scanLogging: { // getter get: function () { - return this.$store.state.Settings.settings.scanLogging === 1 + return this.scanStoreLogging }, // setter set: function (newValue) { diff --git a/src/renderer/utils/logger.js b/src/renderer/utils/logger.js index 200a07a..89b8f2e 100644 --- a/src/renderer/utils/logger.js +++ b/src/renderer/utils/logger.js @@ -1,29 +1,38 @@ -var util = require("util"); +/* eslint-disable no-unused-vars */ +var util = require('util'); const d = new Date(); -const fName = 'scan_' + d.getFullYear() -+ d.getMonth() -+ d.getDay() -+ d.getHours() -+ d.getMinutes() -+ d.getSeconds() -+ d.getMilliseconds() + '.log'; +const fName = 'scan_' + d.getFullYear() + +d.getMonth() + +d.getDay() + +d.getHours() + +d.getMinutes() + +d.getSeconds() + +d.getMilliseconds() + '.log'; var logStream = null; var loggerInit = function (logging) { if (logging) { - logStream = require('fs').createWriteStream( fName, {autoClose: true}); + try { + logStream = require('fs').createWriteStream( fName, {autoClose: true}); + } catch (error) { + console.error('Logging not possible ' + error); + } } } var logger = function (level, msg, o) { - var d = new Date(); - if(logStream!==null) { + var d = new Date(); + try { + if (logStream !== null) { logStream.write(d.toUTCString() + '|' + level + ' | ' + msg + '\r\n'); } if (o != undefined && logStream!==null) { logStream.write( util.inspect(o,{depth: 2}) + '\r\n'); } + } catch (error) { + console.error('Logging not possible ' + error); + } } \ No newline at end of file From 60881eaf3e43f48cb7aaa9d10f2c0b857d0c3e36 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Thu, 3 Jun 2021 16:00:46 +0200 Subject: [PATCH 136/146] Logfile in user dir --- src/renderer/components/SettingsPanel.vue | 2 -- src/renderer/utils/logger.js | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/SettingsPanel.vue b/src/renderer/components/SettingsPanel.vue index 13e7dc5..66f36d2 100644 --- a/src/renderer/components/SettingsPanel.vue +++ b/src/renderer/components/SettingsPanel.vue @@ -223,10 +223,8 @@ return { ok: true, activeName: '0', scanStoreLogging: false } }, mounted () { - console.debug('Mount') this.$store.watch( function (state) { - console.debug('Mount ' + JSON.stringify(state)) return state.Settings.settings }, () => { this.loggingChanged() } diff --git a/src/renderer/utils/logger.js b/src/renderer/utils/logger.js index 89b8f2e..2fafd4e 100644 --- a/src/renderer/utils/logger.js +++ b/src/renderer/utils/logger.js @@ -14,9 +14,12 @@ d.getMilliseconds() + '.log'; var logStream = null; var loggerInit = function (logging) { + debugger; if (logging) { try { - logStream = require('fs').createWriteStream( fName, {autoClose: true}); + const homedir = require('os').homedir(); + const logFileName = require('path').join(homedir, fName); + logStream = require('fs').createWriteStream( logFileName, {autoClose: true}); } catch (error) { console.error('Logging not possible ' + error); } From 9e7f41a5c9d34c27d1d1bac9aacf4142ab16614d Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 4 Jun 2021 09:16:15 +0200 Subject: [PATCH 137/146] Check for double edges --- src/renderer/components/EditLayer.vue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 4fd94d5..205bcfc 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -369,9 +369,24 @@ You should have received a copy of the GNU General Public License along with FG if(Number.isNaN(index)) { return; } - if(this.featureLookup===undefined || this.featureLookup[index]===undefined) { - console.error("Lookup " + index + " failed "); - this.buildLookup() + if (this.featureLookup===undefined || this.featureLookup[index]===undefined) { + var found = false; + this.groundnetLayerGroup.eachLayer((layer) => { + if (layer instanceof L.Polyline && layer._leaflet_id == index) { + layer.select(); + this.$store.dispatch('setCenter', layer.getCenter()); + found = true; + } else { + layer.deselect(); + } + }); + if (found) { + return; + } else { + console.error("Lookup " + index + " failed "); + this.buildLookup(); + return; + } } if (Number(this.$store.state.Editable.index) >= 0 && this.featureLookup[this.$store.state.Editable.index]!==undefined) { @@ -383,7 +398,6 @@ You should have received a copy of the GNU General Public License along with FG this.featureLookup[index].forEach((element, i) => { if (element instanceof L.Polyline) { element._latlngs.forEach((e1, index1) => { - console.log(e1); if (e1.attributes.index===Number(index)) { var latlng = {}; latlng.lat = e1.lat; From 089ce029ec0864a6ff1d31d0460241a0a0ff3fd5 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 4 Jun 2021 09:16:58 +0200 Subject: [PATCH 138/146] Check for double edges --- src/renderer/utils/check.js | 11 ++++++++--- src/renderer/utils/check_msg.json | 3 ++- src/renderer/utils/logger.js | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index 03833c7..8879e06 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -397,6 +397,13 @@ async function checkGroundnet(data) { }); this.postMessage(['progress', 1]); + var doubleEdges = edges.filter((v, i, a) => a.findIndex(t => (t.start === v.start && t.end === v.end) ) !== i); + doubleEdges.forEach(e => { + notOkNodes.push({ id: e.id, message: check_msg.DOUBLE_EDGE }); + }); + + // debugger; + notOkNodes = notOkNodes.concat(invalidParkings); if (invalidParkings.length === 0) { notOkNodes.push({ id: -1, message: check_msg.PARKINGS_VALID }); @@ -517,12 +524,10 @@ var mapRunways = function (o) { var mapEdges = function (o) { if (o.type === 'poly') - // debugger; return { - start: o.start, end: o.end, isPushBackRoute: o.isPushBackRoute !== undefined && + id: o._leaflet_id, start: o.start, end: o.end, isPushBackRoute: o.isPushBackRoute !== undefined && o.isPushBackRoute !== 0, direction: o.direction, latLngs: o.latLngs }; - console.debug(o); } var latToTurf = function (turfPoint) { diff --git a/src/renderer/utils/check_msg.json b/src/renderer/utils/check_msg.json index dc3723a..08367b9 100644 --- a/src/renderer/utils/check_msg.json +++ b/src/renderer/utils/check_msg.json @@ -28,5 +28,6 @@ "TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", ""], "PUSHBACK_EXIT_NOT_BIDRECTIONAL": ["Pushback Holding Point Exit route is not bidirectional", ""], "NO_EDGES": ["No Edges", "No checks are run if there are no edges present"], - "NO_RUNWAYS": ["No Runways", "No checks are run if there are no runways present. APT layer visible?"] + "NO_RUNWAYS": ["No Runways", "No checks are run if there are no runways present. APT layer visible?"], + "DOUBLE_EDGE": ["No Double Edges", "This edge is doubled"] } \ No newline at end of file diff --git a/src/renderer/utils/logger.js b/src/renderer/utils/logger.js index 2fafd4e..8e64a67 100644 --- a/src/renderer/utils/logger.js +++ b/src/renderer/utils/logger.js @@ -14,7 +14,6 @@ d.getMilliseconds() + '.log'; var logStream = null; var loggerInit = function (logging) { - debugger; if (logging) { try { const homedir = require('os').homedir(); From b9b6574614b8799c1d05521b4e34e5a6d87781d2 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Mon, 7 Jun 2021 14:40:04 +0200 Subject: [PATCH 139/146] #140 --- src/renderer/components/Search.vue | 83 ++---------------------------- 1 file changed, 3 insertions(+), 80 deletions(-) diff --git a/src/renderer/components/Search.vue b/src/renderer/components/Search.vue index b7ce85e..24fef06 100644 --- a/src/renderer/components/Search.vue +++ b/src/renderer/components/Search.vue @@ -16,11 +16,8 @@