[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Thu Apr 27 11:05:47 UTC 2017


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

New commits:
commit 4cdc50c0e2934802c342e01661db7af33da3d6c9
Author: Pranav Kant <pranavk at 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 <mrcekets at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at 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);


More information about the Libreoffice-commits mailing list