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

Commit

Permalink
HARP-11247: Declare the automatic properties of the fill technique.
Browse files Browse the repository at this point in the history
This change tags the fill-material attributes that are
kept in sync with their technique value.

Signed-off-by: Roberto Raggi <roberto.raggi@here.com>
  • Loading branch information
robertoraggi committed Sep 15, 2020
1 parent 7311de1 commit a0beb96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
12 changes: 6 additions & 6 deletions @here/harp-datasource-protocol/lib/TechniqueDescriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ const lineMarkerTechniquePropTypes = mergeTechniqueDescriptor<LineMarkerTechniqu

const polygonalTechniqueDescriptor: TechniqueDescriptor<PolygonalTechniqueParams> = {
attrDescriptors: {
polygonOffset: AttrScope.TechniqueRendering,
polygonOffsetFactor: AttrScope.TechniqueRendering,
polygonOffsetUnits: AttrScope.TechniqueRendering,
polygonOffset: { scope: AttrScope.TechniqueRendering, automatic: true },
polygonOffsetFactor: { scope: AttrScope.TechniqueRendering, automatic: true },
polygonOffsetUnits: { scope: AttrScope.TechniqueRendering, automatic: true },
lineColor: AttrScope.TechniqueRendering,
lineFadeFar: AttrScope.TechniqueRendering,
lineFadeNear: AttrScope.TechniqueRendering
Expand Down Expand Up @@ -221,9 +221,9 @@ const fillTechniqueDescriptor = mergeTechniqueDescriptor<FillTechnique>(
polygonalTechniqueDescriptor,
{
attrDescriptors: {
color: AttrScope.TechniqueRendering,
opacity: AttrScope.TechniqueRendering,
transparent: AttrScope.TechniqueRendering,
color: { scope: AttrScope.TechniqueRendering, automatic: true },
opacity: { scope: AttrScope.TechniqueRendering, automatic: true },
transparent: { scope: AttrScope.TechniqueRendering, automatic: true },
lineWidth: AttrScope.TechniqueRendering
}
}
Expand Down
10 changes: 1 addition & 9 deletions @here/harp-mapview/lib/DecodedTileHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,7 @@ function getMainMaterialStyledProps(technique: Technique): StyledProperties {
return baseProps;
}
case "fill":
return pick(technique, [
"color",
"transparent",
"opacity",
"polygonOffset",
"polygonOffsetFactor",
"polygonOffsetUnits",
...automaticAttributes
]);
return pick(technique, automaticAttributes);
case "standard":
case "terrain":
case "extruded-polygon": {
Expand Down

0 comments on commit a0beb96

Please sign in to comment.