Calc: fix following editor on different sheet
If we follow user who does editing on other part - we need to switch to it first. Whitout that we failed with error in the browser console due to missing marker on the screen. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I3d4150f5c8f70240d3a386a8d5a7fdbc4e8d37d9
This commit is contained in:
parent
bf32a3f5dc
commit
11682f1fc8
1 changed files with 6 additions and 1 deletions
|
@ -2577,6 +2577,9 @@ L.CanvasTileLayer = L.Layer.extend({
|
|||
|
||||
goToCellViewCursor: function(viewId) {
|
||||
if (this._cellViewCursors[viewId] && !this._isEmptyRectangle(this._cellViewCursors[viewId].bounds)) {
|
||||
if (this._selectedPart !== this._cellViewCursors[viewId].part)
|
||||
this._map.setPart(this._cellViewCursors[viewId].part);
|
||||
|
||||
if (!this._map.getBounds().contains(this._cellViewCursors[viewId].bounds)) {
|
||||
var mapBounds = this._map.getBounds();
|
||||
var scrollX = 0;
|
||||
|
@ -2604,7 +2607,9 @@ L.CanvasTileLayer = L.Layer.extend({
|
|||
}
|
||||
|
||||
var backgroundColor = L.LOUtil.rgbToHex(this._map.getViewColor(viewId));
|
||||
this._cellViewCursors[viewId].marker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, backgroundColor: backgroundColor, color: 'white', closeButton: false});
|
||||
var marker = this._cellViewCursors[viewId].marker;
|
||||
if (marker)
|
||||
marker.bindPopup(this._map.getViewName(viewId), {autoClose: false, autoPan: false, backgroundColor: backgroundColor, color: 'white', closeButton: false});
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue