diff --git a/src/utils/ProfileTool.js b/src/utils/ProfileTool.js index c3f45ff6..c5605bf2 100644 --- a/src/utils/ProfileTool.js +++ b/src/utils/ProfileTool.js @@ -381,7 +381,7 @@ Potree.ProfileTool = function(scene, camera, renderer){ var pos = I.clone(); if(scope.activeProfile.points.length === 1 && scope.activeProfile.width === null){ - scope.activeProfile.setWidth((camera.position.distanceTo(pos) / 50).toFixed(3)); + scope.activeProfile.setWidth((camera.position.distanceTo(pos) / 50)); } scope.activeProfile.addMarker(pos); diff --git a/src/viewer/sidebar.html b/src/viewer/sidebar.html index 38c85ef2..a3e2a196 100644 --- a/src/viewer/sidebar.html +++ b/src/viewer/sidebar.html @@ -583,22 +583,24 @@ function initMeasurementDetails(){ var elWidthSlider = $('
'); elWidthSlider.slider({ - value: Math.pow((profile.getWidth() / 1000), 1/4).toFixed(2), + value: Math.pow((profile.getWidth() / 1000), 1/4).toFixed(3), min: 0, max: 1, step: 0.01, slide: function(event, ui){ var val = Math.pow(ui.value, 4) * 1000; - val = val.toFixed(2); profile.setWidth(val); } }); - elWidthLabel.html(Potree.utils.addCommas(profile.getWidth())); + if(profile.getWidth()){ + elWidthLabel.html(Potree.utils.addCommas(profile.getWidth().toFixed(3))); + }else{ + elWidthLabel.html("-"); + } widthListener = function(event){ var val = Math.pow((event.width / 1000), 1/4); - val = val.toFixed(2); - elWidthLabel.html(Potree.utils.addCommas(event.width)); + elWidthLabel.html(Potree.utils.addCommas(event.width.toFixed(3))); elWidthSlider.slider({value: val}); }; profile.addEventListener("width_changed", widthListener); diff --git a/src/viewer/viewer.css b/src/viewer/viewer.css index b1099123..2f28256e 100644 --- a/src/viewer/viewer.css +++ b/src/viewer/viewer.css @@ -167,8 +167,18 @@ - - +/* no scrollbar styling in firefox, sadly */ +.navmenu::-webkit-scrollbar{ + height: 12px; +} + +.navmenu::-webkit-scrollbar-track{ + background: rgba(0, 0, 0, 0.1); +} + +.navmenu::-webkit-scrollbar-thumb{ + background: rgba(0, 0, 0, 0.5); +}