Skip to content

Commit

Permalink
fix: condition for CZML on reearth/core (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya01 authored Mar 9, 2023
1 parent 67dccbd commit 3c61caf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/engines/Cesium/Feature/Resource/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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];
});
}

Expand Down

0 comments on commit 3c61caf

Please sign in to comment.