Skip to content

Commit

Permalink
fix: use proper click event position translation and bump to 4.21.3 (#…
Browse files Browse the repository at this point in the history
…4896)

* fix: use proper click event position translation

* fix: 🙈

* chore: bump to 4.21.3
  • Loading branch information
haakonflatval-cognite authored Nov 25, 2024
1 parent 837bcf3 commit 99efa24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cognite/reveal",
"version": "4.21.2",
"version": "4.21.3",
"description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
"homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion viewer/packages/api/src/public/migration/Cognite3DViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,10 @@ export class Cognite3DViewer<DataSourceT extends DataSourceType = ClassicDataSou
if (this._image360ApiHelper === undefined) {
return false;
}
return this._image360ApiHelper.onClick({ offsetX: event.offsetX, offsetY: event.offsetY });

const position = this.getPixelCoordinatesFromEvent(event);

return this._image360ApiHelper.onClick({ offsetX: position.x, offsetY: position.y });
}

/**
Expand Down

0 comments on commit 99efa24

Please sign in to comment.