Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
feat: fix layer(marker) extrdue line disapear (#330)
Browse files Browse the repository at this point in the history
memo the material color
  • Loading branch information
lavalse committed Oct 14, 2022
1 parent 6255ad2 commit 7c304f0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,17 @@ const Marker: React.FC<PrimitiveProps<Property>> = ({ layer }) => {
attachTag(ep.current?.cesiumElement, unselectableTag, true);
}, [pos, isVisible, extrudePoints]);

const extrudePointsLineColor = useMemo(() => {
return Color.WHITE.withAlpha(0.4);
}, []);

return !pos || !isVisible ? null : (
<>
{extrudePoints && (
<Entity ref={ep}>
<PolylineGraphics
positions={extrudePoints}
material={Color.WHITE.withAlpha(0.4)}
material={extrudePointsLineColor}
width={0.5}
/>
</Entity>
Expand Down

0 comments on commit 7c304f0

Please sign in to comment.