Skip to content

Commit

Permalink
Add props to display and customis the latest changes message.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed Aug 18, 2022
1 parent c624194 commit 494c3d8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
15 changes: 12 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abi-software/flatmapvuer",
"version": "0.3.2",
"version": "0.3.3",
"main": "./dist/flatmapvuer.common.js",
"files": [
"dist/*",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default {
pathControls: true,
minZoom: 4,
availableSpecies : {"Human":{taxo: "NCBITaxon:9606", iconClass:"mapicon-icon_human", displayWarning:true},
"Rat":{taxo: "NCBITaxon:10114", iconClass:"mapicon-icon_rat", displayWarning:false},
"Rat":{taxo: "NCBITaxon:10114", iconClass:"mapicon-icon_rat", displayWarning:false, displayLatestChanges:true},
"Mouse":{taxo: "NCBITaxon:10090", iconClass:"mapicon-icon_mouse", displayWarning:true},
"Kember":{taxo: "ABI:1000001", displayWarning:true},
"Pig":{taxo: "NCBITaxon:9823", iconClass:"mapicon-icon_pig", displayWarning:true},
Expand Down
25 changes: 15 additions & 10 deletions src/components/FlatmapVuer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<el-popover
:content="warningMessage"
placement="right"
v-if="displayWarning"
:appendToBody="false"
trigger="manual"
popper-class="warning-popper flatmap-popper right-popper"
Expand All @@ -23,7 +22,7 @@
></el-popover>
<i
class="el-icon-warning warning-icon"
v-if="displayWarning"
v-if="displayWarning && warningMessage"
@mouseover="showToolitip(6)"
@mouseout="hideToolitip(6)"
v-popover:warningPopover
Expand All @@ -43,7 +42,7 @@
></el-popover>
<i
class="el-icon-warning latest-changesicon"
v-if="displayLatestChanges"
v-if="displayLatestChanges && latestChangesMessage"
@mouseover="showToolitip(7)"
@mouseout="hideToolitip(7)"
v-popover:latestChangesPopover
Expand Down Expand Up @@ -683,18 +682,26 @@ export default {
type: Boolean,
default: true
},
displayWarning: {
type: Boolean,
default: true
},
displayMinimap: {
type: Boolean,
default: false
},
displayWarning: {
type: Boolean,
default: true
},
warningMessage: {
type: String,
default: "Beta feature - This map is based on the connectivity of a rat. New connectivity and species specificity will be added as the SPARC program progress."
},
displayLatestChanges: {
type: Boolean,
default: false,
},
latestChangesMessage: {
type: String,
default: "Bladder connectivity can now be explored and searched on when selected! To see it, click on any of the paths coming from the bladder. Other pathways will be searchable soon.",
},
/**
* State containing state of the flatmap.
*/
Expand All @@ -712,7 +719,7 @@ export default {
sparcAPI: {
type: String,
default: "https://api.sparc.science/"
}
},
},
provide() {
return {
Expand All @@ -737,8 +744,6 @@ export default {
{ value: false }
],
inHelp: false,
displayLatestChanges: true,
latestChangesMessage: "Bladder connectivity can now be explored and searched on when selected! To see it, click on any of the paths coming from the bladder. Other pathways will be searchable soon.",
currentBackground: "white",
availableBackground: ["white", "lightskyblue", "black"],
loading: false,
Expand Down
2 changes: 2 additions & 0 deletions src/components/MultiFlatmapVuer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
:entry="item.taxo"
:displayWarning="item.displayWarning"
:warningMessage="warningMessage"
:displayLatestChanges="item.displayLatestChanges"
:latestChangesMessage="item.latestChangesMessage"
:ref="key"
@resource-selected="FlatmapSelected"
@ready="FlatmapReady"
Expand Down

0 comments on commit 494c3d8

Please sign in to comment.