improved granularity of prosemirror binding
This commit is contained in:
@@ -19,6 +19,10 @@ export class GC {
|
||||
this._length = 0
|
||||
}
|
||||
|
||||
get _redone () {
|
||||
return null
|
||||
}
|
||||
|
||||
get _deleted () {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -113,6 +113,30 @@ export class Item {
|
||||
this._redone = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next non-deleted item
|
||||
* @private
|
||||
*/
|
||||
get _next () {
|
||||
let n = this._right
|
||||
while (n !== null && n._deleted) {
|
||||
n = n._right
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the previous non-deleted item
|
||||
* @private
|
||||
*/
|
||||
get _prev () {
|
||||
let n = this._left
|
||||
while (n !== null && n._deleted) {
|
||||
n = n._left
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an Item with the same effect as this Item (without position effect)
|
||||
*
|
||||
@@ -127,7 +151,7 @@ export class Item {
|
||||
* Redoes the effect of this operation.
|
||||
*
|
||||
* @param {Y} y The Yjs instance.
|
||||
* @param {Array<Item>} redoitems
|
||||
* @param {Set<Item>} redoitems
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -57,6 +57,17 @@ export class Type extends Item {
|
||||
this._deepEventHandler = new EventHandler()
|
||||
}
|
||||
|
||||
/**
|
||||
* The first non-deleted item
|
||||
*/
|
||||
get _first () {
|
||||
let n = this._start
|
||||
while (n !== null && n._deleted) {
|
||||
n = n._right
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the path from this type to the specified target.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user