fixing stuff and improving behaviour
This commit is contained in:
parent
acc9ca0cf9
commit
aef2bfd359
@ -52,7 +52,7 @@
|
||||
"profile": {
|
||||
"nb_points": "Point number",
|
||||
"title": "Height profile",
|
||||
"save": "Save"
|
||||
"save_las": "Save as LAS"
|
||||
},
|
||||
"scene": {
|
||||
"camera_position": "Camera Position",
|
||||
|
||||
@ -18,9 +18,11 @@
|
||||
</span>-->
|
||||
<span style="flex-grow: 1;"></span>
|
||||
<span>
|
||||
|
||||
<a id="potree_download_profile_link" href="#" download="profile.las">
|
||||
<input id="potree_download_profile_button" type="button" data-i18n="[value]profile.save">
|
||||
<input id="potree_download_profile_button" type="button" data-i18n="[value]profile.save_las">
|
||||
</a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -67,7 +69,7 @@
|
||||
<script>
|
||||
|
||||
$('#potree_download_profile_button').click(function(){
|
||||
var las = viewer._2dprofile.getLAS();
|
||||
var las = viewer._2dprofile.getPointsInProfileAsLas();
|
||||
var u8view = new Uint8Array(las);
|
||||
|
||||
var binString = "";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -873,7 +873,7 @@ function initMeasurementDetails(){
|
||||
|
||||
document.getElementById("measurement_details").appendChild(elLi);
|
||||
|
||||
var widthListener;
|
||||
let widthListener = null;
|
||||
var updateDisplay = function(event){
|
||||
|
||||
$(elPanelBody).empty();
|
||||
@ -900,11 +900,13 @@ function initMeasurementDetails(){
|
||||
elWidthLabel.html("-");
|
||||
}
|
||||
|
||||
widthListener = function(event){
|
||||
var val = Math.pow((event.width / 1000), 1/4);
|
||||
elWidthLabel.html(Potree.utils.addCommas(event.width.toFixed(3)));
|
||||
elWidthSlider.slider({value: val});
|
||||
};
|
||||
if(widthListener === null){
|
||||
widthListener = function(event){
|
||||
var val = Math.pow((event.width / 1000), 1/4);
|
||||
elWidthLabel.html(Potree.utils.addCommas(event.width.toFixed(3)));
|
||||
elWidthSlider.slider({value: val});
|
||||
};
|
||||
}
|
||||
if(!measurement.hasEventListener("width_changed", widthListener)){
|
||||
measurement.addEventListener("width_changed", widthListener);
|
||||
}
|
||||
|
||||
@ -1434,14 +1434,16 @@ Potree.Viewer = class{
|
||||
$(function() {
|
||||
initSidebar();
|
||||
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
let elProfile = $('<div>').load(new URL(Potree.scriptPath + "/profile.html").href, () => {
|
||||
$('#potree_render_area').append(elProfile.children());
|
||||
this._2dprofile = new Potree.Viewer.Profile(this, document.getElementById("profile_draw_container"));
|
||||
|
||||
if(callback){
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user