Skip to content

Commit b2a45fc

Browse files
Fix ScreenGridLayer picking error w/ cpu aggregation (visgl#5710)
1 parent c912123 commit b2a45fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ export default class ScreenGridLayer extends GridAggregationLayer {
134134
getPickingInfo({info, mode}) {
135135
const {index} = info;
136136
if (index >= 0) {
137-
const {gpuGridAggregator} = this.state;
137+
const {gpuGridAggregator, gpuAggregation, weights} = this.state;
138138
// Get count aggregation results
139-
const aggregationResults = gpuGridAggregator.getData('count');
139+
const aggregationResults = gpuAggregation
140+
? gpuGridAggregator.getData('count')
141+
: weights.count;
140142

141143
// Each instance (one cell) is aggregated into single pixel,
142144
// Get current instance's aggregation details.

0 commit comments

Comments
 (0)