summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-04-27 16:09:14 +0530
committerMarco Cecchetti <mrcekets@gmail.com>2017-04-27 13:05:28 +0200
commit4cdc50c0e2934802c342e01661db7af33da3d6c9 (patch)
tree8c83acae4cdd0ecb504ba441e5e0952b02f3420d
parentd88496d2a4cb6123be5b8ad7ddf0c9a4a1f2a3db (diff)
loleaflet: Set correct initial position of the comment2.1-rc4
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@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
-rw-r--r--loleaflet/src/layer/AnnotationManager.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index 167960d33..66c2ec8aa 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);