mapbox-gl-controls
Advanced tools
Comparing version 1.5.1 to 1.5.2
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Controls for mapbox-gl", |
@@ -6,2 +6,5 @@ const defaultGetContent = (event) => { | ||
const mouseMoveEvent = 'mousemove'; | ||
const mapMoveEvent = 'move'; | ||
/** | ||
@@ -35,3 +38,3 @@ * Shows tooltip on hover | ||
this.map.getCanvas().style.cursor = 'pointer'; | ||
this.map.on('move', this.updatePosition); | ||
this.map.on(mapMoveEvent, this.updatePosition); | ||
} | ||
@@ -43,3 +46,3 @@ | ||
this.map.getCanvas().style.cursor = ''; | ||
this.map.off('move', this.updatePosition); | ||
this.map.off(mapMoveEvent, this.updatePosition); | ||
} | ||
@@ -67,8 +70,9 @@ | ||
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; | ||
@@ -80,8 +84,9 @@ } | ||
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(); | ||
@@ -88,0 +93,0 @@ this.map = undefined; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79723
1996