loleaflet: mobile: rename Map.CalcTap to Map.TouchGesture

Change-Id: Ibcb45d87fcf5a0ea98bec06816e9085c6fe28937
This commit is contained in:
Henry Castro 2019-06-11 14:08:11 -04:00 committed by Tomaž Vajngerl
parent b75adb8629
commit f90810e6e8
4 changed files with 9 additions and 9 deletions

View file

@ -237,7 +237,7 @@ var deps = {
'core/Handler.js',
'map/handler/Map.TouchZoom.js',
'map/handler/Map.Tap.js',
'map/handler/Map.CalcTap.js'],
'map/handler/Map.TouchGesture.js'],
deps: ['AnimationZoom'],
desc: 'Enables smooth touch zoom / tap / longhold / doubletap on iOS, IE10, Android.'
},

View file

@ -56,8 +56,8 @@ L.Marker = L.Layer.extend({
},
onDown: function () {
if (this._map && this._map.touchCalc) {
this._map.touchCalc.disable();
if (this._map && this._map.touchGesture) {
this._map.touchGesture.disable();
}
},

View file

@ -117,7 +117,7 @@ L.Map = L.Evented.extend({
this.options.inertia = false;
this.dragging._draggable._manualDrag = true;
this._mainEvents('off');
this.addHandler('touchCalc', L.Map.CalcTap);
this.addHandler('touchGesture', L.Map.TouchGesture);
this.addHandler('touchZoom', L.Map.TouchZoom);
} else {
this.addHandler('mouse', L.Map.Mouse);

View file

@ -4,11 +4,11 @@
*/
L.Map.mergeOptions({
touchCalc: true,
touchGesture: true,
});
/* global Hammer $ */
L.Map.CalcTap = L.Handler.extend({
L.Map.TouchGesture = L.Handler.extend({
initialize: function (map) {
L.Handler.prototype.initialize.call(this, map);
@ -82,8 +82,8 @@ L.Map.CalcTap = L.Handler.extend({
},
_onDocUp: function () {
if (!this._map.touchCalc.enabled()) {
this._map.touchCalc.enable();
if (!this._map.touchGesture.enabled()) {
this._map.touchGesture.enable();
}
},
@ -145,7 +145,7 @@ L.Map.CalcTap = L.Handler.extend({
latlng = this._map.layerPointToLatLng(layerPoint),
mousePos = this._map._docLayer._latLngToTwips(latlng);
if (this._map._docLayer._cellCursor.contains(latlng)) {
if (this._map._docLayer._cellCursor && this._map._docLayer._cellCursor.contains(latlng)) {
this._cellSelections = true;
this._map._docLayer._postMouseEvent('buttondown', mousePos.x, mousePos.y, 1, 1, 0);
} else {