loleaflet: new command remallviews to remove all views

This command is intended to be used when re-activating a
client. It is intended to be sent prior to sending the
list of active views, including the re-activating
client's own view.

A client UI must maintain its own view ID and info
when receiving this command.

Change-Id: Iea58c01fb30af139888e746b5cf9e7ba7e7eeab1
Reviewed-on: https://gerrit.libreoffice.org/28132
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-08-14 17:24:46 -04:00 committed by Ashod Nakashian
parent fbcce1b803
commit 59ed1bd2ff
2 changed files with 14 additions and 0 deletions

View file

@ -363,6 +363,9 @@ L.TileLayer = L.GridLayer.extend({
else if (textMsg.startsWith('remview:')) {
this._onRemViewMsg(textMsg);
}
else if (textMsg.startsWith('remallviews:')) {
this._onRemAllViewMsg(textMsg);
}
},
_onCommandValuesMsg: function (textMsg) {
@ -602,6 +605,12 @@ L.TileLayer = L.GridLayer.extend({
}
},
_onRemAllViewMsg: function(textMsg) {
for (var viewId in this._viewCursors) {
this._onRemViewMsg('remview: ' + viewId);
}
},
_onPartPageRectanglesMsg: function (textMsg) {
textMsg = textMsg.substring(19);
var pages = textMsg.split(';');

View file

@ -340,6 +340,11 @@ remview: <viewId>
The view with the given viewId has been destroyed.
remallviews:
Removes all views to send only current ones.
The UI should still maintain its own view and cursor.
child -> parent
===============