@abi-software/flatmapvuer 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flatmapvuer.common.js +1382 -989
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +1382 -989
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +1 -1
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +2995 -2718
- package/package.json +2 -2
- package/src/App.vue +4 -3
- package/src/components/FlatmapVuer.vue +44 -19
- package/src/components/MultiFlatmapVuer.vue +12 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"main": "./dist/flatmapvuer.common.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"lint": "vue-cli-service lint"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@abi-software/flatmap-viewer": "^2.2.
|
|
24
|
+
"@abi-software/flatmap-viewer": "^2.2.7",
|
|
25
25
|
"@abi-software/svg-sprite": "^0.1.14",
|
|
26
26
|
"core-js": "^3.3.2",
|
|
27
27
|
"css-element-queries": "^1.2.2",
|
package/src/App.vue
CHANGED
|
@@ -74,8 +74,9 @@ export default {
|
|
|
74
74
|
searchable: true,
|
|
75
75
|
pathControls: true,
|
|
76
76
|
minZoom: 4,
|
|
77
|
-
availableSpecies : {
|
|
78
|
-
"Human
|
|
77
|
+
availableSpecies : {
|
|
78
|
+
"Human Female":{taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass:"mapicon-icon_human", displayWarning:true},
|
|
79
|
+
"Human Male":{taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass:"mapicon-icon_human", displayWarning:true},
|
|
79
80
|
"Rat":{taxo: "NCBITaxon:10114", iconClass:"mapicon-icon_rat", displayWarning:false, displayLatestChanges:true},
|
|
80
81
|
"Mouse":{taxo: "NCBITaxon:10090", iconClass:"mapicon-icon_mouse", displayWarning:true},
|
|
81
82
|
"Kember":{taxo: "ABI:1000001", displayWarning:true},
|
|
@@ -95,7 +96,7 @@ export default {
|
|
|
95
96
|
helpMode: false,
|
|
96
97
|
//flatmapAPI: "https://mapcore-demo.org/current/flatmap/v2/"
|
|
97
98
|
//flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
|
|
98
|
-
|
|
99
|
+
flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
|
|
99
100
|
// flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v1/"
|
|
100
101
|
}
|
|
101
102
|
},
|
|
@@ -378,10 +378,10 @@ export default {
|
|
|
378
378
|
const label = data.label;
|
|
379
379
|
const resource = [data.models];
|
|
380
380
|
const taxonomy = this.entry;
|
|
381
|
-
const
|
|
381
|
+
const biologicalSex = this.biologicalSex;
|
|
382
382
|
const payload = {
|
|
383
383
|
dataset: data.dataset,
|
|
384
|
-
|
|
384
|
+
biologicalSex: biologicalSex,
|
|
385
385
|
taxonomy: taxonomy,
|
|
386
386
|
resource: resource,
|
|
387
387
|
label: label,
|
|
@@ -566,7 +566,7 @@ export default {
|
|
|
566
566
|
if (this.mapImp) {
|
|
567
567
|
let state = {
|
|
568
568
|
entry: this.entry,
|
|
569
|
-
|
|
569
|
+
biologicalSex: this.biologicalSex,
|
|
570
570
|
viewport: this.mapImp.getState()
|
|
571
571
|
};
|
|
572
572
|
return state;
|
|
@@ -575,11 +575,13 @@ export default {
|
|
|
575
575
|
},
|
|
576
576
|
setState: function(state) {
|
|
577
577
|
if (state) {
|
|
578
|
-
if (this.mapImp &&
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
578
|
+
if (this.mapImp &&
|
|
579
|
+
(state.entry && (this.entry == state.entry)) &&
|
|
580
|
+
(!state.biologicalSex || (state.biologicalSex === this.biologicalSex)))
|
|
581
|
+
{
|
|
582
|
+
if (state.viewport) {
|
|
583
|
+
this.mapImp.setState(state.viewport);
|
|
584
|
+
}
|
|
583
585
|
} else {
|
|
584
586
|
this.createFlatmap(state);
|
|
585
587
|
}
|
|
@@ -593,15 +595,41 @@ export default {
|
|
|
593
595
|
minimap = { position: "top-right" };
|
|
594
596
|
}
|
|
595
597
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
598
|
+
//As for flatmap-viewer@2.2.6, see belowf for the documentation
|
|
599
|
+
//for the identifier:
|
|
600
|
+
|
|
601
|
+
//@arg identifier {string|Object}
|
|
602
|
+
// A string or object identifying the map to load. If a string its
|
|
603
|
+
// value can be either the map's ``uuid``, assigned at generation time,
|
|
604
|
+
// or taxon and biological sex identifiers of the species that the map
|
|
605
|
+
// represents. The latest version of a map is loaded unless it has been
|
|
606
|
+
// identified using a ``uuid`` (see below).
|
|
607
|
+
// @arg identifier.taxon {string} The taxon identifier of the species
|
|
608
|
+
// represented by the map. This is specified as metadata in the map's source file.
|
|
609
|
+
// @arg identifier.biologicalSex {string} The biological sex of the species
|
|
610
|
+
// represented by the map. This is specified as metadatain the map's source file.
|
|
611
|
+
// @arg identifier.uuid {string} The unique uuid the flatmap. If given then this exact map will
|
|
612
|
+
// be loaded, overriding ``taxon`` and ``biologicalSex``.
|
|
613
|
+
|
|
614
|
+
let identifier = { taxon: this.entry };
|
|
615
|
+
if (state && state.entry) {
|
|
616
|
+
identifier.taxon = state.entry;
|
|
617
|
+
if (state.biologicalSex) {
|
|
618
|
+
identifier["biologicalSex"] = state.biologicalSex;
|
|
619
|
+
} else if (identifier.taxon === "NCBITaxon:9606") {
|
|
620
|
+
//For backward compatibility
|
|
621
|
+
identifier["biologicalSex"] ="PATO:0000384";
|
|
622
|
+
}
|
|
623
|
+
} else {
|
|
624
|
+
// Set the bioloicalSex now if map is not resumed from
|
|
625
|
+
// a saved state
|
|
626
|
+
if (this.biologicalSex) {
|
|
627
|
+
identifier["biologicalSex"] = this.biologicalSex;
|
|
628
|
+
}
|
|
601
629
|
}
|
|
602
630
|
|
|
603
631
|
let promise1 = this.mapManager.loadMap(
|
|
604
|
-
|
|
632
|
+
identifier,
|
|
605
633
|
this.$refs.display,
|
|
606
634
|
this.eventCallback(),
|
|
607
635
|
{
|
|
@@ -633,7 +661,7 @@ export default {
|
|
|
633
661
|
this.mapImp.setState(state.viewport);
|
|
634
662
|
});
|
|
635
663
|
} else if (state) {
|
|
636
|
-
if (
|
|
664
|
+
if (this.entry == state.entry)
|
|
637
665
|
this._viewportToBeSet = state.viewport;
|
|
638
666
|
}
|
|
639
667
|
},
|
|
@@ -675,7 +703,7 @@ export default {
|
|
|
675
703
|
},
|
|
676
704
|
props: {
|
|
677
705
|
entry: String,
|
|
678
|
-
|
|
706
|
+
biologicalSex: String,
|
|
679
707
|
featureInfo: {
|
|
680
708
|
type: Boolean,
|
|
681
709
|
default: false
|
|
@@ -780,9 +808,6 @@ export default {
|
|
|
780
808
|
entry: function() {
|
|
781
809
|
if (!this.state) this.createFlatmap();
|
|
782
810
|
},
|
|
783
|
-
flatmapId: function() {
|
|
784
|
-
if (!this.state) this.createFlatmap();
|
|
785
|
-
},
|
|
786
811
|
helpMode: function(val) {
|
|
787
812
|
this.setHelpMode(val);
|
|
788
813
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:showLayer="showLayer"
|
|
32
32
|
v-show="activeSpecies==key"
|
|
33
33
|
:entry="item.taxo"
|
|
34
|
-
:
|
|
34
|
+
:biologicalSex="item.biologicalSex"
|
|
35
35
|
:displayWarning="item.displayWarning"
|
|
36
36
|
:warningMessage="warningMessage"
|
|
37
37
|
:displayLatestChanges="item.displayLatestChanges"
|
|
@@ -88,18 +88,20 @@ export default {
|
|
|
88
88
|
fetch(this.flatmapAPI)
|
|
89
89
|
.then(response => response.json())
|
|
90
90
|
.then(data => {
|
|
91
|
-
this.
|
|
91
|
+
this.speciesList= {};
|
|
92
92
|
Object.keys(this.availableSpecies).forEach(key => {
|
|
93
93
|
for (let i = 0; i < data.length; i++) {
|
|
94
|
-
if (this.availableSpecies[key].id === data[i].id) {
|
|
95
|
-
this.speciesList[key] = this.availableSpecies[key];
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
94
|
if (this.availableSpecies[key].taxo === data[i].taxon) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
if (this.availableSpecies[key].biologicalSex) {
|
|
96
|
+
if (data[i].biologicalSex &&
|
|
97
|
+
data[i].biologicalSex === this.availableSpecies[key].biologicalSex) {
|
|
98
|
+
this.speciesList[key] = this.availableSpecies[key];
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
this.speciesList[key] = this.availableSpecies[key];
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
});
|