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