Upgrade telepath to allow marker attributes to be updated

This commit is contained in:
Nathan Sobo
2013-07-19 16:28:24 -07:00
parent de1b69dbc9
commit 74347ea874
3 changed files with 5 additions and 5 deletions

View File

@@ -873,5 +873,5 @@ describe "DisplayBuffer", ->
marker2 = marker1.copy(b: 3)
expect(marker2.getBufferRange()).toEqual marker1.getBufferRange()
expect(displayBuffer.getMarkerCount()).toBe initialMarkerCount + 2
expect(marker1.getAttributes()).toEqual a: 1, b: 2, invalidation: 'overlap'
expect(marker2.getAttributes()).toEqual a: 1, b: 3, invalidation: 'overlap'
expect(marker1.getAttributes()).toEqual a: 1, b: 2
expect(marker2.getAttributes()).toEqual a: 1, b: 3

View File

@@ -12,13 +12,13 @@ module.exports =
event.id = nextOutputEventId++
console.log 'sending event', event.id, event
connection.send(event)
doc.on('output', outputListener)
doc.on('replicate-change', outputListener)
queuedEvents = []
nextInputEventId = 1
handleInputEvent = (event) ->
console.log 'received event', event.id, event
doc.handleInputEvent(event)
doc.applyRemoteChange(event)
nextInputEventId = event.id + 1
flushQueuedEvents = ->
loop