From 5d2b6902f64c04bd44e2ade8bf7244d8181bb19d Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Tue, 26 Feb 2019 16:40:15 +0800 Subject: [PATCH] fix(pick): event --- src/core/engine/picking/picking.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/engine/picking/picking.js b/src/core/engine/picking/picking.js index e4fb4c2ee1..24790e82a1 100755 --- a/src/core/engine/picking/picking.js +++ b/src/core/engine/picking/picking.js @@ -42,7 +42,7 @@ class Picking { // this._world._container.addEventListener('mousemove', this._onWorldMove.bind(this), false); } pickdata(event) { - const point = { x: event.clientX, y: event.clientY, type: event.type }; + const point = { x: event.offsetX, y: event.offsetY, type: event.type }; const normalisedPoint = { x: 0, y: 0 }; normalisedPoint.x = (point.x / this._width) * 2 - 1; normalisedPoint.y = -(point.y / this._height) * 2 + 1;