a
This commit is contained in:
parent
6623bd6134
commit
51b5294e3c
@ -44,10 +44,10 @@ createPeerJsConnector = ()->
|
||||
@addConnection conn
|
||||
|
||||
sync_every_collaborator = ()=>
|
||||
for conn_id, conn of @connections
|
||||
conn.send
|
||||
sync_state_vector: @HB.getOperationCounter()
|
||||
setInterval sync_every_collaborator, 8000
|
||||
for conn_id, conn of @connections
|
||||
conn.send
|
||||
sync_state_vector: @HB.getOperationCounter()
|
||||
setInterval sync_every_collaborator, 4000
|
||||
|
||||
send_ = (o)=>
|
||||
if o.uid.creator is @HB.getUserId() and (typeof o.uid.op_number isnt "string")
|
||||
@ -122,7 +122,7 @@ createPeerJsConnector = ()->
|
||||
initialized: false
|
||||
initialized_him = true
|
||||
else
|
||||
throw new Error "Can't parse this operation"
|
||||
throw new Error "Can't parse this operation: #{data}"
|
||||
|
||||
sendStateVector = ()=>
|
||||
conn.send
|
||||
|
@ -45,5 +45,11 @@ describe "XmlFramework", ->
|
||||
dom_ = @test_user.val(true)
|
||||
expect(dom_ isnt dom).to.be.true
|
||||
expect(dom_.outerHTML).to.equal(dom.outerHTML)
|
||||
console.log "dtrn"
|
||||
|
||||
it "can transform to a real Dom element", ->
|
||||
dom = $("#test_dom")[0]
|
||||
@test_user.val(dom)
|
||||
newdom = $("<p>dtrn</p>")[0]
|
||||
dom.insertBefore(newdom)
|
||||
dom_ = @test_user.val(true)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user