diff --git a/public/demo/dxf_6.html b/public/demo/dxf_6.html index 8f5ee08..144df0d 100644 --- a/public/demo/dxf_6.html +++ b/public/demo/dxf_6.html @@ -207,14 +207,14 @@ // create hotpoint... if (addingHotpoint && target instanceof HTMLCanvasElement) { - const result = viewer.getHitResult(event); - if (!result || !result.location) { + const location = viewer.getHitResult(event); + if (!location) { return; } const hotpointId = `hotpoint_${hotpointCount}`; const hotpoint = { hotpointId, - anchorPosition: [result.location[0], result.location[1]], + anchorPosition: [location.x, location.y], visible: true, html: `