Skip to content

Commit

Permalink
The width of the progress loading bar is now calculated dynamically, …
Browse files Browse the repository at this point in the history
…depending on the width of the module.
  • Loading branch information
SeBuCX committed Feb 25, 2020
1 parent 26d05ec commit b17f3f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion MMM-RVV.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ Module.register("MMM-RVV", {
// Creates the loading bar animation wrapper
var divReloadWrapper = document.createElement("div");
divReloadWrapper.id = "divReloadWrapper";
divReloadWrapper.style.width = wrapper.width - 50;

// Creates the loading bar animation
var divReload = document.createElement("div");
Expand Down
8 changes: 7 additions & 1 deletion rvv.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@

.MMM-RVV #divReloadWrapper {
margin-bottom: 10px;
/* Use here the same value as 'width' property of child element #divReload */
margin-right: 50px;
}

.MMM-RVV #divReload {
/* Adjust this value to modify the progress bar. Take care on the wrapper margin! */
width: 50px;
/* Adjust this value to modify the progress bar */
height: 5px;
position: relative;
animation: mymove infinite;
/* This is the default duration. The 'real' duration is set on runtime */
animation-duration: 30s;
}

@keyframes mymove {
/* Runs from left to right of the #divReloadWrapper */
from {left: 0px;}
to {left: 83%;}
to {left: 100%;}
}

.MMM-RVV .rvvTripRow {
Expand Down

0 comments on commit b17f3f5

Please sign in to comment.