From 3c61caff013b4292e75d7b638b0dd733d2cb2f3c Mon Sep 17 00:00:00 2001 From: keiya sasaki Date: Thu, 9 Mar 2023 10:16:17 +0900 Subject: [PATCH] fix: condition for CZML on reearth/core (#524) --- src/core/engines/Cesium/Feature/Resource/utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/engines/Cesium/Feature/Resource/utils.ts b/src/core/engines/Cesium/Feature/Resource/utils.ts index 68d45d5f75..d8c4e0b908 100644 --- a/src/core/engines/Cesium/Feature/Resource/utils.ts +++ b/src/core/engines/Cesium/Feature/Resource/utils.ts @@ -73,7 +73,10 @@ export function attachProperties< const appearanceKeyName = appearancePropertyKey.name; const appearanceKeyType = appearancePropertyKey.type as AppearancePropertyKeyType; - let value = (computedFeature?.[appearanceName] as any)?.[appearanceKeyName]; + let value = + appearancePropertyKey.override ?? + (computedFeature?.[appearanceName] as any)?.[appearanceKeyName] ?? + appearancePropertyKey.default; switch (appearanceKeyType) { case "color": value = toColor(value); @@ -86,10 +89,7 @@ export function attachProperties< } (entity[propertyName] as any)[entityPropertyKey] = - appearancePropertyKey.override ?? - value ?? - appearancePropertyKey.default ?? - (property as any)[entityPropertyKey]; + value ?? (property as any)[entityPropertyKey]; }); }