Hacker News new | ask | show | jobs
by jstogin 3234 days ago
I definitely agree that this kind of tool is complex to build. We have our own model, which I have developed over a few earlier iterations of what we have available now, and we use it to draw all the objects to the canvas.

Generally speaking, there are two types of changes that we deal with. There are the changes that are very important, which don't happen very often, and then there are changes that are not very important but happen quickly. For example, when a user drags an object, each movement of the mouse is of the second type, while the final release is of the first type.

We make a distinction between what a user sees and the underlying "document" that a user is editing. When a user moves an object, we don't update the document until the user releases the move. However, we do send data to other devices so that anyone who is watching still sees the object being moved.