comparison client/src/fairway/Fairwayprofile.vue @ 1204:ddfdf440da24

made searchbar contextual if bottlenecks are open search bar refers to that list if imports are open search bar is hidden
author Markus Kottlaender <markus@intevation.de>
date Mon, 19 Nov 2018 11:23:00 +0100
parents 502e0b960424
children ba8cd80d68b6
comparison
equal deleted inserted replaced
1201:37889ae85133 1204:ddfdf440da24
530 coordinates[2] 530 coordinates[2]
531 ]); 531 ]);
532 }, 532 },
533 applyCoordinates(coordinates) { 533 applyCoordinates(coordinates) {
534 // allow only numbers 534 // allow only numbers
535 coordinates = coordinates.filter(c => Number(c) === c) 535 coordinates = coordinates.filter(c => Number(c) === c);
536 if (coordinates.length === 4) { 536 if (coordinates.length === 4) {
537 // draw line on map 537 // draw line on map
538 const cutLayer = this.getLayerByName("Cut Tool"); 538 const cutLayer = this.getLayerByName("Cut Tool");
539 cutLayer.data.getSource().clear(); 539 cutLayer.data.getSource().clear();
540 const cut = new Feature({ 540 const cut = new Feature({
548 // draw diagram 548 // draw diagram
549 this.$store.dispatch("fairwayprofile/cut", cut); 549 this.$store.dispatch("fairwayprofile/cut", cut);
550 } else { 550 } else {
551 displayError({ 551 displayError({
552 title: "Invalid input", 552 title: "Invalid input",
553 message: "Please enter correct coordinates in the format: Lat,Lon,Lat,Lon" 553 message:
554 "Please enter correct coordinates in the format: Lat,Lon,Lat,Lon"
554 }); 555 });
555 } 556 }
556 }, 557 },
557 saveCut() { 558 saveCut() {
558 const previousCuts = 559 const previousCuts =