Fix a bug that it cannot add hotpoint successfully

This commit is contained in:
yanzexuan
2023-11-11 13:30:09 +08:00
parent db14654b49
commit 167be2859a

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;