Fix measure tool with lines.

This commit is contained in:
kovacsv 2023-10-23 18:17:07 +02:00
parent bd34c2a408
commit 82c5d01a43

View File

@ -136,7 +136,7 @@ export class MeasureTool
Click (mouseCoordinates)
{
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
if (intersection === null) {
if (intersection === null || !intersection.object.isMesh) {
this.ClearMarkers ();
this.UpdatePanel ();
return;
@ -153,7 +153,7 @@ export class MeasureTool
MouseMove (mouseCoordinates)
{
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
if (intersection === null) {
if (intersection === null || !intersection.object.isMesh) {
if (this.tempMarker !== null) {
this.tempMarker.Show (false);
this.viewer.Render ();