loleaflet/src/control/Control.Header.js      |    6 +++++-
 loleaflet/src/layer/tile/ImpressTileLayer.js |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit f98a0dce16454695b30099af6f1ae65fb839c2cc
Author: Henry Castro <[email protected]>
Date:   Wed Jan 17 09:31:26 2018 -0400

    loleaflet: fix first top annotation in Impress
    
    Change-Id: I00afba0ab1696c22f910530154c5f7e8b8fef06f
    (cherry picked from commit 7f83f236903f0920ea3d56b715408c497e7e7419)
    Reviewed-on: https://gerrit.libreoffice.org/49021
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    Tested-by: Samuel Mehrbrodt <[email protected]>

diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js 
b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 55c1ef77..5fd20980 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -222,15 +222,19 @@ L.ImpressTileLayer = L.TileLayer.extend({
        },
 
        layoutAnnotations: function () {
+               var topAnnotation;
                var annotations = 
this._annotations[this._partHashes[this._selectedPart]];
                var scale = this._map.getZoomScale(this._map.getZoom(), 10);
                var topRight = 
this._map.latLngToLayerPoint(this._map.options.maxBounds.getNorthEast())
                        .subtract(this.extraSize.multiplyBy(scale))
                        .add(L.point((this._selectedAnnotation ? 3 : 2) * 
this.options.marginX, this.options.marginY));
-               var topAnnotation = this._topAnnotation[this._selectedPart];
                var bounds, annotation;
                for (var index in annotations) {
                        annotation = annotations[index];
+                       if (!this._topAnnotation[this._selectedPart]) {
+                               this._topAnnotation[this._selectedPart] = 0;
+                       }
+                       topAnnotation = this._topAnnotation[this._selectedPart];
                        if (topAnnotation > 0 && parseInt(index) === 
topAnnotation - 1) {
                                // if the top annotation is not the first one, 
show a bit of the bottom of the previous annotation
                                // so that the user gets aware that there are 
more annotations above.
commit b6789a96eda6840908f97af08bb57a09f9c8cda6
Author: Marco Cecchetti <[email protected]>
Date:   Sun Dec 17 19:03:51 2017 +0100

    calc: fixing auto optimal size on double-click
    
    Change-Id: I6341c617037cd876667681d4495f77e75cad8388
    Reviewed-on: https://gerrit.libreoffice.org/46718
    Reviewed-by: Marco Cecchetti <[email protected]>
    Tested-by: Marco Cecchetti <[email protected]>
    (cherry picked from commit 149acb23aa7df0b25380486246b0e501d8c2199b)
    Reviewed-on: https://gerrit.libreoffice.org/49019
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    Tested-by: Samuel Mehrbrodt <[email protected]>

diff --git a/loleaflet/src/control/Control.Header.js 
b/loleaflet/src/control/Control.Header.js
index 7b309339..fddec5d6 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -160,6 +160,10 @@ L.Control.Header = L.Control.extend({
                this.onDragMove(this._item, this._start, this._offset, e);
        },
 
+       _resetClickCount: function () {
+               this._clicks = 0;
+       },
+
        _onMouseUp: function (e) {
                L.DomEvent.off(document, 'mousemove', this._onMouseMove, this);
                L.DomEvent.off(document, 'mouseup', this._onMouseUp, this);
@@ -172,7 +176,7 @@ L.Control.Header = L.Control.extend({
                        this._clicks = 0;
                } else {
                        this.onDragClick(this._item, ++this._clicks, e);
-                       setTimeout(L.bind(this.initialize, this), 400);
+                       setTimeout(L.bind(this._resetClickCount, this), 400);
                }
 
                this._item = this._start = this._offset = null;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to