Skip to content

Commit

Permalink
Fix ScreenGridLayer picking error w/ cpu aggregation (visgl#5710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress authored May 3, 2021
1 parent c912123 commit b2a45fc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ export default class ScreenGridLayer extends GridAggregationLayer {
getPickingInfo({info, mode}) {
const {index} = info;
if (index >= 0) {
const {gpuGridAggregator} = this.state;
const {gpuGridAggregator, gpuAggregation, weights} = this.state;
// Get count aggregation results
const aggregationResults = gpuGridAggregator.getData('count');
const aggregationResults = gpuAggregation
? gpuGridAggregator.getData('count')
: weights.count;

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

0 comments on commit b2a45fc

Please sign in to comment.