Skip to content

Commit

Permalink
#219 bugfix: meter should not initialise at 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
justparking authored Jul 4, 2022
1 parent a35d08c commit 2466963
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nodel-webui-js/src/nodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ var updatemeter = function(el, val) {
var pxheight = $(el).data('pxheight');
if(!pxheight) {
var pxheight = $(el).find('.bar').height() / 100;
if (pxheight === 0) {
// The parent or this may be invisible.
// https://stackoverflow.com/questions/9292529/jquery-height-returns-0-on-a-visible-div-why
return;
}
$(el).data('pxheight', pxheight);
}
var width = $(el).data('width');
Expand Down

0 comments on commit 2466963

Please sign in to comment.