84 lines
2.9 KiB
HTML
84 lines
2.9 KiB
HTML
<div id="profile_window" style="position: absolute; width: 100%; height: 30%; bottom: 0px; border: 1px solid black; display: none; box-sizing: border-box;">
|
|
|
|
<div id="profile_titlebar" class="pv-titlebar" style="display: flex; position: absolute; height: 30px; width: 100%; box-sizing: border-box;">
|
|
<span style="padding-right: 10px"><span data-i18n="profile.title"></span></span>
|
|
<span id="profileInfo" style="flex-grow: 1; flex-direction: row"> </span>
|
|
<span id="profile_toggle_size_button" class="ui-icon ui-icon-newwin profile-button"> </span>
|
|
<span id="closeProfileContainer" class="ui-icon ui-icon-close profile-button"> </span>
|
|
</div>
|
|
|
|
<div style="position: absolute; top: 30px; width: 100%; height: calc(100% - 30px); box-sizing: border-box;" class="pw_content">
|
|
|
|
<span class="pv-main-color" style="height: 100%; width: 100%; padding: 5px; display:flex; flex-direction: column; box-sizing: border-box;">
|
|
<div style=" width: 100%; color: #9d9d9d; margin: 5px; display: flex; flex-direction: row; box-sizing: border-box;">
|
|
<span data-i18n="profile.nb_points"></span>:
|
|
<span id="profile_num_points">-</span>
|
|
<!--<span id="profile_threshold" style="width: 300px">
|
|
Threshold: <span id="potree_profile_threshold_label">123</span> <div id="potree_profile_threshold_slider"></div>
|
|
</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">
|
|
</a>
|
|
</span>
|
|
</div>
|
|
|
|
<div id="profile_draw_container" style="
|
|
width: 100%;
|
|
flex-grow: 1;
|
|
position: relative; height: 100%;
|
|
box-sizing: border-box;">
|
|
<div style="
|
|
position: absolute;
|
|
left: 41px;
|
|
top: 0;
|
|
bottom: 20;
|
|
width: calc(100% - 41px);
|
|
height: calc(100% - 20px);
|
|
background-color: #000000;
|
|
"></div>
|
|
<svg id="profileSVG" style="
|
|
fill: #9d9d9d;
|
|
position: absolute;
|
|
left: 0; right: 0;
|
|
top: 0; bottom: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
"></svg>
|
|
<canvas id="profileCanvas" style="
|
|
position: absolute;
|
|
left: 41px;
|
|
top: 0;
|
|
bottom: 20;
|
|
width: calc(100% - 41px);
|
|
height: calc(100% - 20px);
|
|
/*background-color: #000000;*/
|
|
"></canvas>
|
|
<div id="profile_selection_marker" style="position: absolute; pointer-events:none;"></div>
|
|
|
|
</div>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
$('#potree_download_profile_button').click(function(){
|
|
var las = viewer._2dprofile.getLAS();
|
|
var u8view = new Uint8Array(las);
|
|
|
|
var binString = "";
|
|
for(var i = 0; i < u8view.length; i++){
|
|
binString += String.fromCharCode(u8view[i]);
|
|
}
|
|
|
|
var uri = "data:application/octet-stream;base64,"+btoa(binString);
|
|
$('#potree_download_profile_link').attr("href", uri);
|
|
//elDownloadProfileLink.href = uri;
|
|
|
|
});
|
|
|
|
</script> |