loleaflet/src/map/Map.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit fb8d89589b971218cedb2cdd708fffe6440ab867 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Oct 30 12:44:04 2016 -0400 loleaflet: fire addview and removeview events last This fixes regression to the hackish fix done in b26f2f2738c4c60c8b3212f222336d07465744da - loleaflet: prevent the zoomlevel from changing on connect/disconnect Change-Id: I09c899546d0d8bfbe4c274b0774fd30008cbcfa5 Reviewed-on: https://gerrit.libreoffice.org/30400 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 2d6ceb6..0181cc6 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -136,15 +136,19 @@ L.Map = L.Evented.extend({ addView: function(viewid, userid, username, color) { this._viewInfo[viewid] = {'userid': userid, 'username': username, 'color': color}; - this.fire('addview', {viewId: viewid, username: username}); this.WOPIPostMessage('View_Added', {ViewId: viewid, UserId: userid, UserName: username, Color: color}); + + // Fire last, otherwise not all events are handled correctly. + this.fire('addview', {viewId: viewid, username: username}); }, removeView: function(viewid) { var username = this._viewInfo[viewid].username; delete this._viewInfo[viewid]; - this.fire('removeview', {viewId: viewid, username: username}); this.WOPIPostMessage('View_Removed', {ViewId: viewid}); + + // Fire last, otherwise not all events are handled correctly. + this.fire('removeview', {viewId: viewid, username: username}); }, getViewName: function(viewid) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits