Data / Elements#
The methods contained within ‘Data / Elements’ are used to access raw element data for all currently loaded submaps.
getAll#
accepts no arguments
waits until all submaps have finished loading their elements, then resolves
returns a
Promiseresolving to an array ofModelElement, combining the elements of every loaded submapexample:
const elements = await window.minerva.elements.data.getAll();
Changes in version 22.0#
New fields of ModelElement:
mapandsubmap- the id of the map the element belongs to and the submap the element links to; they replacemodelandsubmodelfillColorRgba,borderColorRgbaandfontColorRgba- colors as#RRGGBBAAstrings (example:'#CCFFCCFF'); the samefillColorRgbaandborderColorRgbafields are provided formodificationResiduesfontWeight('NORMAL'or'BOLD') andfontStyle('NORMAL'or'ITALIC')allowUiInteraction- whether the element reacts to user interaction (clicking, hovering)
Deprecated fields, still provided so that plugins written for version 21 keep working:
modelandsubmodel- usemapandsubmapfillColor,borderColorandfontColor- color objects{ alpha, rgb }; use the*Rgbafieldsabbreviationandformula- alwaysnull, the VMH (Recon) annotator that provided them was removed- in
references:annotatorClassName- useannotator, which contains the name of the annotator (example:'HGNC') instead of a Java class name;annotatorClassNamenow contains the same name