Skip to content

Commit

Permalink
do not interpolate between identical range
Browse files Browse the repository at this point in the history
simplify
  • Loading branch information
thomasneirynck committed Jun 5, 2020
1 parent ade2f03 commit 004d4ff
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export class DynamicSizeProperty extends DynamicStyleProperty {

_getMbDataDrivenSize({ targetName, minSize, maxSize, minValue, maxValue }) {
const lookup = this.supportsMbFeatureState() ? 'feature-state' : 'get';

const stops =
minValue === maxValue ? [minValue, minSize] : [minValue, minSize, maxValue, maxSize];
return [
'interpolate',
['linear'],
Expand All @@ -120,10 +123,7 @@ export class DynamicSizeProperty extends DynamicStyleProperty {
fieldName: targetName,
fallback: 0,
}),
minValue,
minSize,
maxValue,
maxSize,
...stops,
];
}

Expand Down

0 comments on commit 004d4ff

Please sign in to comment.