We should switch back to color pooling on the client. However we should not stick to an index as it may change during run time. Imagine there are two collabs: [1,2] If the 1 leaves the next client would receive 2 as the index which is already used.
I think our pool should look like this: ['color1', 'color2', 'color'3', 'color'4'] and each time a collaborator arrives we just pick the next color. If they are exhausted we start from the beginning. We can store the color class on the collaborator object. That way we preserve colors of cursors as collaborators arrive or leave.
Plan:
We should switch back to color pooling on the client. However we should not stick to an index as it may change during run time. Imagine there are two collabs:
[1,2]
If the1
leaves the next client would receive 2 as the index which is already used.I think our pool should look like this:
['color1', 'color2', 'color'3', 'color'4']
and each time a collaborator arrives we just pick the next color. If they are exhausted we start from the beginning. We can store the color class on the collaborator object. That way we preserve colors of cursors as collaborators arrive or leave.