implemented xml type for new event system

This commit is contained in:
Kevin Jahns
2017-10-19 17:36:28 +02:00
parent 1311c7a0d8
commit 755c9eb16e
38 changed files with 1272 additions and 322 deletions

View File

@@ -4,12 +4,12 @@ export default class StateStore {
constructor (y) {
this.y = y
this.state = new Map()
this.currentClock = 0
}
getNextID (len) {
let id = new ID(this.y.userID, this.currentClock)
this.currentClock += len
return id
const user = this.y.userID
const state = this.getState(user)
this.setState(user, state + len)
return new ID(user, state)
}
updateRemoteState (struct) {
let user = struct._id.user
@@ -27,4 +27,8 @@ export default class StateStore {
}
return state
}
setState (user, state) {
// TODO: modify missingi structs here
this.state.set(user, state)
}
}