From fa0f848c35fe8e44eeee224447551748453bc57f Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Tue, 23 Jan 2018 17:54:30 -0600 Subject: [PATCH 1/4] adding swap button --- index.htm | 1 + js/GUI.Utils.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/index.htm b/index.htm index 6f919b7..cb0959c 100644 --- a/index.htm +++ b/index.htm @@ -70,6 +70,7 @@ +



diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js index 02c054d..1720719 100644 --- a/js/GUI.Utils.js +++ b/js/GUI.Utils.js @@ -39,6 +39,14 @@ $(document).ready(function() { var stop=$('#route_output :selected').parent().attr('label'); zoomfocus(stop); }); + $('#swapab').click(function() { + var pa = "pointa"; + var pb = "pointb"; + $("#pointa").remove(); + $("#pointb").remove(); + $("#pointa").val(pb); + $("#pointb").val(pa); + }); $('#calctnd').click(function() { removeEntity('arrow'); From 21f0214b5363c622d3010057cc9deee9dca3377f Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Tue, 23 Jan 2018 18:05:57 -0600 Subject: [PATCH 2/4] I forgot to call the spot on the page where it was getting the information. --- js/GUI.Utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js index 1720719..e7f15c0 100644 --- a/js/GUI.Utils.js +++ b/js/GUI.Utils.js @@ -40,8 +40,8 @@ $(document).ready(function() { zoomfocus(stop); }); $('#swapab').click(function() { - var pa = "pointa"; - var pb = "pointb"; + var pa = $("#pointa"); + var pb = $("#pointb"); $("#pointa").remove(); $("#pointb").remove(); $("#pointa").val(pb); From 1b17c521ba09ec75ffc93c92e672479864237ef2 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Tue, 23 Jan 2018 18:08:16 -0600 Subject: [PATCH 3/4] fixing bad value --- js/GUI.Utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js index e7f15c0..ad794df 100644 --- a/js/GUI.Utils.js +++ b/js/GUI.Utils.js @@ -44,8 +44,8 @@ $(document).ready(function() { var pb = $("#pointb"); $("#pointa").remove(); $("#pointb").remove(); - $("#pointa").val(pb); - $("#pointb").val(pa); + $("#pointa").html(pb); + $("#pointb").html(pa); }); $('#calctnd').click(function() { From ead59d92064b9270721160931ff0d3bcb3787ea1 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Tue, 23 Jan 2018 18:13:06 -0600 Subject: [PATCH 4/4] fixing bad value --- js/GUI.Utils.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/GUI.Utils.js b/js/GUI.Utils.js index ad794df..61862a6 100644 --- a/js/GUI.Utils.js +++ b/js/GUI.Utils.js @@ -40,12 +40,9 @@ $(document).ready(function() { zoomfocus(stop); }); $('#swapab').click(function() { - var pa = $("#pointa"); - var pb = $("#pointb"); - $("#pointa").remove(); - $("#pointb").remove(); - $("#pointa").html(pb); - $("#pointb").html(pa); + var swap=$('#pointa').val(); + $("#pointa").val($("#pointb").val()); + $("#pointb").val(swap); }); $('#calctnd').click(function() {