Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
732660be
Commit
732660be
authored
Mar 08, 2019
by
Piotr Gawron
Browse files
list of overview images is available via plugin api
parent
6ef6c086
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/plugin/MinervaPluginProxy.js
View file @
732660be
...
...
@@ -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
;
}
};
}
...
...
frontend-js/src/test/js/plugin/MinervaPluginProxy-test.js
View file @
732660be
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment