From afb70126ad10a3a70785549b3d74327d3ac45e63 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Fri, 24 Aug 2012 14:03:06 +0100 Subject: [PATCH] prevent drag after dragEnd bugfix no longer need --- WebContent/base/leaflet/L.Bugfixes.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/WebContent/base/leaflet/L.Bugfixes.js b/WebContent/base/leaflet/L.Bugfixes.js index e1979df15..645593581 100644 --- a/WebContent/base/leaflet/L.Bugfixes.js +++ b/WebContent/base/leaflet/L.Bugfixes.js @@ -52,29 +52,3 @@ L.LineUtil._sqClosestPointOnSegment = function (p, p1, p2, sqDist) { return p; } }; - - -// makes requestAnimFrame respect the immediate paramter -> prevents drag events after dragend events -// (alternatively: add if(!this.dragging ) return to L.Draggable._updatePosition, but must be done in leaflet.js!) -// [TODO: In Leaflet 0.4 use L.Util.cancelAnimFrame(this._animRequest) in L.Draggable._onUp() instead, also has to be done in leaflet.js!] -L.Util.requestAnimFrame = (function () { - function timeoutDefer(callback) { - window.setTimeout(callback, 1000 / 60); - } - - var requestFn = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - timeoutDefer; - - return function (callback, context, immediate, contextEl) { - callback = context ? L.Util.bind(callback, context) : callback; - if (immediate ) { // DS_CHANGE: removed additional condition requestFn === timeoutDefer - callback(); - } else { - requestFn(callback, contextEl); - } - }; -}());