fixed YMap
This commit is contained in:
@@ -3,8 +3,7 @@ import * as encoding from 'lib0/encoding.js'
|
||||
import * as decoding from 'lib0/decoding.js'
|
||||
import { StructStore, getItemRange } from './StructStore.js' // eslint-disable-line
|
||||
import { Transaction } from './Transaction.js' // eslint-disable-line
|
||||
import * as error from 'lib0/error.js'
|
||||
import { ID } from './ID.js'
|
||||
import { ID } from './ID.js' // eslint-disable-line
|
||||
|
||||
class DeleteItem {
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
* @module utils
|
||||
*/
|
||||
|
||||
import { getStruct } from '../utils/structReferences.js'
|
||||
import * as decoding from 'lib0/decoding.js'
|
||||
import { GC } from '../structs/GC.js/index.js.js'
|
||||
import { GC } from '../structs/GC.js'
|
||||
import { Y } from '../utils/Y.js' // eslint-disable-line
|
||||
import { Item } from '../structs/AbstractItem.js/index.js' // eslint-disable-line
|
||||
|
||||
class MissingEntry {
|
||||
constructor (decoder, missing, struct) {
|
||||
|
||||
@@ -3,24 +3,23 @@
|
||||
*/
|
||||
|
||||
import { Y } from '../utils/Y.js' // eslint-disable-line
|
||||
import { Type } from '../types/AbstractType.js/index.js.js.js.js' // eslint-disable-line
|
||||
import { AbstractType } from '../types/AbstractType.js' // eslint-disable-line
|
||||
|
||||
/**
|
||||
* Check if `parent` is a parent of `child`.
|
||||
*
|
||||
* @param {Type | Y} parent
|
||||
* @param {Type | Y} child
|
||||
* @param {AbstractType} parent
|
||||
* @param {AbstractType} child
|
||||
* @return {Boolean} Whether `parent` is a parent of `child`.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const isParentOf = (parent, child) => {
|
||||
child = child._parent
|
||||
while (child !== null) {
|
||||
while (child._item !== null) {
|
||||
if (child === parent) {
|
||||
return true
|
||||
}
|
||||
child = child._parent
|
||||
child = child._item.parent
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import * as ID from './ID.js'
|
||||
import { GC } from '../structs/GC.js/index.js.js'
|
||||
import { GC } from '../structs/GC.js'
|
||||
|
||||
// TODO: Implement function to describe ranges
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as encoding from 'lib0/encoding.js'
|
||||
import * as decoding from 'lib0/decoding.js'
|
||||
import { AbstractStruct, AbstractRef } from '../structs/AbstractStruct.js'
|
||||
import { ID, createID, writeID, writeNullID } from './ID.js'
|
||||
import * as binary from 'lib0/binary.js'
|
||||
import { Transaction } from './Transaction.js'
|
||||
import { findIndex } from './StructStore.js'
|
||||
|
||||
Reference in New Issue
Block a user