improved granularity of prosemirror binding

This commit is contained in:
Kevin Jahns
2018-12-03 17:09:00 +01:00
parent c9ea3a412e
commit 582095e5a3
18 changed files with 519 additions and 126 deletions

View File

@@ -10,7 +10,7 @@ import * as bc from '../../lib/broadcastchannel.js'
const messageSync = 0
const messageAwareness = 1
const reconnectTimeout = 100
const reconnectTimeout = 3000
/**
* @param {WebsocketsSharedDocument} doc

View File

@@ -32,7 +32,7 @@ const afterTransaction = (doc, transaction) => {
class WSSharedDoc extends Y.Y {
constructor () {
super()
super({ gc: true })
this.mux = Y.createMutex()
/**
* Maps from conn to set of controlled user ids. Delete all user ids from awareness when this conn is closed

View File

@@ -262,7 +262,7 @@ export const getRoomMetas = t => {
result.push({
room: metakey.slice(5),
rsid,
offset: keys.reduce((cur, key) => globals.max(decodeHUKey(key).offset, cur), offset)
offset: keys.reduce((cur, key) => math.max(decodeHUKey(key).offset, cur), offset)
})
})
).then(() => globals.presolve(result))