diff --git a/src/utils/ProfileTool.js b/src/utils/ProfileTool.js index 893653bd..6e4febdb 100644 --- a/src/utils/ProfileTool.js +++ b/src/utils/ProfileTool.js @@ -217,11 +217,15 @@ Potree.ProfileTool = function(scene, camera, renderer){ this.setWidth = function(width){ this.width = width; + + this.update(); }; this.update = function(){ - if(this.points.length === 1){ + if(this.points.length === 0){ + return; + }else if(this.points.length === 1){ var point = this.points[0]; this.spheres[0].position.copy(point);