simonsoft / authormodel

Authormodel is an abstraction between your average WYSI-whatever editor and your storage. It supports Structured Documentation.
https://www.npmjs.com/package/authormodel
0 stars 1 forks source link

Sets order references from the move api #19

Closed solsson closed 9 years ago

solsson commented 9 years ago

9 didn't have this, while addAfter had.

solsson commented 9 years ago

We rejected the idea to update 'previous' on existing elements, #18. Instead:

This means that server-side reconcile uses 'previous' to identify added units (while also receiving modified units without 'previous'). When multiple 'previous' point to the same pre-existing unit they are persisted in order of appearance in the reconcile body.

takesson commented 9 years ago

Minor clarification: An added unit can also reference another added unit. It depends which order they were created. Both alternatives below should produce the same resulting document.

Original:

Alternative 1:

Alternative 2: