loleaflet/src/layer/tile/TileLayer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 78e707393e2f630cb2c9ca7aa5b14d4947f3b9ed Author: Marco Cecchetti <marco.cecche...@collabora.com> Date: Tue Oct 11 22:27:04 2016 +0200 loleaflet: handle EMPTY invalid tiles msg with part in the payload Change-Id: I84ae55440b540dc027bddf341994d34d411f2a3a Reviewed-on: https://gerrit.libreoffice.org/29826 Reviewed-by: Marco Cecchetti <mrcek...@gmail.com> Tested-by: Marco Cecchetti <mrcek...@gmail.com> diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 9672459..dfe8b7a 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -304,15 +304,16 @@ L.TileLayer = L.GridLayer.extend({ else if (textMsg.startsWith('invalidatecursor:')) { this._onInvalidateCursorMsg(textMsg); } - else if (textMsg.startsWith('invalidatetiles:') && !textMsg.match('EMPTY')) { + else if (textMsg.startsWith('invalidatetiles:') && !textMsg.startsWith('EMPTY')) { this._onInvalidateTilesMsg(textMsg); } - else if (textMsg.startsWith('invalidatetiles:') && textMsg.match('EMPTY')) { + else if (textMsg.startsWith('invalidatetiles:') && textMsg.startsWith('EMPTY')) { var msg = 'invalidatetiles: '; if (this._docType === 'text') { msg += 'part=0 '; } else { - msg += 'part=' + this._selectedPart + ' '; + var partNumber = parseInt(textMsg.substring(6)); + msg += 'part=' + (isNaN(partNumber) ? this._selectedPart : partNumber) + ' '; } msg += 'x=0 y=0 '; msg += 'width=' + this._docWidthTwips + ' '; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits