From 8cc7404f537c431c28a5bbc0995763ffcaef2653 Mon Sep 17 00:00:00 2001 From: danzel Date: Wed, 29 Jan 2014 14:51:55 +1300 Subject: [PATCH] This should be oldLatLng, even if latlng is wrong, let's have this be right. refs #2412 #1423 --- spec/suites/layer/marker/MarkerSpec.js | 2 +- src/layer/marker/Marker.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/suites/layer/marker/MarkerSpec.js b/spec/suites/layer/marker/MarkerSpec.js index 438ce88b..cc8f34fd 100644 --- a/spec/suites/layer/marker/MarkerSpec.js +++ b/spec/suites/layer/marker/MarkerSpec.js @@ -109,7 +109,7 @@ describe("Marker", function () { marker.setLatLng(afterLatLng); expect(eventArgs).to.not.be(null); - expect(eventArgs.oldLatlng).to.be(beforeLatLng); + expect(eventArgs.oldLatLng).to.be(beforeLatLng); expect(eventArgs.latlng).to.be(afterLatLng); expect(marker.getLatLng()).to.be(afterLatLng); }); diff --git a/src/layer/marker/Marker.js b/src/layer/marker/Marker.js index 520e227d..c595c9ea 100644 --- a/src/layer/marker/Marker.js +++ b/src/layer/marker/Marker.js @@ -55,10 +55,10 @@ L.Marker = L.Layer.extend({ }, setLatLng: function (latlng) { - var oldLatlng = this._latlng; + var oldLatLng = this._latlng; this._latlng = L.latLng(latlng); this.update(); - return this.fire('move', { oldLatlng: oldLatlng, latlng: this._latlng }); + return this.fire('move', { oldLatLng: oldLatLng, latlng: this._latlng }); }, setZIndexOffset: function (offset) {