Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2d4c38eace | ||
|
5350b26cb3 | ||
|
4feaf6c6fb |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"homepage": "https://github.com/DadaMonad/yjs",
|
"homepage": "https://github.com/DadaMonad/yjs",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -8,16 +8,6 @@ adaptConnector = function(connector, engine, HB, execution_listener) {
|
|||||||
f = ConnectorClass[name];
|
f = ConnectorClass[name];
|
||||||
connector[name] = f;
|
connector[name] = f;
|
||||||
}
|
}
|
||||||
connector.setIsBoundToY();
|
|
||||||
send_ = function(o) {
|
|
||||||
if ((o.uid.creator === HB.getUserId()) && (typeof o.uid.op_number !== "string") && (HB.getUserId() !== "_temp")) {
|
|
||||||
return connector.broadcast(o);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if (connector.invokeSync != null) {
|
|
||||||
HB.setInvokeSyncHandler(connector.invokeSync);
|
|
||||||
}
|
|
||||||
execution_listener.push(send_);
|
|
||||||
encode_state_vector = function(v) {
|
encode_state_vector = function(v) {
|
||||||
var results, value;
|
var results, value;
|
||||||
results = [];
|
results = [];
|
||||||
@ -61,11 +51,21 @@ adaptConnector = function(connector, engine, HB, execution_listener) {
|
|||||||
if (connector.receive_handlers == null) {
|
if (connector.receive_handlers == null) {
|
||||||
connector.receive_handlers = [];
|
connector.receive_handlers = [];
|
||||||
}
|
}
|
||||||
return connector.receive_handlers.push(function(sender, op) {
|
connector.receive_handlers.push(function(sender, op) {
|
||||||
if (op.uid.creator !== HB.getUserId()) {
|
if (op.uid.creator !== HB.getUserId()) {
|
||||||
return engine.applyOp(op);
|
return engine.applyOp(op);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connector.setIsBoundToY();
|
||||||
|
send_ = function(o) {
|
||||||
|
if ((o.uid.creator === HB.getUserId()) && (typeof o.uid.op_number !== "string") && (HB.getUserId() !== "_temp")) {
|
||||||
|
return connector.broadcast(o);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (connector.invokeSync != null) {
|
||||||
|
HB.setInvokeSyncHandler(connector.invokeSync);
|
||||||
|
}
|
||||||
|
return execution_listener.push(send_);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = adaptConnector;
|
module.exports = adaptConnector;
|
||||||
|
@ -442,7 +442,7 @@ module.exports = function() {
|
|||||||
if (callLater) {
|
if (callLater) {
|
||||||
this.parent.callOperationSpecificDeleteEvents(this, o);
|
this.parent.callOperationSpecificDeleteEvents(this, o);
|
||||||
}
|
}
|
||||||
if ((this.prev_cl != null) && this.prev_cl.isDeleted()) {
|
if ((this.prev_cl != null) && this.prev_cl.isDeleted() && this.prev_cl.garbage_collected !== true) {
|
||||||
return this.prev_cl.applyDelete();
|
return this.prev_cl.applyDelete();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
35262
build/test/xml-test.js
Normal file
35262
build/test/xml-test.js
Normal file
File diff suppressed because one or more lines are too long
@ -10,18 +10,6 @@ adaptConnector = (connector, engine, HB, execution_listener)->
|
|||||||
for name, f of ConnectorClass
|
for name, f of ConnectorClass
|
||||||
connector[name] = f
|
connector[name] = f
|
||||||
|
|
||||||
connector.setIsBoundToY()
|
|
||||||
|
|
||||||
send_ = (o)->
|
|
||||||
if (o.uid.creator is HB.getUserId()) and
|
|
||||||
(typeof o.uid.op_number isnt "string") and # TODO: i don't think that we need this anymore..
|
|
||||||
(HB.getUserId() isnt "_temp")
|
|
||||||
connector.broadcast o
|
|
||||||
|
|
||||||
if connector.invokeSync?
|
|
||||||
HB.setInvokeSyncHandler connector.invokeSync
|
|
||||||
|
|
||||||
execution_listener.push send_
|
|
||||||
# For the XMPPConnector: lets send it as an array
|
# For the XMPPConnector: lets send it as an array
|
||||||
# therefore, we have to restructure it later
|
# therefore, we have to restructure it later
|
||||||
encode_state_vector = (v)->
|
encode_state_vector = (v)->
|
||||||
@ -57,5 +45,17 @@ adaptConnector = (connector, engine, HB, execution_listener)->
|
|||||||
if op.uid.creator isnt HB.getUserId()
|
if op.uid.creator isnt HB.getUserId()
|
||||||
engine.applyOp op
|
engine.applyOp op
|
||||||
|
|
||||||
|
connector.setIsBoundToY()
|
||||||
|
|
||||||
|
send_ = (o)->
|
||||||
|
if (o.uid.creator is HB.getUserId()) and
|
||||||
|
(typeof o.uid.op_number isnt "string") and # TODO: i don't think that we need this anymore..
|
||||||
|
(HB.getUserId() isnt "_temp")
|
||||||
|
connector.broadcast o
|
||||||
|
|
||||||
|
if connector.invokeSync?
|
||||||
|
HB.setInvokeSyncHandler connector.invokeSync
|
||||||
|
|
||||||
|
execution_listener.push send_
|
||||||
|
|
||||||
module.exports = adaptConnector
|
module.exports = adaptConnector
|
||||||
|
@ -430,7 +430,7 @@ module.exports = ()->
|
|||||||
super garbagecollect
|
super garbagecollect
|
||||||
if callLater
|
if callLater
|
||||||
@parent.callOperationSpecificDeleteEvents(this, o)
|
@parent.callOperationSpecificDeleteEvents(this, o)
|
||||||
if @prev_cl? and @prev_cl.isDeleted()
|
if @prev_cl? and @prev_cl.isDeleted() and @prev_cl.garbage_collected isnt true
|
||||||
# garbage collect prev_cl
|
# garbage collect prev_cl
|
||||||
@prev_cl.applyDelete()
|
@prev_cl.applyDelete()
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.",
|
"description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.",
|
||||||
"main": "./build/node/y.js",
|
"main": "./build/node/y.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user