mapbox-gl-controls
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -27,2 +27,5 @@ function _classCallCheck(instance, Constructor) { | ||
}; | ||
var mouseMoveEvent = 'mousemove'; | ||
var mapMoveEvent = 'move'; | ||
/** | ||
@@ -37,3 +40,2 @@ * Shows tooltip on hover | ||
var Tooltip = | ||
@@ -66,3 +68,3 @@ /*#__PURE__*/ | ||
this.map.getCanvas().style.cursor = 'pointer'; | ||
this.map.on('move', this.updatePosition); | ||
this.map.on(mapMoveEvent, this.updatePosition); | ||
} | ||
@@ -75,3 +77,3 @@ }, { | ||
this.map.getCanvas().style.cursor = ''; | ||
this.map.off('move', this.updatePosition); | ||
this.map.off(mapMoveEvent, this.updatePosition); | ||
} | ||
@@ -103,9 +105,10 @@ }, { | ||
this.map.on(this.eventShow, this.layer, this.show); | ||
this.map.on(mouseMoveEvent, this.layer, this.move); | ||
this.map.on(this.eventHide, this.layer, this.hide); | ||
} else { | ||
this.map.on(this.eventShow, this.show); | ||
this.map.on(mouseMoveEvent, this.move); | ||
this.map.on(this.eventHide, this.hide); | ||
} | ||
this.map.on('mousemove', this.move); | ||
return this.container; | ||
@@ -118,9 +121,10 @@ } | ||
this.map.off(this.eventShow, this.layer, this.show); | ||
this.map.off(mouseMoveEvent, this.layer, this.move); | ||
this.map.off(this.eventHide, this.layer, this.hide); | ||
} else { | ||
this.map.off(this.eventShow, this.show); | ||
this.map.off(mouseMoveEvent, this.move); | ||
this.map.off(this.eventHide, this.hide); | ||
} | ||
this.map.off('mousemove', this.move); | ||
this.hide(); | ||
@@ -127,0 +131,0 @@ this.map = undefined; |
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Controls for mapbox-gl", |
79927
2000