[Libreoffice-commits] online.git: loleaflet/src

Mihai Varga mihai.varga at collabora.com
Thu Sep 17 09:41:57 PDT 2015


 loleaflet/src/core/Socket.js |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit d8f26465e503d9f3f99e71b39083cb85eb11dc32
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Thu Sep 17 19:38:12 2015 +0300

    loleaflet: fit presentation slide to screen size

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 57852d7..ba93c2b 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -110,9 +110,18 @@ L.Socket = {
 				});
 			}
 			else {
+				if (command.type === 'presentation') {
+					var verticalTiles = this._map.getSize().y / 256;
+					var tileTwipsSize = Math.round(command.height / verticalTiles);
+				}
+				else {
+					tileTwipsSize = 3000;
+				}
 				docLayer = new L.ImpressTileLayer('', {
 					edit: this._map.options.edit,
-					readOnly: this._map.options.readOnly
+					readOnly: this._map.options.readOnly,
+					tileWidthTwips: tileTwipsSize,
+					tileHeightTwips: tileTwipsSize
 				});
 			}
 


More information about the Libreoffice-commits mailing list