fix(pick): event

This commit is contained in:
thinkinggis 2019-02-26 16:40:15 +08:00
parent d36cece869
commit 952e03aeb1
1 changed files with 1 additions and 1 deletions

View File

@ -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;