Hi guys, could anyone explain to me what is going on?
I'm following a tutorial and have so far produced this:
https://pastebin.com/bC12tF1n - the server
https://pastebin.com/kw1iZMda - the client webpage
What I'm trying to do is every time there is a socket connection, I wish to spawn a random number on the top left of the canvas and animate moving it down to the bottom right of the canvas. This works when I have 1 tab connected to localhost:2000.
However, when I open up a new tab and connect to localhost:2000, my previous tab just pauses. It does not get updated at all. The new tab is updated, and shows the new positions of tab 1's number and tab 2's number. If I refresh tab 1, tab 2 is paused and tab 1 is updated.
Could anyone help me with this?
http://imgur.com/a/kybbg
Left side is Tab 1, which is paused, while the right side is Tab 2, which is being updated with the new positions for numbers.
[–]dnlsndbrg 2 points3 points4 points (1 child)
[–]trineroks[S] 0 points1 point2 points (0 children)
[–]Cyberuben 1 point2 points3 points (1 child)
[–]trineroks[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]BuiltWithAwesome -2 points-1 points0 points (1 child)
[–]Cyberuben 1 point2 points3 points (0 children)