Compare commits
3 Commits
v13.0.0-62
...
v13.0.0-63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86dc602a8d | ||
|
|
860e4d7af6 | ||
|
|
6376d69b58 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "13.0.0-62",
|
||||
"version": "13.0.0-63",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "13.0.0-62",
|
||||
"version": "13.0.0-63",
|
||||
"description": "A framework for real-time p2p shared editing on any data",
|
||||
"main": "./y.node.js",
|
||||
"browser": "./y.js",
|
||||
|
||||
@@ -87,7 +87,7 @@ export default class Item {
|
||||
* If the parent refers to this item with some kind of key (e.g. YMap, the
|
||||
* key is specified here. The key is then used to refer to the list in which
|
||||
* to insert this item. If `parentSub = null` type._start is the list in
|
||||
* which to insert to. Otherwise it is `parent._start`.
|
||||
* which to insert to. Otherwise it is `parent._map`.
|
||||
* @type {String}
|
||||
*/
|
||||
this._parentSub = null
|
||||
@@ -125,8 +125,17 @@ export default class Item {
|
||||
return this._redone
|
||||
}
|
||||
let struct = this._copy()
|
||||
let left = this._left
|
||||
let right = this
|
||||
let left, right
|
||||
if (this._parentSub === null) {
|
||||
// Is an array item. Insert at the old position
|
||||
left = this._left
|
||||
right = this
|
||||
} else {
|
||||
// Is a map item. Insert at the start
|
||||
left = null
|
||||
right = this._parent._map.get(this._parentSub)
|
||||
right._delete(y)
|
||||
}
|
||||
let parent = this._parent
|
||||
// make sure that parent is redone
|
||||
if (parent._deleted === true && parent._redone === null) {
|
||||
|
||||
17
y.node.js
17
y.node.js
@@ -1,7 +1,7 @@
|
||||
|
||||
/**
|
||||
* yjs - A framework for real-time p2p shared editing on any data
|
||||
* @version v13.0.0-62
|
||||
* @version v13.0.0-63
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
@@ -1644,7 +1644,7 @@ class Item {
|
||||
* If the parent refers to this item with some kind of key (e.g. YMap, the
|
||||
* key is specified here. The key is then used to refer to the list in which
|
||||
* to insert this item. If `parentSub = null` type._start is the list in
|
||||
* which to insert to. Otherwise it is `parent._start`.
|
||||
* which to insert to. Otherwise it is `parent._map`.
|
||||
* @type {String}
|
||||
*/
|
||||
this._parentSub = null;
|
||||
@@ -1682,8 +1682,17 @@ class Item {
|
||||
return this._redone
|
||||
}
|
||||
let struct = this._copy();
|
||||
let left = this._left;
|
||||
let right = this;
|
||||
let left, right;
|
||||
if (this._parentSub === null) {
|
||||
// Is an array item. Insert at the old position
|
||||
left = this._left;
|
||||
right = this;
|
||||
} else {
|
||||
// Is a map item. Insert at the start
|
||||
left = null;
|
||||
right = this._parent._map.get(this._parentSub);
|
||||
right._delete(y);
|
||||
}
|
||||
let parent = this._parent;
|
||||
// make sure that parent is redone
|
||||
if (parent._deleted === true && parent._redone === null) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user