refactor: enhance wiki navigation, add view mode toggle, and improve map sync preview logic

(important global check)
This commit is contained in:
taDuc
2026-05-26 03:14:14 +07:00
parent 8306543828
commit 9d04076921
9 changed files with 570 additions and 69 deletions
+4 -3
View File
@@ -140,7 +140,8 @@ export function getSelectableLayers(map: maplibregl.Map): string[] {
export function filterDraftByBinding(
fc: FeatureCollection,
selectedFeatureIds: (string | number)[],
highlightFeatures?: FeatureCollection | null
highlightFeatures?: FeatureCollection | null,
isPreviewMode?: boolean
): FeatureCollection {
const selectedIds = new Set(selectedFeatureIds.map(String));
if (highlightFeatures?.features) {
@@ -185,8 +186,8 @@ export function filterDraftByBinding(
const featureId = String(feature.properties.id);
const parentId = featureParentMap.get(featureId);
// 1. If this feature is a parent and its hierarchy is active, hide it
if (activeParents.has(featureId)) {
// 1. If this feature is a parent and its hierarchy is active, hide it (only in preview/replay modes)
if (isPreviewMode && activeParents.has(featureId)) {
return false;
}