Skip to content

Commit

Permalink
fix height of mysolarpv app
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Apr 8, 2020
1 parent 0884268 commit f3bbb29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/OpenEnergyMonitor/graph-nav.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div id="graph-nav" class="visnavblock mb-2 d-flex justify-content-start d-flex justify-content-stretch btn-group">
<button class='visnav time btn btn-inverse btn-link btn-large py-1 px-2' time='1'>1<?php echo _('h') ?></button>
<button class='visnav time btn btn-inverse btn-link btn-large py-1 px-2' time='3'>3<?php echo _('h') ?></button>
<button class='visnav time btn btn-inverse btn-link btn-large py-1 px-2' time='6'>6<?php echo _('h') ?></button>
<button class='visnav time btn btn-inverse btn-link btn-large py-1 px-2' time='24'><?php echo _('D') ?></button>
Expand All @@ -9,4 +10,4 @@
<button id='zoomout' class='visnav btn btn-inverse btn-link btn-large py-1 px-2' >-</button>
<button id='left' class='visnav btn btn-inverse btn-link btn-large py-1 px-2' >&lt;</button>
<button id='right' class='visnav btn btn-inverse btn-link btn-large py-1 px-2' >&gt;</button>
</div>
</div>
2 changes: 2 additions & 0 deletions apps/OpenEnergyMonitor/mysolarpv/mysolarpv.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
/* set chart height to full screen height (100vh) minus an offset to cover the large value indicators and menus */
.chart-placeholder > * {
height: calc(100vh - var(--height-offset))!important;
min-height:180px;
}
</style>
<script type="text/javascript" src="<?php echo $path; ?>Modules/app/Lib/config.js?v=<?php echo $v; ?>"></script>
Expand Down Expand Up @@ -392,6 +393,7 @@ function resize()
var height = $(window).height()*0.55;

if (height>width) height = width;
if (height<180) height = 180;

if($('#app-block').is(":visible")) {
draw();
Expand Down

0 comments on commit f3bbb29

Please sign in to comment.