chore: Update maplibre-gl-inspect to v1.7.0

This commit is contained in:
acalcutt 2024-07-04 11:32:33 -04:00
parent 8ca3a89796
commit 14f1d85b43
2 changed files with 4 additions and 3 deletions

View file

@ -849,7 +849,7 @@
length = result.length; length = result.length;
for (var key in value) { for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && if ((hasOwnProperty.call(value, key)) &&
!(skipIndexes && ( !(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode. // Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' || key == 'length' ||
@ -2055,9 +2055,10 @@
} }
function renderProperties(feature) { function renderProperties(feature) {
const sourceProperty = renderLayer(feature.layer['source-layer'] || feature.layer.source); const sourceProperty = renderLayer(feature.layer['source-layer'] || feature.layer.source);
const idProperty = renderProperty('$id', feature.id);
const typeProperty = renderProperty('$type', feature.geometry.type); const typeProperty = renderProperty('$type', feature.geometry.type);
const properties = Object.keys(feature.properties).map(propertyName => renderProperty(propertyName, feature.properties[propertyName])); const properties = Object.keys(feature.properties).map(propertyName => renderProperty(propertyName, feature.properties[propertyName]));
return [sourceProperty, typeProperty].concat(properties).join(''); return [sourceProperty, idProperty, typeProperty].concat(properties).join('');
} }
function renderFeatures(features) { function renderFeatures(features) {
return features.map(ft => `<div class="maplibregl-inspect_feature">${renderProperties(ft)}</div>`).join(''); return features.map(ft => `<div class="maplibregl-inspect_feature">${renderProperties(ft)}</div>`).join('');

File diff suppressed because one or more lines are too long