From 5ed1818de5ce12516b9171467b838f5f4b4513ca Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 7 Nov 2017 20:47:00 -0800 Subject: [PATCH] fix selection RootID name --- src/Connector.js | 2 +- src/Util/relativePosition.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Connector.js b/src/Connector.js index f8c76d03..4a7fe026 100644 --- a/src/Connector.js +++ b/src/Connector.js @@ -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 diff --git a/src/Util/relativePosition.js b/src/Util/relativePosition.js index 423274d5..5ab14b1c 100644 --- a/src/Util/relativePosition.js +++ b/src/Util/relativePosition.js @@ -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),