[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - loleaflet/src

Jan Holesovsky kendy at collabora.com
Thu Jan 14 14:39:53 PST 2016


 loleaflet/src/core/Socket.js |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f460fdf5c43b3664145aef721ad3b0f55afa65e7
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Jan 14 23:38:18 2016 +0100

    loleaflet: Really fire the event on 'this'.

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 9c2ab1b..ec16169 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -8,7 +8,7 @@ L.Socket = L.Class.extend({
 		try {
 			this.socket = new WebSocket(map.options.server);
 		} catch (e) {
-			this._map.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3});
+			this.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3});
 			return null;
 		}
 		this._msgQueue = [];
@@ -48,7 +48,7 @@ L.Socket = L.Class.extend({
 		if (this._map._docLayer) {
 			// we are reconnecting after a lost connection
 			msg += ' part=' + this._map.getCurrentPartNumber();
-			this._map.fire('statusindicator', {statusType : 'reconnected'});
+			this.fire('statusindicator', {statusType : 'reconnected'});
 		}
 		if (this._map.options.timestamp) {
 			msg += ' timestamp=' + this._map.options.timestamp;
@@ -159,11 +159,11 @@ L.Socket = L.Class.extend({
 	},
 
 	_onSocketError: function () {
-		this._map.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3});
+		this.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3});
 	},
 
 	_onSocketClose: function () {
-		this._map.fire('error', {msg: 'Socket connection closed', cmd: 'socket', kind: 'closed', id: 4});
+		this.fire('error', {msg: 'Socket connection closed', cmd: 'socket', kind: 'closed', id: 4});
 	},
 
 	parseServerCmd: function (msg) {


More information about the Libreoffice-commits mailing list