You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**false**)
// result is new Delta().retain(2).retain(1,{a:1})
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**true**)
// result is new Delta().retain(2).retain(1,{a:1}) too.
but when delta contain "insert" new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).insert({a:1}),**false**)
//result is new Delta().retain(1).insert({a:1})
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).insert({a:1}),**true**)
//result is new Delta().retain(2).insert({a:1})
why the result of new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**false**) is not new Delta().retain(1).retain(1,{a:1}) too.
The text was updated successfully, but these errors were encountered:
This is how transform for Operational Transform works. There are resources online that explains the what and why but this library just implements that. If you still think there's an error please elaborate on your rationale.
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**false**)
// result is
new Delta().retain(2).retain(1,{a:1})
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**true**)
// result is
new Delta().retain(2).retain(1,{a:1})
too.but when delta contain "insert"
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).insert({a:1}),**false**)
//result is
new Delta().retain(1).insert({a:1})
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).insert({a:1}),**true**)
//result is
new Delta().retain(2).insert({a:1})
why the result of
new Delta().retain(1).insert({b:2}).transform(new Delta().retain(1).retain(1,{a:1}),**false**)
is notnew Delta().retain(1).retain(1,{a:1})
too.The text was updated successfully, but these errors were encountered: