Skip to content

Commit

Permalink
use model zoom on categorical/boolean snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
paulthatjazz committed Nov 24, 2023
1 parent 23fe973 commit a9ef149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/projects/analysis_panel_tools/subsection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function extentToChartData(colors: Color[] | undefined, model: BooleanTil

if (model instanceof CategoricalTileGrid) {

const area = getArea(fromExtent(tileGrid.getTileCoordExtent([20, x, y]))) / 1000000
const area = getArea(fromExtent(tileGrid.getTileCoordExtent([model.zoom, x, y]))) / 1000000

const value = model.labels.get(model.get(x, y)) ? model.labels.get(model.get(x, y)) : "No Data"
const count = counts.get(value) || 0
Expand All @@ -58,7 +58,7 @@ export function extentToChartData(colors: Color[] | undefined, model: BooleanTil

} else {

const area = model instanceof NumericTileGrid ? 1 : getArea(fromExtent(tileGrid.getTileCoordExtent([20, x, y]))) / 1000000
const area = model instanceof NumericTileGrid ? 1 : getArea(fromExtent(tileGrid.getTileCoordExtent([model.zoom, x, y]))) / 1000000
const value = model.get(x, y)


Expand Down

0 comments on commit a9ef149

Please sign in to comment.