MCPcopy
hub / github.com/yjs/yjs / createRelativePosition

Function createRelativePosition

src/utils/RelativePosition.js:142–151  ·  view source on GitHub ↗
(type, item, assoc)

Source from the content-addressed store, hash-verified

140 * @function
141 */
142export const createRelativePosition = (type, item, assoc) => {
143 let typeid = null
144 let tname = null
145 if (type._item === null) {
146 tname = findRootTypeKey(type)
147 } else {
148 typeid = createID(type._item.id.client, type._item.id.clock)
149 }
150 return new RelativePosition(typeid, tname, item, assoc)
151}
152
153/**
154 * Create a relativePosition based on a absolute position.

Callers 2

getPathToFunction · 0.90

Calls 2

findRootTypeKeyFunction · 0.90
createIDFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…