Merge pull request #120 from pattern-x/feature/fix-hotpoint

Fix a bug that it cannot add hotpoint successfully
This commit is contained in:
poi
2024-02-06 17:44:43 +08:00
committed by GitHub

View File

@ -174,7 +174,7 @@
}
// create hotpoint...
if (addingHotpoint && target instanceof HTMLCanvasElement) {
if (addingHotpoint && (target instanceof HTMLCanvasElement || target.classList.contains("css2d-renderer"))) {
const location = viewer.getHitResult(event);
if (!location) {
return;