From 0a112fe76a824e18fe3430213cf674ce3bd77100 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 3 May 2020 21:28:17 +0200 Subject: [PATCH] Message after Test copy --- src/renderer/components/EditLayer.vue | 6 ++ src/renderer/components/Upload copy.vue | 80 ------------------- .../loaders/TaxiwaySegmentExtender.js | 1 + 3 files changed, 7 insertions(+), 80 deletions(-) delete mode 100644 src/renderer/components/Upload copy.vue diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index ebe3135..17f2cce 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -11,6 +11,7 @@ import {writeGroundnetXML} from '../loaders/groundnet_writer' import L2 from 'leaflet-textpath' import Vue from 'vue' + import { MessageBox } from 'element-ui'; const path = require('path') const fs = require('fs') @@ -677,6 +678,7 @@ writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml) this.load(this.icao, false) }, + //Copy to test directory test() { var f = path.join(this.$store.state.Settings.settings.airportsDirectory, this.icao[0], this.icao[1], this.icao[2], this.icao + '.groundnet.new.xml'); var fNew = path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0], this.icao[1], this.icao[2], this.icao + '.groundnet.xml'); @@ -686,6 +688,10 @@ try { fs.mkdirSync(path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0], this.icao[1], this.icao[2]), { recursive: true })} catch (err) { } fs.copyFileSync(f, fNew) + this.$message({ + type: 'info', + message: `Copied to ${f}` + }); }, setVisible(visible) { if (this.layerGroup) { diff --git a/src/renderer/components/Upload copy.vue b/src/renderer/components/Upload copy.vue deleted file mode 100644 index 15cf953..0000000 --- a/src/renderer/components/Upload copy.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index 68e5b23..61d0ca3 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -83,6 +83,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) { }); this.on('editable:vertex:new', event => { console.log(event) + // Find nearest node let closest = this.editLayer.closestLayerSnap(event.latlng, 5) let taxiwaySegment = event.latlng.__vertex.editor.feature; if(taxiwaySegment.options.attributes === undefined) {