Fix measure tool with lines.
This commit is contained in:
parent
bd34c2a408
commit
82c5d01a43
@ -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 ();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user