@abi-software/flatmap-viewer 2.2.6 → 2.2.7
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/README.rst +1 -1
- package/package.json +1 -1
- package/src/flatmap-viewer.js +6 -10
package/README.rst
CHANGED
|
@@ -38,7 +38,7 @@ The map server endpoint is specified as ``MAP_ENDPOINT`` in ``src/main.js``. It
|
|
|
38
38
|
Package Installation
|
|
39
39
|
====================
|
|
40
40
|
|
|
41
|
-
* ``npm install @abi-software/flatmap-viewer@2.2.
|
|
41
|
+
* ``npm install @abi-software/flatmap-viewer@2.2.7``
|
|
42
42
|
|
|
43
43
|
Documentation
|
|
44
44
|
-------------
|
package/package.json
CHANGED
package/src/flatmap-viewer.js
CHANGED
|
@@ -1095,10 +1095,13 @@ export class MapManager
|
|
|
1095
1095
|
let latestMap = null;
|
|
1096
1096
|
let lastCreatedTime = '';
|
|
1097
1097
|
for (const map of this._mapList) {
|
|
1098
|
-
if ('uuid' in map && mapDescribes === map.uuid
|
|
1098
|
+
if (('uuid' in map && mapDescribes === map.uuid
|
|
1099
1099
|
|| mapDescribes === map.id
|
|
1100
1100
|
|| 'taxon' in map && mapDescribes === map.taxon
|
|
1101
|
-
|| mapDescribes === map.source)
|
|
1101
|
+
|| mapDescribes === map.source)
|
|
1102
|
+
&& (!('biologicalSex' in identifier)
|
|
1103
|
+
|| ('biologicalSex' in map
|
|
1104
|
+
&& identifier.biologicalSex === map.biologicalSex))) {
|
|
1102
1105
|
if ('created' in map) {
|
|
1103
1106
|
if (lastCreatedTime < map.created) {
|
|
1104
1107
|
lastCreatedTime = map.created;
|
|
@@ -1110,13 +1113,6 @@ export class MapManager
|
|
|
1110
1113
|
}
|
|
1111
1114
|
}
|
|
1112
1115
|
}
|
|
1113
|
-
if (latestMap !== null) {
|
|
1114
|
-
if ('biologicalSex' in identifier
|
|
1115
|
-
&& 'biologicalSex' in latestMap
|
|
1116
|
-
&& identifier.biologicalSex !== latestMap.biologicalSex) {
|
|
1117
|
-
latestMap = null;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
1116
|
return latestMap;
|
|
1121
1117
|
}
|
|
1122
1118
|
|
|
@@ -1140,7 +1136,7 @@ export class MapManager
|
|
|
1140
1136
|
* @arg identifier.taxon {string} The taxon identifier of the species represented by the map. This is
|
|
1141
1137
|
* specified as metadata in the map's source file.)
|
|
1142
1138
|
* @arg identifier.biologicalSex {string} The biological sex of the species represented by the map.
|
|
1143
|
-
* This is specified as
|
|
1139
|
+
* This is specified as metadata in the map's source file.)
|
|
1144
1140
|
* @arg identifier.uuid {string} The unique uuid the flatmap. If given then this exact map will
|
|
1145
1141
|
* be loaded, overriding ``taxon`` and ``biologicalSex``.
|
|
1146
1142
|
* @arg container {string} The id of the HTML container in which to display the map.
|