Add comments

This commit is contained in:
Per Liedman 2016-04-15 11:49:50 +02:00 committed by Iván Sánchez Ortega
parent f05af08a2c
commit e5dcb007c6

View File

@ -69,6 +69,9 @@ L.Draggable = L.Evented.extend({
},
_onDown: function (e) {
// Ignore simulated events, since we handle both touch and
// mouse explicitly; otherwise we risk getting duplicates of
// touch events, see #4315.
if (e._simulated) { return; }
this._moved = false;
@ -102,6 +105,9 @@ L.Draggable = L.Evented.extend({
},
_onMove: function (e) {
// Ignore simulated events, since we handle both touch and
// mouse explicitly; otherwise we risk getting duplicates of
// touch events, see #4315.
if (e._simulated) { return; }
if (e.touches && e.touches.length > 1) {