Remove manual LZString compression for partial socket io event data
This commit is contained in:
2
public/vendor/ot/ot.min.js
vendored
2
public/vendor/ot/ot.min.js
vendored
File diff suppressed because one or more lines are too long
3
public/vendor/ot/socketio-adapter.js
vendored
Normal file → Executable file
3
public/vendor/ot/socketio-adapter.js
vendored
Normal file → Executable file
@@ -24,8 +24,6 @@ ot.SocketIOAdapter = (function () {
|
||||
self.trigger('selection', clientId, selection);
|
||||
});
|
||||
socket.on('operations', function (head, operations) {
|
||||
operations = LZString.decompressFromUTF16(operations);
|
||||
operations = JSON.parse(operations);
|
||||
self.trigger('operations', head, operations);
|
||||
});
|
||||
socket.on('selection', function (clientId, selection) {
|
||||
@@ -37,7 +35,6 @@ ot.SocketIOAdapter = (function () {
|
||||
}
|
||||
|
||||
SocketIOAdapter.prototype.sendOperation = function (revision, operation, selection) {
|
||||
operation = LZString.compressToUTF16(JSON.stringify(operation));
|
||||
this.socket.emit('operation', revision, operation, selection);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user