Skip to content

Commit

Permalink
prevent some flashing while data loads
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Mar 15, 2015
1 parent c54a322 commit 45f4979
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions static/css/main.css
Expand Up @@ -118,6 +118,11 @@ span.pill label {
font-size: 20px;
line-height: 30px;
}

.loading #lastEntry {
display: none;
}

#lastEntry {
background: #808080;
border-color: #808080;
Expand Down Expand Up @@ -249,6 +254,10 @@ div.tooltip {
display: none;
}

.loading .focus-range {
display: none;
}

.focus-range {
list-style: none;
margin: 4px;
Expand Down
2 changes: 1 addition & 1 deletion static/index.html
Expand Up @@ -24,7 +24,7 @@ <h1 class="customTitle">Nightscout</h1>
<a href="#"><span></span><i class="icon-cancel-circled"></i></a>
</div>

<div class="container" id="container">
<div class="container loading" id="container">
<div class="status">
<div class="bgStatus current">
<div class="bgButton ">
Expand Down
4 changes: 4 additions & 0 deletions static/js/client.js
Expand Up @@ -973,6 +973,10 @@ var app = {}, browserSettings = {}, browserStorage = $.localStorage;
// update x axis domain
context.select('.x')
.call(xAxis2);

if (init) {
$('.container').removeClass('loading');
}
}

function sgvToColor(sgv) {
Expand Down

0 comments on commit 45f4979

Please sign in to comment.