Remove manual LZString compression for partial socket io event data

This commit is contained in:
Wu Cheng-Han 2017-01-02 10:52:47 +08:00
parent e65e09215a
commit c904083d1f
5 changed files with 3 additions and 22 deletions

3
public/vendor/ot/socketio-adapter.js vendored Normal file → Executable file
View 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);
};