Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
igorDykhta committed May 12, 2021
1 parent 5384051 commit c0b8792
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/layers/aggregation-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class AggregationLayer extends Layer {
'coverage',
'elevationPercentile',
'elevationScale',
'enableElevationZoomFactor' // ! ??????????????/
'enableElevationZoomFactor'
];
}

Expand Down
7 changes: 3 additions & 4 deletions src/layers/base-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,9 @@ class Layer {
* @returns {number}
*/
getElevationZoomFactor({zoom, zoomOffset = 0}) {
if (!this.config.visConfig.enableElevationZoomFactor) {
return 1;
}
return Math.pow(2, Math.max(8 - zoom + zoomOffset, 0));
return this.config.visConfig.enableElevationZoomFactor
? Math.pow(2, Math.max(8 - zoom + zoomOffset, 0))
: 1;
}

formatLayerData(datasets, filteredIndex) {
Expand Down

0 comments on commit c0b8792

Please sign in to comment.