toggle profile size button

This commit is contained in:
mschuetz 2015-11-28 16:49:52 +01:00
parent 7a6144f666
commit b065ff4c24
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@
<div id="profile_titlebar" class="pv-titlebar" style="display: flex; position: absolute; height: 30px; width: 100%;">
<span style="padding-right: 10px">Height Profile</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>

View File

@ -9,6 +9,7 @@ Potree.Viewer.Profile = function(viewer, element){
this.requests = [];
this.pointsProcessed = 0;
this.margin = {top: 0, right: 0, bottom: 20, left: 40};
this.maximized = false;
$('#closeProfileContainer').click(function(){
@ -16,6 +17,16 @@ Potree.Viewer.Profile = function(viewer, element){
scope.enabled = false;
});
$('#profile_toggle_size_button').click(function(){
scope.maximized = !scope.maximized;
if(scope.maximized){
$('#profile_window').css("height", "100%");
}else{
$('#profile_window').css("height", "30%");
}
});
this.show = function(){
$('#profile_window').fadeIn();
scope.enabled = true;