browser: preview: remove accessor hack
Change-Id: Id936503eade75aba9d9a4772a9dcdd3e5ed4742f Signed-off-by: Henry Castro <hcastro@collabora.com>pull/8880/head
parent
df0ec74f9c
commit
c2f4c999ae
|
@ -50,8 +50,6 @@ L.Control.PartsPreview = L.Control.extend({
|
|||
(!window.mode.isDesktop() && L.DomUtil.isPortrait() ? 'x' : 'y') :
|
||||
this.options.axis;
|
||||
this._scrollY = 0;
|
||||
// Hack for access this function outside of this class
|
||||
map.isPreviewVisible = L.bind(this._isPreviewVisible, this);
|
||||
|
||||
map.on('updateparts', this._updateDisabled, this);
|
||||
map.on('updatepart', this._updatePart, this);
|
||||
|
|
|
@ -149,6 +149,9 @@ L.Map.include({
|
|||
if (!this._docLayer._canonicalIdInitialized)
|
||||
return;
|
||||
|
||||
if (!this._docLayer._preview)
|
||||
return;
|
||||
|
||||
if (this._previewRequestsOnFly > 1) {
|
||||
// we don't always get a response for each tile requests
|
||||
// especially when we have more than one view
|
||||
|
@ -172,7 +175,7 @@ L.Map.include({
|
|||
var tile = this._previewQueue.shift();
|
||||
if (!tile)
|
||||
break;
|
||||
var isVisible = this.isPreviewVisible(tile[0], true);
|
||||
var isVisible = this._docLayer._preview._isPreviewVisible(tile[0], true);
|
||||
if (isVisible != true)
|
||||
// skip this! we can't see it
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue