Separa le misure per ogni oggetto
This commit is contained in:
1 parent
49ed7d5f0e
commit
fc303e2555
6 files changed
+195
-12
No files matched your search
@@ -472,6 +472,7 @@
|
|||||||
private bool DrawToolsVisible { get; set; }
|
private bool DrawToolsVisible { get; set; }
|
||||||
private bool TrailEnabled { get; set; }
|
private bool TrailEnabled { get; set; }
|
||||||
private bool LayerPanelOpen { get; set; }
|
private bool LayerPanelOpen { get; set; }
|
||||||
|
private DotNetObjectReference<Home>? MapCallbackReference { get; set; }
|
||||||
private bool IncludeCadastralParcels { get; set; } = true;
|
private bool IncludeCadastralParcels { get; set; } = true;
|
||||||
private bool IncludeKmlSheetLayer { get; set; }
|
private bool IncludeKmlSheetLayer { get; set; }
|
||||||
private bool ShowImportedSheetLayer { get; set; }
|
private bool ShowImportedSheetLayer { get; set; }
|
||||||
@@ -570,7 +571,8 @@
|
|||||||
{
|
{
|
||||||
if (firstRender)
|
if (firstRender)
|
||||||
{
|
{
|
||||||
await JS.InvokeVoidAsync("lmeMap.init");
|
MapCallbackReference = DotNetObjectReference.Create(this);
|
||||||
|
await JS.InvokeVoidAsync("lmeMap.init", MapCallbackReference);
|
||||||
await ApplyFlagPreferencesToMapAsync();
|
await ApplyFlagPreferencesToMapAsync();
|
||||||
await CenterOnInitialLocationAsync();
|
await CenterOnInitialLocationAsync();
|
||||||
await MigrateLegacyProjectAsync();
|
await MigrateLegacyProjectAsync();
|
||||||
@@ -1047,6 +1049,21 @@
|
|||||||
await JS.InvokeVoidAsync("lmeMap.setDrawingMeasurementsVisible", ShowDrawingMeasurements);
|
await JS.InvokeVoidAsync("lmeMap.setDrawingMeasurementsVisible", ShowDrawingMeasurements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JSInvokable]
|
||||||
|
public Task SetMeasurementsFromLayerManager(string category, bool enabled)
|
||||||
|
{
|
||||||
|
if (category == "imported")
|
||||||
|
{
|
||||||
|
ShowImportedMeasurements = enabled;
|
||||||
|
}
|
||||||
|
else if (category == "drawings")
|
||||||
|
{
|
||||||
|
ShowDrawingMeasurements = enabled;
|
||||||
|
}
|
||||||
|
SaveFlagPreferences();
|
||||||
|
return InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task ToggleDrawTools()
|
private async Task ToggleDrawTools()
|
||||||
{
|
{
|
||||||
DrawToolsVisible = !DrawToolsVisible;
|
DrawToolsVisible = !DrawToolsVisible;
|
||||||
@@ -1503,6 +1520,7 @@
|
|||||||
LocationService.StopTracking();
|
LocationService.StopTracking();
|
||||||
GpsLookupCancellation?.Cancel();
|
GpsLookupCancellation?.Cancel();
|
||||||
GpsLookupCancellation?.Dispose();
|
GpsLookupCancellation?.Dispose();
|
||||||
|
MapCallbackReference?.Dispose();
|
||||||
return ValueTask.CompletedTask;
|
return ValueTask.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
<ApplicationId>com.companyname.lmemappecatastaliapp</ApplicationId>
|
<ApplicationId>com.companyname.lmemappecatastaliapp</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>0.2.21</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>0.2.22</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>25</ApplicationVersion>
|
<ApplicationVersion>26</ApplicationVersion>
|
||||||
|
|
||||||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
||||||
<WindowsPackageType>None</WindowsPackageType>
|
<WindowsPackageType>None</WindowsPackageType>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public sealed class AzureMapsService
|
|||||||
|
|
||||||
public AzureMapsService()
|
public AzureMapsService()
|
||||||
{
|
{
|
||||||
_httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.21");
|
_httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.22");
|
||||||
_httpClient.DefaultRequestHeaders.Accept.ParseAdd("application/json");
|
_httpClient.DefaultRequestHeaders.Accept.ParseAdd("application/json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public sealed class NetworkLocationService
|
|||||||
|
|
||||||
public NetworkLocationService()
|
public NetworkLocationService()
|
||||||
{
|
{
|
||||||
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.21");
|
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("LMEMappeCatastali/0.2.22");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<NetworkLocationSnapshot?> GetApproximateLocationAsync(
|
public async Task<NetworkLocationSnapshot?> GetApproximateLocationAsync(
|
||||||
|
|||||||
@@ -349,6 +349,27 @@ input[type="checkbox"] {
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.layer-manager-suboption {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 18px minmax(0, 1fr);
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
min-height: 30px;
|
||||||
|
color: var(--ink);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layer-manager-suboption input {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layer-manager-info {
|
||||||
|
display: grid;
|
||||||
|
gap: 2px;
|
||||||
|
padding: 3px 0 0 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.layer-manager-dragging {
|
.layer-manager-dragging {
|
||||||
opacity: 0.55;
|
opacity: 0.55;
|
||||||
outline: 2px solid #2563eb;
|
outline: 2px solid #2563eb;
|
||||||
|
|||||||
+151
-7
@@ -54,9 +54,12 @@ const lmeState = {
|
|||||||
managerOutsideSelectionBound: false,
|
managerOutsideSelectionBound: false,
|
||||||
managerHiddenObjects: new Map(),
|
managerHiddenObjects: new Map(),
|
||||||
managerHiddenObjectIds: new Set(),
|
managerHiddenObjectIds: new Set(),
|
||||||
|
managerHiddenMeasurementSummaryIds: new Set(),
|
||||||
|
managerHiddenMeasurementSideIds: new Set(),
|
||||||
managerHiddenCategories: new Set(),
|
managerHiddenCategories: new Set(),
|
||||||
managerObjectOrder: {},
|
managerObjectOrder: {},
|
||||||
managerExpandedRows: new Set()
|
managerExpandedRows: new Set(),
|
||||||
|
dotNetReference: null
|
||||||
};
|
};
|
||||||
|
|
||||||
// AdE publishes the cadastral WMS in ETRS89. WMS 1.1.1 keeps the longitude,
|
// AdE publishes the cadastral WMS in ETRS89. WMS 1.1.1 keeps the longitude,
|
||||||
@@ -109,7 +112,10 @@ window.lmeMap = {
|
|||||||
showInfo: setInfo
|
showInfo: setInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
function init() {
|
function init(dotNetReference) {
|
||||||
|
if (dotNetReference) {
|
||||||
|
lmeState.dotNetReference = dotNetReference;
|
||||||
|
}
|
||||||
if (lmeState.map) {
|
if (lmeState.map) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1285,13 +1291,115 @@ function renderLayerManagerObject(record, index) {
|
|||||||
highlightManagedObject(record);
|
highlightManagedObject(record);
|
||||||
});
|
});
|
||||||
const details = object.querySelector(".layer-manager-details");
|
const details = object.querySelector(".layer-manager-details");
|
||||||
|
details.appendChild(renderLayerManagerVisibilityOption(
|
||||||
|
geometryVisibilityLabel(record.layer),
|
||||||
|
visible,
|
||||||
|
checked => setManagedObjectVisible(record, checked, true)));
|
||||||
|
if (supportsManagedMeasurements(record)) {
|
||||||
|
managedMeasurementKinds(record).forEach(kind => {
|
||||||
|
const measurementsVisible = managedMeasurementsGloballyVisible(record.categoryKey)
|
||||||
|
&& !managedMeasurementHiddenSet(kind.key).has(record.id);
|
||||||
|
details.appendChild(renderLayerManagerVisibilityOption(
|
||||||
|
kind.label,
|
||||||
|
measurementsVisible,
|
||||||
|
checked => setManagedMeasurementKindVisible(record, kind.key, checked)));
|
||||||
|
});
|
||||||
|
}
|
||||||
const rows = managedObjectDetails(record.layer);
|
const rows = managedObjectDetails(record.layer);
|
||||||
details.innerHTML = rows.length
|
const info = document.createElement("div");
|
||||||
|
info.className = "layer-manager-info";
|
||||||
|
info.innerHTML = rows.length
|
||||||
? rows.map(value => `<span>${escapeHtml(value)}</span>`).join("")
|
? rows.map(value => `<span>${escapeHtml(value)}</span>`).join("")
|
||||||
: "<span>Nessuna misura disponibile</span>";
|
: "<span>Nessuna misura disponibile</span>";
|
||||||
|
details.appendChild(info);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderLayerManagerVisibilityOption(label, checked, onChange) {
|
||||||
|
const option = document.createElement("label");
|
||||||
|
option.className = "layer-manager-suboption";
|
||||||
|
option.innerHTML = `<input type="checkbox" ${checked ? "checked" : ""}><span>${escapeHtml(label)}</span>`;
|
||||||
|
const checkbox = option.querySelector("input");
|
||||||
|
checkbox.addEventListener("click", event => event.stopPropagation());
|
||||||
|
checkbox.addEventListener("change", () => onChange(checkbox.checked));
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
|
||||||
|
function geometryVisibilityLabel(layer) {
|
||||||
|
if (layer instanceof L.Polygon || layer instanceof L.Circle) {
|
||||||
|
return "Area/geometria sulla mappa";
|
||||||
|
}
|
||||||
|
if (layer instanceof L.Polyline) {
|
||||||
|
return "Linea sulla mappa";
|
||||||
|
}
|
||||||
|
return "Punto sulla mappa";
|
||||||
|
}
|
||||||
|
|
||||||
|
function supportsManagedMeasurements(record) {
|
||||||
|
return ["imported", "drawings"].includes(record.categoryKey)
|
||||||
|
&& (record.layer instanceof L.Circle
|
||||||
|
|| record.layer instanceof L.Polygon
|
||||||
|
|| record.layer instanceof L.Polyline);
|
||||||
|
}
|
||||||
|
|
||||||
|
function managedMeasurementsGloballyVisible(categoryKey) {
|
||||||
|
return categoryKey === "imported"
|
||||||
|
? lmeState.showImportedMeasurements
|
||||||
|
: lmeState.showDrawingMeasurements;
|
||||||
|
}
|
||||||
|
|
||||||
|
function managedMeasurementKinds(record) {
|
||||||
|
if (record.layer instanceof L.Polygon) {
|
||||||
|
return [
|
||||||
|
{ key: "summary", label: "Superficie e perimetro sulla mappa" },
|
||||||
|
{ key: "sides", label: "Misure dei lati sulla mappa" }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
if (record.layer instanceof L.Circle) {
|
||||||
|
return [{ key: "summary", label: "Superficie, raggio e circonferenza sulla mappa" }];
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
{ key: "summary", label: "Lunghezza totale sulla mappa" },
|
||||||
|
{ key: "sides", label: "Misure dei tratti sulla mappa" }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function managedMeasurementHiddenSet(kind) {
|
||||||
|
return kind === "sides"
|
||||||
|
? lmeState.managerHiddenMeasurementSideIds
|
||||||
|
: lmeState.managerHiddenMeasurementSummaryIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setManagedMeasurementKindVisible(record, kind, visible) {
|
||||||
|
const hiddenSet = managedMeasurementHiddenSet(kind);
|
||||||
|
if (visible) {
|
||||||
|
if (!managedMeasurementsGloballyVisible(record.categoryKey)) {
|
||||||
|
lmeState.managerRecords.forEach(candidate => {
|
||||||
|
if (candidate.categoryKey === record.categoryKey
|
||||||
|
&& supportsManagedMeasurements(candidate)) {
|
||||||
|
lmeState.managerHiddenMeasurementSummaryIds.add(candidate.id);
|
||||||
|
lmeState.managerHiddenMeasurementSideIds.add(candidate.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (record.categoryKey === "imported") {
|
||||||
|
lmeState.showImportedMeasurements = true;
|
||||||
|
} else {
|
||||||
|
lmeState.showDrawingMeasurements = true;
|
||||||
|
}
|
||||||
|
void lmeState.dotNetReference?.invokeMethodAsync(
|
||||||
|
"SetMeasurementsFromLayerManager",
|
||||||
|
record.categoryKey,
|
||||||
|
true);
|
||||||
|
}
|
||||||
|
hiddenSet.delete(record.id);
|
||||||
|
} else {
|
||||||
|
hiddenSet.add(record.id);
|
||||||
|
}
|
||||||
|
refreshImportedMeasurements();
|
||||||
|
refreshDrawingMeasurements();
|
||||||
|
refreshLayerManager();
|
||||||
|
}
|
||||||
|
|
||||||
function captureLayerManagerExpansion(container) {
|
function captureLayerManagerExpansion(container) {
|
||||||
container.querySelectorAll("details[data-expansion-key]").forEach(row => {
|
container.querySelectorAll("details[data-expansion-key]").forEach(row => {
|
||||||
if (row.open) {
|
if (row.open) {
|
||||||
@@ -1659,6 +1767,7 @@ function applyImportedSheetVisibility() {
|
|||||||
function setImportedMeasurementsVisible(enabled) {
|
function setImportedMeasurementsVisible(enabled) {
|
||||||
lmeState.showImportedMeasurements = Boolean(enabled);
|
lmeState.showImportedMeasurements = Boolean(enabled);
|
||||||
refreshImportedMeasurements();
|
refreshImportedMeasurements();
|
||||||
|
refreshLayerManager();
|
||||||
setInfo(lmeState.showImportedMeasurements
|
setInfo(lmeState.showImportedMeasurements
|
||||||
? "Misure dei file GIS visibili."
|
? "Misure dei file GIS visibili."
|
||||||
: "Misure dei file GIS nascoste.");
|
: "Misure dei file GIS nascoste.");
|
||||||
@@ -1667,6 +1776,7 @@ function setImportedMeasurementsVisible(enabled) {
|
|||||||
function setDrawingMeasurementsVisible(enabled) {
|
function setDrawingMeasurementsVisible(enabled) {
|
||||||
lmeState.showDrawingMeasurements = Boolean(enabled);
|
lmeState.showDrawingMeasurements = Boolean(enabled);
|
||||||
refreshDrawingMeasurements();
|
refreshDrawingMeasurements();
|
||||||
|
refreshLayerManager();
|
||||||
setInfo(lmeState.showDrawingMeasurements
|
setInfo(lmeState.showDrawingMeasurements
|
||||||
? "Misure dei disegni visibili."
|
? "Misure dei disegni visibili."
|
||||||
: "Misure dei disegni nascoste.");
|
: "Misure dei disegni nascoste.");
|
||||||
@@ -1936,15 +2046,27 @@ function renderMeasurements(sourceGroup, targetGroup, visible, sourceType) {
|
|||||||
sourceType
|
sourceType
|
||||||
};
|
};
|
||||||
visitMeasurableLayers(sourceGroup, layer => {
|
visitMeasurableLayers(sourceGroup, layer => {
|
||||||
|
const categoryKey = sourceType === "imported" ? "imported" : "drawings";
|
||||||
|
const objectId = managedLayerId(layer, categoryKey);
|
||||||
|
const showSummary = !lmeState.managerHiddenMeasurementSummaryIds.has(objectId);
|
||||||
|
const showSides = !lmeState.managerHiddenMeasurementSideIds.has(objectId);
|
||||||
|
if (!showSummary && !showSides) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (context.count >= context.max || !layerIsInView(layer, context.bounds)) {
|
if (context.count >= context.max || !layerIsInView(layer, context.bounds)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const layerContext = {
|
||||||
|
...context,
|
||||||
|
showSummary,
|
||||||
|
showSides: context.showSides && showSides
|
||||||
|
};
|
||||||
if (layer instanceof L.Circle) {
|
if (layer instanceof L.Circle) {
|
||||||
renderCircleMeasurement(layer, targetGroup, context);
|
renderCircleMeasurement(layer, targetGroup, layerContext);
|
||||||
} else if (layer instanceof L.Polygon) {
|
} else if (layer instanceof L.Polygon) {
|
||||||
renderPolygonMeasurement(layer, targetGroup, context);
|
renderPolygonMeasurement(layer, targetGroup, layerContext);
|
||||||
} else if (layer instanceof L.Polyline) {
|
} else if (layer instanceof L.Polyline) {
|
||||||
renderPolylineMeasurement(layer, targetGroup, context);
|
renderPolylineMeasurement(layer, targetGroup, layerContext);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1971,6 +2093,9 @@ function layerIsInView(layer, mapBounds) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderCircleMeasurement(layer, targetGroup, context) {
|
function renderCircleMeasurement(layer, targetGroup, context) {
|
||||||
|
if (!context.showSummary) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const radius = layer.getRadius();
|
const radius = layer.getRadius();
|
||||||
const area = Math.PI * radius * radius;
|
const area = Math.PI * radius * radius;
|
||||||
const circumference = 2 * Math.PI * radius;
|
const circumference = 2 * Math.PI * radius;
|
||||||
@@ -1999,6 +2124,7 @@ function renderPolygonMeasurement(layer, targetGroup, context) {
|
|||||||
const center = typeof layer.getCenter === "function"
|
const center = typeof layer.getCenter === "function"
|
||||||
? layer.getCenter()
|
? layer.getCenter()
|
||||||
: layer.getBounds().getCenter();
|
: layer.getBounds().getCenter();
|
||||||
|
if (context.showSummary) {
|
||||||
addMeasurementLabel(
|
addMeasurementLabel(
|
||||||
targetGroup,
|
targetGroup,
|
||||||
center,
|
center,
|
||||||
@@ -2006,6 +2132,7 @@ function renderPolygonMeasurement(layer, targetGroup, context) {
|
|||||||
"summary",
|
"summary",
|
||||||
context);
|
context);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function renderPolylineMeasurement(layer, targetGroup, context) {
|
function renderPolylineMeasurement(layer, targetGroup, context) {
|
||||||
const lines = lineLatLngGroups(layer.getLatLngs());
|
const lines = lineLatLngGroups(layer.getLatLngs());
|
||||||
@@ -2014,7 +2141,7 @@ function renderPolylineMeasurement(layer, targetGroup, context) {
|
|||||||
lines.forEach(line => addSegmentLabels(line, false, targetGroup, context));
|
lines.forEach(line => addSegmentLabels(line, false, targetGroup, context));
|
||||||
}
|
}
|
||||||
const longest = lines.reduce((current, line) => line.length > current.length ? line : current, []);
|
const longest = lines.reduce((current, line) => line.length > current.length ? line : current, []);
|
||||||
if (longest.length) {
|
if (context.showSummary && longest.length) {
|
||||||
addMeasurementLabel(
|
addMeasurementLabel(
|
||||||
targetGroup,
|
targetGroup,
|
||||||
longest[Math.floor(longest.length / 2)],
|
longest[Math.floor(longest.length / 2)],
|
||||||
@@ -2361,6 +2488,8 @@ function captureDisplayOptions() {
|
|||||||
layerOrder: [...lmeState.layerOrder],
|
layerOrder: [...lmeState.layerOrder],
|
||||||
layerObjectOrder: { ...lmeState.managerObjectOrder },
|
layerObjectOrder: { ...lmeState.managerObjectOrder },
|
||||||
hiddenLayerObjects: [...lmeState.managerHiddenObjectIds],
|
hiddenLayerObjects: [...lmeState.managerHiddenObjectIds],
|
||||||
|
hiddenLayerMeasurementSummaries: [...lmeState.managerHiddenMeasurementSummaryIds],
|
||||||
|
hiddenLayerMeasurementSides: [...lmeState.managerHiddenMeasurementSideIds],
|
||||||
hiddenLayerCategories: [...lmeState.managerHiddenCategories],
|
hiddenLayerCategories: [...lmeState.managerHiddenCategories],
|
||||||
trailEnabled: lmeState.gpsTrailEnabled
|
trailEnabled: lmeState.gpsTrailEnabled
|
||||||
};
|
};
|
||||||
@@ -2397,6 +2526,12 @@ function applyProjectDisplayOptions(options) {
|
|||||||
if (Array.isArray(options.hiddenLayerObjects)) {
|
if (Array.isArray(options.hiddenLayerObjects)) {
|
||||||
lmeState.managerHiddenObjectIds = new Set(options.hiddenLayerObjects);
|
lmeState.managerHiddenObjectIds = new Set(options.hiddenLayerObjects);
|
||||||
}
|
}
|
||||||
|
if (Array.isArray(options.hiddenLayerMeasurementSummaries)) {
|
||||||
|
lmeState.managerHiddenMeasurementSummaryIds = new Set(options.hiddenLayerMeasurementSummaries);
|
||||||
|
}
|
||||||
|
if (Array.isArray(options.hiddenLayerMeasurementSides)) {
|
||||||
|
lmeState.managerHiddenMeasurementSideIds = new Set(options.hiddenLayerMeasurementSides);
|
||||||
|
}
|
||||||
if (Array.isArray(options.hiddenLayerCategories)) {
|
if (Array.isArray(options.hiddenLayerCategories)) {
|
||||||
lmeState.managerHiddenCategories = new Set(options.hiddenLayerCategories);
|
lmeState.managerHiddenCategories = new Set(options.hiddenLayerCategories);
|
||||||
}
|
}
|
||||||
@@ -2480,12 +2615,21 @@ function managedGroupGeoJson(group, categoryKey) {
|
|||||||
function resetLayerManagerProjectState() {
|
function resetLayerManagerProjectState() {
|
||||||
lmeState.managerHiddenObjects.clear();
|
lmeState.managerHiddenObjects.clear();
|
||||||
lmeState.managerHiddenObjectIds.clear();
|
lmeState.managerHiddenObjectIds.clear();
|
||||||
|
lmeState.managerHiddenMeasurementSummaryIds.clear();
|
||||||
|
lmeState.managerHiddenMeasurementSideIds.clear();
|
||||||
lmeState.managerHiddenCategories.clear();
|
lmeState.managerHiddenCategories.clear();
|
||||||
lmeState.managerObjectOrder = {};
|
lmeState.managerObjectOrder = {};
|
||||||
clearManagerHighlight();
|
clearManagerHighlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearManagedCategoryState(categoryKey) {
|
function clearManagedCategoryState(categoryKey) {
|
||||||
|
const category = layerManagerCategories().find(item => item.key === categoryKey);
|
||||||
|
if (category) {
|
||||||
|
managedRecordsForCategory(category).forEach(record => {
|
||||||
|
lmeState.managerHiddenMeasurementSummaryIds.delete(record.id);
|
||||||
|
lmeState.managerHiddenMeasurementSideIds.delete(record.id);
|
||||||
|
});
|
||||||
|
}
|
||||||
[...lmeState.managerHiddenObjects.entries()].forEach(([id, record]) => {
|
[...lmeState.managerHiddenObjects.entries()].forEach(([id, record]) => {
|
||||||
if (record.categoryKey === categoryKey) {
|
if (record.categoryKey === categoryKey) {
|
||||||
lmeState.managerHiddenObjects.delete(id);
|
lmeState.managerHiddenObjects.delete(id);
|
||||||
|
|||||||
Reference in new issue
Block a user