loleaflet/src/layer/AnnotationManager.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4cdc50c0e2934802c342e01661db7af33da3d6c9
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Thu Apr 27 16:09:14 2017 +0530

    loleaflet: Set correct initial position of the comment
    
    Otherwise the comment is animated from the bottom of the document to the
    correct position and it confuses IE. Better to set the correct position
    of the comment initially, so it doesn't have to animate all the way
    through to the original position.
    
    Change-Id: Ie59e2d785b6a778f3c918082a1a8cb7b2923cc33
    (cherry picked from commit 18e5fb50f6b73df7f379e986b701f568dc4af8f9)
    Reviewed-on: https://gerrit.libreoffice.org/37024
    Reviewed-by: Marco Cecchetti <mrcek...@gmail.com>
    Tested-by: Marco Cecchetti <mrcek...@gmail.com>

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index 167960d3..66c2ec8a 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -399,7 +399,7 @@ L.AnnotationManager = L.Class.extend({
        },
 
        add: function (comment) {
-               var annotation = 
L.annotation(this._map.options.maxBounds.getSouthEast(), comment,
+               var annotation = 
L.annotation(this._map._docLayer._twipsToLatLng(comment.anchorPos.getTopRight()),
 comment,
                        comment.id === 'new' ? {noMenu: true} : 
{}).addTo(this._map);
                if (comment.parent && comment.parent > '0') {
                        var parentIdx = this.getIndexOf(comment.parent);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to