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

Commit

Permalink
HARP-11250: Optional when conditions.
Browse files Browse the repository at this point in the history
Changed the type of the `when` condition to be an optional
style expression. This change is required to support style
extensions. That is, a common use case of style extensions
is to reference an existing style already having a `when`
condition and set additional properties.

Signed-off-by: Roberto Raggi <roberto.raggi@here.com>
  • Loading branch information
robertoraggi committed Aug 3, 2020
1 parent cc90020 commit 240cdd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion @here/harp-datasource-protocol/lib/StyleSetEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ interface StyleInternalParams {
type InternalStyle = Style & StyleInternalParams;

/**
* [[StyleConditionClassifier]] searches for usages of `$layer` in `when` conditions
* `StyleConditionClassifier` searches for usages of `$layer` in `when` conditions
* associated with styling rules.
*
* @hidden
Expand Down
2 changes: 1 addition & 1 deletion @here/harp-datasource-protocol/lib/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export interface StyleAttributes<Technique, Params> {
* Condition that is applied to feature properties to check if given {@link Style} this feature
* should emit geometry of this style.
*/
when: string | JsonExpr;
when?: string | JsonExpr;

/**
* The layer containing the carto features processed by this style rule.
Expand Down

0 comments on commit 240cdd9

Please sign in to comment.