|
@@ -174,8 +174,8 @@ L.Control.SideBySide = L.Control.extend({
|
174
|
174
|
map.on('move', this._updateClip, this)
|
175
|
175
|
map.on('layeradd layerremove', this._updateLayers, this)
|
176
|
176
|
on(range, getRangeEvent(range), this._updateClip, this)
|
177
|
|
- on(range, 'mousedown touchstart', cancelMapDrag, this)
|
178
|
|
- on(range, 'mouseup touchend', uncancelMapDrag, this)
|
|
177
|
+ on(range, L.Browser.touch ? 'touchstart' : 'mousedown', cancelMapDrag, this)
|
|
178
|
+ on(range, L.Browser.touch ? 'touchend' : 'mouseup', uncancelMapDrag, this)
|
179
|
179
|
},
|
180
|
180
|
|
181
|
181
|
_removeEvents: function () {
|
|
@@ -183,8 +183,8 @@ L.Control.SideBySide = L.Control.extend({
|
183
|
183
|
var map = this._map
|
184
|
184
|
if (range) {
|
185
|
185
|
off(range, getRangeEvent(range), this._updateClip, this)
|
186
|
|
- off(range, 'mousedown touchstart', cancelMapDrag, this)
|
187
|
|
- off(range, 'mouseup touchend', uncancelMapDrag, this)
|
|
186
|
+ off(range, L.Browser.touch ? 'touchstart' : 'mousedown', cancelMapDrag, this)
|
|
187
|
+ off(range, L.Browser.touch ? 'touchend' : 'mouseup', uncancelMapDrag, this)
|
188
|
188
|
}
|
189
|
189
|
if (map) {
|
190
|
190
|
map.off('layeradd layerremove', this._updateLayers, this)
|