VivaGraphJS icon indicating copy to clipboard operation
VivaGraphJS copied to clipboard

Bug with links

Open garyanikin opened this issue 6 years ago • 0 comments
trafficstars

I'm trying to dynamically render new links with this code:

const renderLoop = setInterval(() => {
    renderer.pause();

    setTimeout(() => {
        // Render new transactions
        for (let i = 0; i < batch; i++) {
            const transaction = getTransaction()
            addLink(transaction.sender, transaction.recipient);
            if (currentTransaction < TRANSACTIONS.length) {
                nextTransaction()
            } else {
                clearInterval(renderLoop)
                return;
            }
        }
        renderer.resume();
    }, 0)
    
}, 2000)

And after a couple renders there appear a "ghost" links not connected to any node and with static positioning (they not animated like other nodes) Screenshot 2019-10-25 at 17 09 19

Please, help me to figure out why it can happens?

garyanikin avatar Oct 25 '19 14:10 garyanikin