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

Commit

Permalink
Fix "discrete" parameter passing.
Browse files Browse the repository at this point in the history
Fix small Open Layer map not showing when panel is hidden.
  • Loading branch information
cdujeu committed Oct 24, 2015
1 parent 591fa7c commit 1d589df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Expand Up @@ -62,7 +62,6 @@ class RemoteNodeProvider{
params['recursive'] = true;
params['depth'] = depth;
}
//if(this.discrete) conn.discrete = true;
var path = node.getPath();
// Double encode # character
var paginationHash;
Expand All @@ -85,7 +84,7 @@ class RemoteNodeProvider{
var complete = function (transport){
this.parseNodes(node, transport, nodeCallback, childCallback);
}.bind(this);
PydioApi.getClient().request(params, complete);
PydioApi.getClient().request(params, complete, null, {discrete:this.discrete});
}

/**
Expand Down
17 changes: 17 additions & 0 deletions core/src/plugins/meta.exif/class.ExifCellRenderer.js
Expand Up @@ -84,6 +84,23 @@ Class.create("ExifCellRenderer", {
metadata.set('ol_center', {latitude:parseFloat(latiCell.getAttribute('latiDegree')),longitude:parseFloat(longiCell.getAttribute("longiDegree"))});
var id = "small_map_" + Math.random();
latiCell.up('div.infoPanelTable').insert({top:'<div id="'+id+'" style="height: 250px;"></div>'});
var testDim = $(id).getDimensions();
if(testDim.width == 0 && testDim.height == 0){
// seems like it's not visible. We are probably inside a tab, try to listen to tab switches
var tab = latiCell.up('div[ajxpClass="AjxpTabulator"]');
if(tab && tab.ajxpPaneObject){
var object = tab.ajxpPaneObject;
object.observeOnce("switch", function(tabId){
if($(id).getDimensions().width != 0){
pydio.Registry.loadEditorResources(editorData.resourcesManager);
OLViewer.prototype.createOLMap(ajxpNode, id, false, false);
}
});
}else{
// Silently fail, otherwise it will trigger an OpenLayer Error
}
return;
}
pydio.Registry.loadEditorResources(editorData.resourcesManager);
OLViewer.prototype.createOLMap(ajxpNode, id, false, false);
}
Expand Down

0 comments on commit 1d589df

Please sign in to comment.