From cbcbd2518f88b62aabfc910def05c7d4a2d46c70 Mon Sep 17 00:00:00 2001 From: mschuetz Date: Sat, 7 Mar 2015 08:57:14 +0100 Subject: [PATCH] fixed finish tool bug; made profile setWidth() do updates automatically --- src/utils/ProfileTool.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);