loleaflet: L.Socket should not be global. (fixup)

This commit is contained in:
Andras Timar 2016-01-15 16:26:23 +01:00
parent c8a1e7cbca
commit 287768c6bc
2 changed files with 5 additions and 5 deletions

View file

@ -148,7 +148,7 @@ L.Map.include({
if (this.getDocType() !== 'presentation') {
return;
}
L.Socket.sendMessage('uno .uno:InsertPage');
this._socket.sendMessage('uno .uno:InsertPage');
var docLayer = this._docLayer;
this.fire('insertpage', {
@ -164,7 +164,7 @@ L.Map.include({
if (this.getDocType() !== 'presentation') {
return;
}
L.Socket.sendMessage('uno .uno:DuplicatePage');
this._socket.sendMessage('uno .uno:DuplicatePage');
var docLayer = this._docLayer;
this.fire('insertpage', {
@ -181,7 +181,7 @@ L.Map.include({
return;
}
L.Socket.sendMessage('uno .uno:DeletePage');
this._socket.sendMessage('uno .uno:DeletePage');
var docLayer = this._docLayer;
// TO DO: Deleting all the pages causes problem.
if (docLayer._parts === 1) {

View file

@ -335,7 +335,7 @@ L.Map.Keyboard = L.Handler.extend({
// need to handle Ctrl + Alt + C separately for Firefox
if (e.originalEvent.key === 'c' && e.originalEvent.altKey) {
L.Socket.sendMessage('uno .uno:InsertAnnotation');
this._map._socket.sendMessage('uno .uno:InsertAnnotation');
return true;
}
@ -387,7 +387,7 @@ L.Map.Keyboard = L.Handler.extend({
case 86: // v
return true;
case 112: // f1
L.Socket.sendMessage('uno .uno:NoteVisible');
this._map._socket.sendMessage('uno .uno:NoteVisible');
case 188: // ,
this._map._socket.sendMessage('uno .uno:SubScript');
return true;