Commit 732660be authored by Piotr Gawron's avatar Piotr Gawron
Browse files

list of overview images is available via plugin api

parent 6ef6c086
......@@ -37,6 +37,7 @@ var Promise = require("bluebird");
* @property {function(): *} getDisease
* @property {function(): *} getOrganism
* @property {function(): *[]} getModels
* @property {function(): *[]} getOverviewImages
* @property {function(): DataOverlay[]} getDataOverlays
*/
......@@ -284,6 +285,19 @@ function createProjectData(options) {
});
}
return result;
},
getOverviewImages: function () {
var result = [];
for (var i = 0; i < map.getProject().getOverviewImages().length; i++) {
var image = map.getProject().getOverviewImages()[i];
result.push({
id: image.idObject,
filename: image.filename,
width: image.width,
height: image.height
});
}
return result;
}
};
}
......
......@@ -533,6 +533,16 @@ describe('MinervaPluginProxy', function () {
});
});
it("getOverviewImages", function () {
helper.setUrl("http://test/?id=complex_model_with_images");
return ServerConnector.getProject().then(function (project) {
var map = helper.createCustomMap(project);
var proxy = createProxy(map);
assert.ok(proxy.project.data.getOverviewImages().length > 0);
map.destroy();
});
});
describe("plugin params", function () {
it("getGlobalParam", function () {
var map;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment