Skip to content

Commit

Permalink
Merge pull request #14 from bramgg/resize
Browse files Browse the repository at this point in the history
scale bar with browser resize
  • Loading branch information
afshinm committed Jul 22, 2014
2 parents 361b032 + e76e0a9 commit 9727db6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@
//set progress bar container size and offset
progressElementContainer.style.left = targetElementOffset.left + 'px';
progressElementContainer.style.top = targetElementOffset.top + 'px';
progressElementContainer.style.width = targetElementOffset.width + 'px';
//if targetElement is body set to percent so it scales with browser resize
if (targetElement.nodeName == 'BODY') {
progressElementContainer.style.width = '100%';
} else {
progressElementContainer.style.width = targetElementOffset.width + 'px';
}

if (this._options.overlayMode) {
progressElementContainer.style.height = targetElementOffset.height + 'px';
Expand Down

0 comments on commit 9727db6

Please sign in to comment.