mirror of
https://github.com/maputnik/editor.git
synced 2026-08-25 22:47:39 +00:00
Clickable layer tooltips (#60)
This commit is contained in:
@@ -16,6 +16,7 @@ function groupFeaturesBySourceLayer(features) {
|
||||
|
||||
class FeatureLayerPopup extends React.Component {
|
||||
static propTypes = {
|
||||
onLayerSelect: PropTypes.func.isRequired,
|
||||
features: PropTypes.array
|
||||
}
|
||||
|
||||
@@ -27,6 +28,9 @@ class FeatureLayerPopup extends React.Component {
|
||||
return <label
|
||||
key={idx}
|
||||
className="maputnik-popup-layer"
|
||||
onClick={() => {
|
||||
this.props.onLayerSelect(feature.layer.id)
|
||||
}}
|
||||
>
|
||||
<LayerIcon type={feature.layer.type} style={{
|
||||
width: 14,
|
||||
|
||||
Reference in New Issue
Block a user