loleaflet/src/control/Control.StatusBar.js |    6 ++++++
 loleaflet/src/map/Map.js                   |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 288d99847e3427d30a1380dbd08cfaceb20c8b21
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Tue Apr 21 16:45:51 2020 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Wed Apr 22 11:47:19 2020 +0200

    loleaflet: decrease min zoom to 1 => 20%
    
    In some cases on tablets in impress we want even smaller document
    sizes as otherwise the document doesn't fit on the screen.
    
    Change-Id: Ice00f122bae1401755c5094c23202a208468fe50
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92640
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/loleaflet/src/control/Control.StatusBar.js 
b/loleaflet/src/control/Control.StatusBar.js
index 056975769..dd12ec836 100644
--- a/loleaflet/src/control/Control.StatusBar.js
+++ b/loleaflet/src/control/Control.StatusBar.js
@@ -200,6 +200,9 @@ L.Control.StatusBar = L.Control.extend({
                                                selected: 'zoom100',
                                                mobile: false,
                                                items: [
+                                                       { id: 'zoom20', text: 
'20', scale: 1},
+                                                       { id: 'zoom25', text: 
'25', scale: 2},
+                                                       { id: 'zoom30', text: 
'30', scale: 3},
                                                        { id: 'zoom35', text: 
'35', scale: 4},
                                                        { id: 'zoom40', text: 
'40', scale: 5},
                                                        { id: 'zoom50', text: 
'50', scale: 6},
@@ -257,6 +260,9 @@ L.Control.StatusBar = L.Control.extend({
                        var zoomPercent = 100;
                        var zoomSelected = null;
                        switch (that.map.getZoom()) {
+                       case 1:  zoomPercent =  20; zoomSelected = 'zoom20'; 
break;  // 0.2102
+                       case 2:  zoomPercent =  25; zoomSelected = 'zoom25'; 
break;  // 0.2500
+                       case 3:  zoomPercent =  30; zoomSelected = 'zoom30'; 
break;  // 0.2973
                        case 4:  zoomPercent =  35; zoomSelected = 'zoom35'; 
break;  // 0.3535
                        case 5:  zoomPercent =  40; zoomSelected = 'zoom40'; 
break;  // 0.4204
                        case 6:  zoomPercent =  50; zoomSelected = 'zoom50'; 
break;  // 0.5
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index d457f4076..39dcf46d2 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -23,7 +23,7 @@ L.Map = L.Evented.extend({
                // is approximately 1.2. Thus 4 corresponds to six steps of 
division by pow(2,1/4) =
                // 35%. 18 corresponds to 8 steps of multiplication by 
pow(2,1/4) = 400%. The
                // percentages available are then rounded to the nearest five 
percent.
-               minZoom: 4,
+               minZoom: 1,
                maxZoom: 18,
                maxBounds: L.latLngBounds([0, 0], [-100, 100]),
                fadeAnimation: false, // Not useful for typing.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to