Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very unresponsive/glitchy when updating every second #46

Open
HeCorr opened this issue Feb 15, 2022 · 0 comments
Open

Very unresponsive/glitchy when updating every second #46

HeCorr opened this issue Feb 15, 2022 · 0 comments

Comments

@HeCorr
Copy link

HeCorr commented Feb 15, 2022

I'm receiving value updates from a websocket connection every second and the bar does not update consistently at all:

2022-02-15.18-37-57.mp4

And when I disable animations, the value is completely incorrect:

2022-02-15.18-39-49.mp4

Relevant code:

var thingy = new ldBar("#thing");
ws = new WebSocket("ws://localhost:4000/ws/metrics")

ws.onopen = function() {
    console.log('WS Connected')
}

ws.onmessage = function(evt) {
    console.log('WS Message:',evt.data)
    thingy.set(evt.data)
}
<div
    id="thing"
    data-preset="fan"
    class="ldBar label-center"
    data-value="0"
    data-min="0"
    data-max="1000"
></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant