Skip to content

Commit

Permalink
Request comment positions when zooming/view reset
Browse files Browse the repository at this point in the history
The twips coordinates sent by core in CommentsPos message are already
correct w.r.t zoom level (See ScModelObj::getPostItsPos() in core.git).
In addition these values are view specific (each client user).

Change-Id: I18c2971f34362de0eba5181f9dbe3e662c223575
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86986
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
  • Loading branch information
dennisfrancis committed Jan 18, 2020
1 parent b72f378 commit 3af2346
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions loleaflet/src/layer/tile/CalcTileLayer.js
Expand Up @@ -577,6 +577,7 @@ L.CalcTileLayer = L.TileLayer.extend({
this._sendClientZoom();
// TODO: test it!
this._map.fire('updaterowcolumnheaders');
this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
},

_onUpdateCurrentHeader: function() {
Expand Down
3 changes: 3 additions & 0 deletions loleaflet/src/layer/tile/GridLayer.js
Expand Up @@ -322,6 +322,9 @@ L.GridLayer = L.Layer.extend({

_viewReset: function (e) {
this._reset(this._map.getCenter(), this._map.getZoom(), e && e.hard);
if (this._docType === 'spreadsheet' && this._annotations !== 'undefined') {
this._map._socket.sendMessage('commandvalues command=.uno:ViewAnnotationsPosition');
}
},

_animateZoom: function (e) {
Expand Down

0 comments on commit 3af2346

Please sign in to comment.