Changes between Version 6 and Version 7 of AnnotatedObbySession
- Timestamp:
- 10/10/06 03:35:30 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AnnotatedObbySession
v6 v7 145 145 Obviously the NoOperation is the simpler case, so I will begin to explain this one. Let's say, we have a document whose content is 'foobar'. We now delete some characters to make 'far' out of it by sending 146 146 147 ''obby_document:1 1:record:0:0:del:1:3'' 147 {{{obby_document:1 1:record:0:0:del:1:3}}} 148 148 149 149 to the server. The server decided to delete only 'oo' and sent 150 150 151 {{{obby_document:1 1:record:0:0:del:1:2 ''151 {{{obby_document:1 1:record:0:0:del:1:2}}} 152 152 153 153 When we get this operation we notice that the server deleted 'oo' before he got our deletion of 'oob'. Therefore, we have to include the effect of del(1,3) into del(1,2). When we delete three characters starting at index 1, the first to characters starting at index 1 are already deleted, so we have to do nothing, because we already deleted ourselves what the server deleted. The result of this transformation is therefore a noop. This happens every time when we receive a delete operation that deletes a range that is already deleted. … … 155 155 The SplitOperation is required when one inserts text into a range of text that has to deleted. Consider the following example (again, the initial content is 'foobar'): 156 156 157 ''obby_doucment:1 1:record:0:0:ins:3:bal'' 157 {{{obby_doucment:1 1:record:0:0:ins:3:bal}}} 158 158 {{{obby_document:1 1:record:0:0:del:0:6}}} 159 159
