commit dea594016648b32039b997248abb4af6ed51c3dc parent 46e58bf6a1e687e5d68eca0a56993a5fa7404aec Author: Sergej Orlov <wladimirych@gmail.com> Date: Sat, 25 Mar 2017 00:48:51 +0300 [azimuth] reverse measurement Diffstat:
M | src/lib/leaflet.control.azimuth/index.js | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/lib/leaflet.control.azimuth/index.js b/src/lib/leaflet.control.azimuth/index.js @@ -220,6 +220,16 @@ L.Control.Azimuth = L.Control.extend({ onProfileButtonClick: function() { this.showProfile(); + }, + + onReverseButtonClick: function() { + if (this.points.end && this.points.start) { + this.setPoints({start: this.points.end, end: this.points.start}); + if (this.elevationControl) { + this.showProfile(); + } + + } } }