(type, item, assoc)
| 140 | * @function |
| 141 | */ |
| 142 | export 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. |
no test coverage detected
searching dependent graphs…