Skip to content

Commit

Permalink
Fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Mar 11, 2024
1 parent 9fd4386 commit fc7e3cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tqdm_publisher/_demo/_client.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ <h1>tqdm_progress</h1>
onopen: () => console.log('Connected'),
onclose: () => console.log('Disconnected'),
onmessage: (data) => {
const { id, payload } = JSON.parse(event.data);
console.log(id, payload, bars[id]);
bars[id].style.width = 100 * (payload.n / payload.total) + '%';
const { progress_bar_id, format_dict } = JSON.parse(event.data);
bars[progress_bar_id].style.width = 100 * (format_dict.n / format_dict.total) + '%';
}
});

Expand Down

0 comments on commit fc7e3cf

Please sign in to comment.