mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 23:50:02 +00:00
Always show all features in inspect mode
This commit is contained in:
@@ -24,13 +24,14 @@ const Panel = (props) => {
|
||||
}
|
||||
|
||||
function renderFeature(feature) {
|
||||
console.log(feature)
|
||||
return <div>
|
||||
<Panel>{feature.layer['source-layer']}</Panel>
|
||||
{renderProperties(feature)}
|
||||
</div>
|
||||
}
|
||||
|
||||
class FeatureLayerTable extends React.Component {
|
||||
class FeaturePropertyPopup extends React.Component {
|
||||
|
||||
render() {
|
||||
const features = this.props.features
|
||||
@@ -41,4 +42,4 @@ class FeatureLayerTable extends React.Component {
|
||||
}
|
||||
|
||||
|
||||
export default FeatureLayerTable
|
||||
export default FeaturePropertyPopup
|
||||
|
||||
@@ -10,12 +10,10 @@ import 'mapbox-gl/dist/mapbox-gl.css'
|
||||
import '../../mapboxgl.css'
|
||||
|
||||
function convertInspectStyle(mapStyle, sources, highlightedLayer) {
|
||||
let coloredLayers = generateColoredLayers(sources)
|
||||
const layer = colorHighlightedLayer(highlightedLayer)
|
||||
const coloredLayers = generateColoredLayers(sources)
|
||||
|
||||
const layer = colorHighlightedLayer(highlightedLayer)
|
||||
if(layer) {
|
||||
const idx = style.indexOfLayer(coloredLayers, layer.id)
|
||||
coloredLayers.splice(idx, 1)
|
||||
coloredLayers.push(layer)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user