Fix measure tool with lines.
This commit is contained in:
parent
bd34c2a408
commit
82c5d01a43
@ -136,7 +136,7 @@ export class MeasureTool
|
|||||||
Click (mouseCoordinates)
|
Click (mouseCoordinates)
|
||||||
{
|
{
|
||||||
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
|
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
|
||||||
if (intersection === null) {
|
if (intersection === null || !intersection.object.isMesh) {
|
||||||
this.ClearMarkers ();
|
this.ClearMarkers ();
|
||||||
this.UpdatePanel ();
|
this.UpdatePanel ();
|
||||||
return;
|
return;
|
||||||
@ -153,7 +153,7 @@ export class MeasureTool
|
|||||||
MouseMove (mouseCoordinates)
|
MouseMove (mouseCoordinates)
|
||||||
{
|
{
|
||||||
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
|
let intersection = this.viewer.GetMeshIntersectionUnderMouse (mouseCoordinates);
|
||||||
if (intersection === null) {
|
if (intersection === null || !intersection.object.isMesh) {
|
||||||
if (this.tempMarker !== null) {
|
if (this.tempMarker !== null) {
|
||||||
this.tempMarker.Show (false);
|
this.tempMarker.Show (false);
|
||||||
this.viewer.Render ();
|
this.viewer.Render ();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user