Skip to content

Commit

Permalink
Merge pull request #1 from alan-wu/Tehsurfer-gazelle-pop-ups
Browse files Browse the repository at this point in the history
Resolve conflicts and bugs.
  • Loading branch information
Tehsurfer authored Jun 21, 2021
2 parents 47e0920 + 22b5f45 commit be55f96
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abi-software/flatmapvuer",
"version": "0.1.34",
"version": "0.1.32-alpha-1",
"name": "@tehsurfer/flatmapvuer",
"main": "./dist/flatmapvuer.common.js",
"files": [
"dist/*",
Expand Down
17 changes: 7 additions & 10 deletions src/components/FlatmapVuer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default {
const data = { dataset: feature.dataset, taxonomy: taxonomy, resource: resource, label: label,
feature: feature, userData: args, eventType: eventType};
//this.simulateClickCallback(data.resource[0])
this.checkPopups(data)
this.checkAndCreatePopups(data)
this.$emit("resource-selected", data);
}
},
Expand All @@ -219,17 +219,12 @@ export default {
this.setTimeoutId = setTimeout( ()=>{this.lastHover = undefined}, 1400)
},
// checkNeuronClicked shows a neuron path pop up if a path was recently clicked
checkPopups: function(data){
window.mapImp = this.mapImp
if (data.eventType == 'click' && this.createTooltipFromNeuronCuration(data)){
this.createPopup(data)
checkAndCreatePopups: function(data){
if (data.eventType == 'click' && this.createTooltipFromNeuronCuration(data)) {
this.mapImp.showPopup(this.mapImp.modelFeatureIds(data.resource[0])[0],this.$refs.tooltip.$el)
this.popUpCssHack()
}
},
createPopup: function(data){
this.createTooltipFromNeuronCuration(data)
this.mapImp.showPopup(this.mapImp.modelFeatureIds(data.resource[0])[0],this.$refs.tooltip.$el)
this.popUpCssHack()
},
popUpCssHack: function(){
// Below is a hack to remove flatmap tooltips while popup is open
let ftooltip = document.querySelector('.flatmap-tooltip-popup')
Expand Down Expand Up @@ -524,6 +519,7 @@ export default {
mounted: function() {
const flatmap = require("@abi-software/flatmap-viewer");
let endpoint = this.flatmapAPI;
console.log(endpoint)
if (!endpoint)
endpoint = "https://mapcore-demo.org/flatmaps/";
this.mapManager = new flatmap.MapManager(endpoint);
Expand Down Expand Up @@ -727,6 +723,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 12px;
}

>>> .mapboxgl-popup.flatmap-marker-popup{
Expand Down
14 changes: 14 additions & 0 deletions src/nerve-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export default {
}],
},
'UBERON:0018675': {
title: 'Pelvic splanchnic nerve', components: undefined, start: undefined, distribution: undefined, actions: [{
title: "View Source",
resource: "https://doi.org/10.1002/ca.23296",
type: "URL"
}],
},
'UBERON:0018683': {
title: 'Lumbar splanchnic nerve', components: undefined, start: undefined, distribution: undefined, actions: [{
title: "View Source",
resource: "https://doi.org/10.1002/ca.23296",
Expand All @@ -53,6 +60,13 @@ export default {
type: "URL"
}],
},
'UBERON:0005303': {
title: 'Hypogastric nerve', components: undefined, start: undefined, distribution: undefined, actions: [{
title: "View Source",
resource: "https://doi.org/10.1002/ca.23296",
type: "URL"
}],
},
'UBERON:0001759': {
title: 'Vagus nerve', components: undefined, start: undefined, distribution: undefined, actions: [{
title: "View Source",
Expand Down

0 comments on commit be55f96

Please sign in to comment.