mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 23:50:02 +00:00
Indicate if feature is clickable
This commit is contained in:
@@ -89,7 +89,11 @@ export default class InspectionMap extends React.Component {
|
||||
})
|
||||
})
|
||||
|
||||
map.on('click', this.displayPopup.bind(this));
|
||||
map.on('click', this.displayPopup.bind(this))
|
||||
map.on('mousemove', function(e) {
|
||||
var features = map.queryRenderedFeatures(e.point, { layers: this.layers })
|
||||
map.getCanvas().style.cursor = (features.length) ? 'pointer' : ''
|
||||
})
|
||||
}
|
||||
|
||||
displayPopup(e) {
|
||||
|
||||
@@ -68,6 +68,10 @@ export default class MapboxGlMap extends React.Component {
|
||||
})
|
||||
|
||||
map.on('click', this.displayPopup.bind(this));
|
||||
map.on('mousemove', function(e) {
|
||||
var features = map.queryRenderedFeatures(e.point, { layers: this.layers })
|
||||
map.getCanvas().style.cursor = (features.length) ? 'pointer' : ''
|
||||
})
|
||||
}
|
||||
|
||||
displayPopup(e) {
|
||||
|
||||
Reference in New Issue
Block a user