Skip to content

Very unresponsive/glitchy when updating every second #46

Description

@HeCorr

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions