Closed Worie closed 7 years ago
Just realized that it works well when there are only two peers, but fails with more than that.
The problem is that upon recieving the change event, the remoteCarets
set is being cleared.
So in scenario:
So, each peer should have probably his own Set()
.
Looks good, thanks for figuring this out. I added a few comments.
Guess that's it. Besides the requested changes I've left a comment about the issue I mentioned in https://github.com/RationalCoding/multihack-brackets/pull/23#issuecomment-298181615 earlier.
OK, seems to be working great aside from the issue with >2 users. I'll fix that in a later commit when I do cursor colours. Thanks @Worie !
Would you like to be added as a maintainer? I can always use some more help developing this :)
I'm glad it's ok :) When it comes to me as a maintainer - I can't really promise anything as I don't know how much spare time will I have, but sure - that'd be nice, thanks!
Here we go. I tried to follow your codestyle, I guess it should be ok. The changes provided should cover every input from peers (multiple carets, removals, additions, pastes and cuts)
If this PR's alright, then in the future I guess we should create a html template for carets (for future features such as displaying the carets owner name and for code maintenance purposes)
This solves #22