Skip to content

Commit

Permalink
Update progress-bar.html
Browse files Browse the repository at this point in the history
  • Loading branch information
thijnmens authored Jun 14, 2022
1 parent dc7a3cd commit 4265e1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Examples/Library/progress-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@

// progress-bar-update
let maxPercent = 0;

socket.addEventListener('message', (event) => {
const jsonData = JSON.parse(event.data);




if (jsonData.type === 'update') {
document.getElementById('progress-bar').style = `width: ${jsonData.data.percentComplete*100}%`;
if (jsonData.data.percentComplete > maxPercent) {
Expand Down

0 comments on commit 4265e1e

Please sign in to comment.