MultiFlatmapVuer
A vue component to show a flatmap from the list of multiple flatmap data.
Props
Name | Description | Type | Required | Default |
---|---|---|---|---|
initial | Initial species for the flatmap. This value will be ignored if a valid state object is provided. | string | false | '' |
minZoom | The minimum zoom level of the map. | number | false | 1 |
renderAtMounted | The option to create map on component mounted. | boolean | false | false |
helpMode | The option to show tooltips for help mode. | boolean | false | false |
helpModeActiveItem | The active item index of help mode. | number | false | 0 |
helpModeDialog | The option to use helpModeDialog. On default, false , clicking help will show all tooltips. If true , clicking help will show the help-mode-dialog. | boolean | false | false |
helpModeLastItem | The last item of help mode. | boolean | false | false |
displayMinimap | The option to display minimap at the top-right corner of the map. | boolean | false | false |
showStarInLegend | The option to show star in legend area. | boolean | false | false |
enableOpenMapUI | Flag to determine rather open map UI should be presented or not. | boolean | false | false |
openMapOptions | The data to show different map options. Available at the bottom-left corner ("Open new map" tooltip). | array | false | - |
availableSpecies | The available species data for different maps. This data is used for multi flatmaps. | object | false | { 'Human Female': { taxo: 'NCBITaxon:9606', biologicalSex: 'PATO:0000383', iconClass: 'mapicon-icon_human', displayWarning: true, }, 'Human Male': { taxo: 'NCBITaxon:9606', biologicalSex: 'PATO:0000384', iconClass: 'mapicon-icon_human', displayWarning: true, }, Rat: { taxo: 'NCBITaxon:10114', iconClass: 'mapicon-icon_rat', displayLatestChanges: true, }, Mouse: { taxo: 'NCBITaxon:10090', iconClass: 'mapicon-icon_mouse', displayWarning: true, }, Pig: { taxo: 'NCBITaxon:9823', iconClass: 'mapicon-icon_pig', displayWarning: true, }, Cat: { taxo: 'NCBITaxon:9685', iconClass: 'mapicon-icon_cat', displayWarning: true, }, } |
state | State containing state of the flatmap. | object | false | undefined |
flatmapAPI | Specify the endpoint of the flatmap server. | string | false | 'https://mapcore-demo.org/current/flatmap/v3/' |
sparcAPI | Specify the endpoint of the SPARC API. | string | false | 'https://api.sparc.science/' |
disableUI | Flag to disable UIs on Map | boolean | false | false |
connectivityInfoSidebar | The option to show connectivity information in sidebar | boolean | false | false |
annotationSidebar | The option to show connectivity information in sidebar | boolean | false | false |
Events
Event Name | Description | Parameters |
---|---|---|
open-map | This event is emitted when the user chooses a different map option from openMapOptions props. | $event |
open-pubmed-url | This event is emitted when the user clicks on "Open publications in pubmed" button from provenance popup. | url |
resource-selected | This event is emitted by resourceSelected method. | - |
ready | This event is emitted by FlatmapReady method after the flatmap is loaded. | component |
pan-zoom-callback | The event emitted by panZoomCallback method. | payload |
annotation-close | - | - |
annotation-open | - | - |
connectivity-info-close | - | - |
connectivity-info-open | - | - |
pathway-selection-changed | - | - |
flatmapChanged | This event is emitted by setSpecies method. Emitted on first load and when user changes species. | activeSpecies |
help-mode-last-item | - | - |
shown-tooltip | This event is emitted after a tooltip in Flatmap is shown. | - |
shown-map-tooltip | This event is emitted after a tooltip on Flatmap's map is shown. | - |
Methods
Method | Description | Parameters |
---|---|---|
initialise | Function to initialise the component when mounted. It returns a promise. | - |
resourceSelected | Function to emit resource-selected event with provided resource . | action |
FlatmapReady | Function to emit ready event after the flatmap is loaded. | component |
getCurrentFlatmap | Function to get the current active map. | - |
panZoomCallback | Function to emit pan-zoom-callback event from the event emitted in callback function from MapManager.loadMap() . | payload |
showPopup | Function to show popup on map. | featureId , node , options |
showMarkerPopup | Function to show marker popup. | featureId , node , options |
setSpecies | Function to set species. This function is called on the first load and when user changes the species. | species , state , numberOfRetry |
getState | Function used for getting the current states of the scene. This exported states can be imported using the importStates method. | - |
setState | Function used for importing the states of the scene. This exported states can be imported using the read states method. | state |
activateTooltipByIndex | Function to activate help mode tooltip by item index number | index |
onHelpModeLastItem | Function to check the last item of help mode | isLastItem |
onTooltipShown | Function to emit event after a tooltip is shown. | - |
onMapTooltipShown | Function to emit event after a tooltip on the map is shown. | - |
changeViewingMode | Function to change the view mode of the map. | modeName |