fix selection RootID name

This commit is contained in:
Kevin Jahns 2017-11-07 20:47:00 -08:00
parent 0310500c4e
commit 5ed1818de5
2 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ export default class AbstractConnector {
buffer.setUint32(this.broadcastBufferSizePos, this.broadcastBufferSize)
this.broadcastBuffer = new BinaryEncoder()
this.whenRemoteResponsive().then(() => {
this.broadcast(buffer.createBuffer)
this.broadcast(buffer.createBuffer())
})
} else if (firstContent) {
// send the buffer when all transactions are finished

View File

@ -3,7 +3,7 @@ import RootID from './RootID.js'
export function getRelativePosition (type, offset) {
if (offset === 0) {
return ['startof', type._id.user, type._id.clock || null, type._id.type || null]
return ['startof', type._id.user, type._id.clock || null, type._id.name || null, type._id.type || null]
} else {
let t = type._start
while (t !== null) {
@ -28,7 +28,7 @@ export function fromRelativePosition (y, rpos) {
if (rpos[3] === null) {
id = new ID(rpos[1], rpos[2])
} else {
id = new RootID(rpos[1], rpos[3])
id = new RootID(rpos[3], rpos[4])
}
return {
type: y.os.get(id),