MINERVA
Platform Documentation

Interface#

The methods in the window.minerva.interface object control the side panels of MINERVA. At most one panel can be open at a time. Panel names:

The legend is not a panel, see Legend. Opening and closing panels triggers the onPanelOpen and onPanelClose events, see Events.

getOpenedPanel#

Returns the name of the currently open panel, or undefined if no panel is open.

Example of getOpenedPanel method usage:#
window.minerva.interface.getOpenedPanel(); // 'search', 'layers', undefined, ...

hidePanel#

Closes the specified panel if it is currently open, or closes whichever panel is open when undefined is passed.

Example of hidePanel method usage:#
//close specific panel if the panel is opened
window.minerva.interface.hidePanel('available-plugins');

//close the panel (regardless which one is opened)
window.minerva.interface.hidePanel(undefined);

openPanel#

Opens the specified panel. The 'reaction', 'bio-entity' and 'comment' panels show a single object, so they require a second argument with the id of the object to show:

Called without the second argument, as in version 21, these panels are opened empty.

Example of openPanel method usage:#
window.minerva.interface.openPanel('available-plugins');

window.minerva.interface.openPanel('reaction', { reactionId: 15328 });

window.minerva.interface.openPanel('bio-entity', { elementId: 5053708 });

window.minerva.interface.openPanel('comment', { commentId: 42 });

Deprecated panel names#

The following names accepted in version 21 are still accepted by openPanel and hidePanel, but getOpenedPanel never returns them: