Updating NodeViews on node moved

Node views don’t really get to know about their position in the document—they are rendered and then left alone as long as the node stays the same, since constantly calling their update methods when something somewhere in the document changed would be expensive.

There is one way to communicate with node views, and that is to add node decorations to them from external code. When their decorations change, the update method will be called, and the decorations are passed as one of its arguments.