From 457eee4ffa6787979b19469d8b2e28fd847d8e3d Mon Sep 17 00:00:00 2001 From: bokhonglo Date: Thu, 21 May 2026 16:46:43 +0700 Subject: [PATCH] fix: update DRAFT_ENTITY_EXPR to exclude features with bindings --- src/uhm/lib/map/styles/shared/styleBuilders.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uhm/lib/map/styles/shared/styleBuilders.ts b/src/uhm/lib/map/styles/shared/styleBuilders.ts index a9cb22a..112459c 100644 --- a/src/uhm/lib/map/styles/shared/styleBuilders.ts +++ b/src/uhm/lib/map/styles/shared/styleBuilders.ts @@ -1,7 +1,11 @@ import maplibregl, { LayerSpecification } from "maplibre-gl"; const TYPE_MATCH_EXPR: maplibregl.ExpressionSpecification = ["coalesce", ["get", "type"], ["get", "entity_type_id"], ""]; -const DRAFT_ENTITY_EXPR: maplibregl.ExpressionSpecification = ["==", ["coalesce", ["get", "entity_id"], ""], ""]; +const DRAFT_ENTITY_EXPR: maplibregl.ExpressionSpecification = [ + "all", + ["==", ["coalesce", ["get", "entity_id"], ""], ""], + ["!", ["has", "binding"]] +]; const SELECTED_EXPR: maplibregl.ExpressionSpecification = ["boolean", ["feature-state", "selected"], false]; const SELECTED_COLOR = "#22c55e";