From 76bc058602f6559983d70de6f904a32f05711734 Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Wed, 4 Sep 2024 18:12:09 -0700 Subject: [PATCH] bug fix --- modules/aggregation-layers/src/contour-layer/contour-layer.ts | 4 ++-- modules/aggregation-layers/src/grid-layer/grid-layer.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/aggregation-layers/src/contour-layer/contour-layer.ts b/modules/aggregation-layers/src/contour-layer/contour-layer.ts index 08c817de928..e6a0de31d57 100644 --- a/modules/aggregation-layers/src/contour-layer/contour-layer.ts +++ b/modules/aggregation-layers/src/contour-layer/contour-layer.ts @@ -274,8 +274,8 @@ export default class GridLayer extends getBinId: (p: number[]) => { const positionCommon = viewport.projectFlat(p); return [ - (positionCommon[0] - cellOriginCommon[0]) / cellSizeCommon[0], - (positionCommon[1] - cellOriginCommon[1]) / cellSizeCommon[1] + Math.floor((positionCommon[0] - cellOriginCommon[0]) / cellSizeCommon[0]), + Math.floor((positionCommon[1] - cellOriginCommon[1]) / cellSizeCommon[1]) ]; } }); diff --git a/modules/aggregation-layers/src/grid-layer/grid-layer.ts b/modules/aggregation-layers/src/grid-layer/grid-layer.ts index 668d8ac005e..a23dcdd0d93 100644 --- a/modules/aggregation-layers/src/grid-layer/grid-layer.ts +++ b/modules/aggregation-layers/src/grid-layer/grid-layer.ts @@ -477,8 +477,8 @@ export default class GridLayer extends getBinId: (p: number[]) => { const positionCommon = viewport.projectFlat(p); return [ - (positionCommon[0] - cellOriginCommon[0]) / cellSizeCommon[0], - (positionCommon[1] - cellOriginCommon[1]) / cellSizeCommon[1] + Math.floor((positionCommon[0] - cellOriginCommon[0]) / cellSizeCommon[0]), + Math.floor((positionCommon[1] - cellOriginCommon[1]) / cellSizeCommon[1]) ]; } });