merge xml support and bugfixes

This commit is contained in:
Kevin Jahns
2014-09-26 10:57:17 +02:00
45 changed files with 1272 additions and 1004 deletions

View File

@@ -28,7 +28,7 @@
send_ = (function(_this) {
return function(o) {
var conn, conn_id, _ref, _results;
if (o.uid.creator === _this.HB.getUserId() && (typeof o.uid.op_number !== "string")) {
if (o.creator === _this.HB.getUserId() && (typeof o.uid.op_number !== "string") && o.uid.sync) {
_ref = _this.connections;
_results = [];
for (conn_id in _ref) {
@@ -71,7 +71,7 @@
} else if (data.HB != null) {
initialized_me = true;
_this.engine.applyOpsCheckDouble(data.HB);
_this.engine.applyOpsCheckDouble(data.HB, data.state_vector);
return conn.send({
conns: _this.getAllConnectionIds()
});
@@ -88,7 +88,8 @@
} else if (data.state_vector != null) {
if (!initialized_him) {
conn.send({
HB: _this.yatta.getHistoryBuffer()._encode(data.state_vector)
HB: _this.yatta.getHistoryBuffer()._encode(data.state_vector),
state_vector: _this.yatta.HB.getOperationCounter()
});
return initialized_him = true;
}

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

View File

@@ -222,7 +222,9 @@
this.deleted_by = [];
}
if ((this.parent != null) && !this.isDeleted()) {
this.parent.callEvent("delete", this, o);
if (o != null) {
this.parent.callEvent("delete", this, o);
}
}
if (o != null) {
this.deleted_by.push(o);

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

View File

@@ -174,16 +174,12 @@
WordType.prototype.setReplaceManager = function(op) {
this.saveOperation('replace_manager', op);
this.validateSavedOperations();
this.on('insert', (function(_this) {
return function(event, ins) {
var _ref;
return (_ref = _this.replace_manager) != null ? _ref.forwardEvent(_this, 'change', ins) : void 0;
};
})(this));
this.on('insert', function(event, ins) {
return op.forwardEvent(this, 'change', ins);
});
return this.on('delete', (function(_this) {
return function(event, ins, del) {
var _ref;
return (_ref = _this.replace_manager) != null ? _ref.forwardEvent(_this, 'change', del) : void 0;
return op.forwardEvent(_this, 'change', del);
};
})(this));
};

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"sources":["Types/XmlTypes.coffee"],"names":[],"mappings":"AAyGwC;AAAA;AAAA","file":"Types/XmlTypes.js","sourceRoot":"/source/","sourcesContent":[""]}
{"version":3,"sources":["Types/XmlTypes.coffee"],"names":[],"mappings":"AA4VkB;AAAA;AAAA","file":"Types/XmlTypes.js","sourceRoot":"/source/","sourcesContent":[""]}