Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 1d589df

Browse files
committed
Fix "discrete" parameter passing.
Fix small Open Layer map not showing when panel is hidden.
1 parent 591fa7c commit 1d589df

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

core/src/plugins/gui.ajax/res/js/es6/model/RemoteNodeProvider.es6

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class RemoteNodeProvider{
6262
params['recursive'] = true;
6363
params['depth'] = depth;
6464
}
65-
//if(this.discrete) conn.discrete = true;
6665
var path = node.getPath();
6766
// Double encode # character
6867
var paginationHash;
@@ -85,7 +84,7 @@ class RemoteNodeProvider{
8584
var complete = function (transport){
8685
this.parseNodes(node, transport, nodeCallback, childCallback);
8786
}.bind(this);
88-
PydioApi.getClient().request(params, complete);
87+
PydioApi.getClient().request(params, complete, null, {discrete:this.discrete});
8988
}
9089

9190
/**

core/src/plugins/meta.exif/class.ExifCellRenderer.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,23 @@ Class.create("ExifCellRenderer", {
8484
metadata.set('ol_center', {latitude:parseFloat(latiCell.getAttribute('latiDegree')),longitude:parseFloat(longiCell.getAttribute("longiDegree"))});
8585
var id = "small_map_" + Math.random();
8686
latiCell.up('div.infoPanelTable').insert({top:'<div id="'+id+'" style="height: 250px;"></div>'});
87+
var testDim = $(id).getDimensions();
88+
if(testDim.width == 0 && testDim.height == 0){
89+
// seems like it's not visible. We are probably inside a tab, try to listen to tab switches
90+
var tab = latiCell.up('div[ajxpClass="AjxpTabulator"]');
91+
if(tab && tab.ajxpPaneObject){
92+
var object = tab.ajxpPaneObject;
93+
object.observeOnce("switch", function(tabId){
94+
if($(id).getDimensions().width != 0){
95+
pydio.Registry.loadEditorResources(editorData.resourcesManager);
96+
OLViewer.prototype.createOLMap(ajxpNode, id, false, false);
97+
}
98+
});
99+
}else{
100+
// Silently fail, otherwise it will trigger an OpenLayer Error
101+
}
102+
return;
103+
}
87104
pydio.Registry.loadEditorResources(editorData.resourcesManager);
88105
OLViewer.prototype.createOLMap(ajxpNode, id, false, false);
89106
}

0 commit comments

Comments
 (0)