Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tkempken committed Sep 12, 2022
1 parent 674c737 commit 6991c99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@ L.Control.SplitMap = L.Control.extend({
map.on('move', this._updateClip, this)
map.on('layeradd layerremove', this._updateLayers, this)
on(range, getRangeEvent(range), this._updateClip, this)
on(range, L.Browser.touch ? 'touchstart' : 'mousedown', cancelMapDrag, this)
on(range, L.Browser.touch ? 'touchend' : 'mouseup', uncancelMapDrag, this)
on(range, 'ontouchstart' in window ? 'touchstart' : 'mousedown', cancelMapDrag, this)
on(range, 'ontouchstart' in window ? 'touchend' : 'mouseup', uncancelMapDrag, this)
},

_removeEvents: function () {
var range = this._range
var map = this._map
if (range) {
off(range, getRangeEvent(range), this._updateClip, this)
off(range, L.Browser.touch ? 'touchstart' : 'mousedown', cancelMapDrag, this)
off(range, L.Browser.touch ? 'touchend' : 'mouseup', uncancelMapDrag, this)
off(range, 'ontouchstart' in window ? 'touchstart' : 'mousedown', cancelMapDrag, this)
off(range, 'ontouchstart' in window ? 'touchend' : 'mouseup', uncancelMapDrag, this)
}
if (map) {
map.off('layeradd layerremove', this._updateLayers, this)
Expand Down

0 comments on commit 6991c99

Please sign in to comment.