@abi-software/flatmapvuer 0.2.4-beta-1 → 0.2.4-beta-5

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/package-lock.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "0.2.4-beta-0",
3
+ "version": "0.2.4-beta-3",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
7
7
  "@abi-software/flatmap-viewer": {
8
- "version": "2.1.0-beta.14",
9
- "resolved": "https://registry.npmjs.org/@abi-software/flatmap-viewer/-/flatmap-viewer-2.1.0-beta.14.tgz",
10
- "integrity": "sha512-WqnMFrfgVRsrIOKhIpudXCa8nO28Xc0WjN5XRrhYM8KU0LBD+QP1kBzTDBgbt/Q6ygiIiCgWvI1Wtoy8Kj5DjQ==",
8
+ "version": "2.2.0-beta.7",
9
+ "resolved": "https://registry.npmjs.org/@abi-software/flatmap-viewer/-/flatmap-viewer-2.2.0-beta.7.tgz",
10
+ "integrity": "sha512-keAB4wn7nEw7eBA9Z4HyODVSbZiKqRk1l40Z9gVQXQ4ZYUwh4MqFZsYNvfdujciBsUj0hrl/mphHNKXAGIOu2g==",
11
11
  "requires": {
12
12
  "@babel/runtime": "^7.10.4",
13
13
  "@turf/area": "^6.0.1",
14
14
  "@turf/bbox": "^6.0.1",
15
15
  "@turf/helpers": "^6.1.4",
16
- "maplibre-gl": "^1.15.2",
17
- "minisearch": "^2.2.1"
16
+ "maplibre-gl": "^2.1.0",
17
+ "minisearch": "^2.2.1",
18
+ "polylabel": "^1.1.0"
18
19
  }
19
20
  },
20
21
  "@abi-software/svg-sprite": {
@@ -1281,20 +1282,15 @@
1281
1282
  "minimist": "^1.2.5"
1282
1283
  }
1283
1284
  },
1284
- "@mapbox/geojson-types": {
1285
- "version": "1.0.2",
1286
- "resolved": "https://registry.npmjs.org/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz",
1287
- "integrity": "sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw=="
1288
- },
1289
1285
  "@mapbox/jsonlint-lines-primitives": {
1290
1286
  "version": "2.0.2",
1291
1287
  "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz",
1292
1288
  "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ="
1293
1289
  },
1294
1290
  "@mapbox/mapbox-gl-supported": {
1295
- "version": "1.5.0",
1296
- "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz",
1297
- "integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg=="
1291
+ "version": "2.0.1",
1292
+ "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz",
1293
+ "integrity": "sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ=="
1298
1294
  },
1299
1295
  "@mapbox/point-geometry": {
1300
1296
  "version": "0.1.0",
@@ -1302,14 +1298,14 @@
1302
1298
  "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI="
1303
1299
  },
1304
1300
  "@mapbox/tiny-sdf": {
1305
- "version": "1.2.5",
1306
- "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.2.5.tgz",
1307
- "integrity": "sha512-cD8A/zJlm6fdJOk6DqPUV8mcpyJkRz2x2R+/fYcWDYG3oWbG7/L7Yl/WqQ1VZCjnL9OTIMAn6c+BC5Eru4sQEw=="
1301
+ "version": "2.0.5",
1302
+ "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz",
1303
+ "integrity": "sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw=="
1308
1304
  },
1309
1305
  "@mapbox/unitbezier": {
1310
- "version": "0.0.0",
1311
- "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz",
1312
- "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4="
1306
+ "version": "0.0.1",
1307
+ "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz",
1308
+ "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw=="
1313
1309
  },
1314
1310
  "@mapbox/vector-tile": {
1315
1311
  "version": "1.3.1",
@@ -6499,11 +6495,6 @@
6499
6495
  "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
6500
6496
  "dev": true
6501
6497
  },
6502
- "grid-index": {
6503
- "version": "1.1.0",
6504
- "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz",
6505
- "integrity": "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA=="
6506
- },
6507
6498
  "gzip-size": {
6508
6499
  "version": "5.1.1",
6509
6500
  "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
@@ -8064,33 +8055,29 @@
8064
8055
  }
8065
8056
  },
8066
8057
  "maplibre-gl": {
8067
- "version": "1.15.2",
8068
- "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-1.15.2.tgz",
8069
- "integrity": "sha512-uPeV530apb4JfX3cRFfE+awFnbcJTOnCv2QvY4mw4huiInbybElWYkNzTs324YLSADq0f4bidRoYcR81ho3aLA==",
8058
+ "version": "2.1.6",
8059
+ "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-2.1.6.tgz",
8060
+ "integrity": "sha512-UHdw4YeCkIyfG7vMdNK6e/sDNPB7jjUN5MUytKE1DFQB7sKM9V19ar1GUyn0uYRvQwJ5iC01fWhH3r/5bbHlKQ==",
8070
8061
  "requires": {
8071
- "@mapbox/geojson-rewind": "^0.5.0",
8072
- "@mapbox/geojson-types": "^1.0.2",
8062
+ "@mapbox/geojson-rewind": "^0.5.1",
8073
8063
  "@mapbox/jsonlint-lines-primitives": "^2.0.2",
8074
- "@mapbox/mapbox-gl-supported": "^1.5.0",
8064
+ "@mapbox/mapbox-gl-supported": "^2.0.1",
8075
8065
  "@mapbox/point-geometry": "^0.1.0",
8076
- "@mapbox/tiny-sdf": "^1.1.1",
8077
- "@mapbox/unitbezier": "^0.0.0",
8066
+ "@mapbox/tiny-sdf": "^2.0.4",
8067
+ "@mapbox/unitbezier": "^0.0.1",
8078
8068
  "@mapbox/vector-tile": "^1.3.1",
8079
8069
  "@mapbox/whoots-js": "^3.1.0",
8080
8070
  "csscolorparser": "~1.0.3",
8081
- "earcut": "^2.2.2",
8071
+ "earcut": "^2.2.3",
8082
8072
  "geojson-vt": "^3.2.1",
8083
- "gl-matrix": "^3.2.1",
8084
- "grid-index": "^1.1.0",
8085
- "minimist": "^1.2.5",
8073
+ "gl-matrix": "^3.4.3",
8086
8074
  "murmurhash-js": "^1.0.0",
8087
8075
  "pbf": "^3.2.1",
8088
- "potpack": "^1.0.1",
8076
+ "potpack": "^1.0.2",
8089
8077
  "quickselect": "^2.0.0",
8090
- "rw": "^1.3.3",
8091
- "supercluster": "^7.1.0",
8078
+ "supercluster": "^7.1.4",
8092
8079
  "tinyqueue": "^2.0.3",
8093
- "vt-pbf": "^3.1.1"
8080
+ "vt-pbf": "^3.1.3"
8094
8081
  }
8095
8082
  },
8096
8083
  "md5.js": {
@@ -9396,6 +9383,14 @@
9396
9383
  "ts-pnp": "^1.1.6"
9397
9384
  }
9398
9385
  },
9386
+ "polylabel": {
9387
+ "version": "1.1.0",
9388
+ "resolved": "https://registry.npmjs.org/polylabel/-/polylabel-1.1.0.tgz",
9389
+ "integrity": "sha512-bxaGcA40sL3d6M4hH72Z4NdLqxpXRsCFk8AITYg6x1rn1Ei3izf00UMLklerBZTO49aPA3CYrIwVulx2Bce2pA==",
9390
+ "requires": {
9391
+ "tinyqueue": "^2.0.3"
9392
+ }
9393
+ },
9399
9394
  "portfinder": {
9400
9395
  "version": "1.0.28",
9401
9396
  "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@@ -10716,11 +10711,6 @@
10716
10711
  "aproba": "^1.1.1"
10717
10712
  }
10718
10713
  },
10719
- "rw": {
10720
- "version": "1.3.3",
10721
- "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
10722
- "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q="
10723
- },
10724
10714
  "rxjs": {
10725
10715
  "version": "6.6.7",
10726
10716
  "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "0.2.4-beta-1",
3
+ "version": "0.2.4-beta-5",
4
4
  "main": "./dist/flatmapvuer.common.js",
5
5
  "files": [
6
6
  "dist/*",
@@ -16,7 +16,7 @@
16
16
  "lint": "vue-cli-service lint"
17
17
  },
18
18
  "dependencies": {
19
- "@abi-software/flatmap-viewer": "^2.1.0-beta.14",
19
+ "@abi-software/flatmap-viewer": "2.2.0-beta.7",
20
20
  "@abi-software/svg-sprite": "^0.1.14",
21
21
  "core-js": "^3.3.2",
22
22
  "css-element-queries": "^1.2.2",
package/src/App.vue CHANGED
@@ -18,7 +18,8 @@
18
18
  </el-popover>
19
19
 
20
20
  <MultiFlatmapVuer ref="multi" :availableSpecies="availableSpecies"
21
- @resource-selected="FlatmapSelected" :minZoom="minZoom"
21
+ @resource-selected="FlatmapSelected" :minZoom="minZoom"
22
+ @pan-zoom-callback="panZoomcallback"
22
23
  @ready="FlatmapReady" :featureInfo="featureInfo" :searchable="searchable"
23
24
  :initial="initial" :pathControls="pathControls" :helpMode="helpMode"
24
25
  :displayMinimap=true :flatmapAPI="flatmapAPI"/>
@@ -58,8 +59,13 @@ export default {
58
59
  FlatmapReady: function(component) {
59
60
  let taxon = component.mapImp.describes;
60
61
  let id = component.mapImp.addMarker("UBERON:0000948", "simulation");
62
+ component.enablePanZoomEvents(true);
63
+ component.showPathwaysDrawer(false);
61
64
  console.log(taxon, id);
62
65
  },
66
+ panZoomcallback: function(payload) {
67
+ console.log(payload);
68
+ }
63
69
  },
64
70
  data: function(){
65
71
  return {
@@ -73,6 +79,7 @@ export default {
73
79
  "Kember":{taxo: "ABI:1000001", displayWarning:true},
74
80
  "Pig":{taxo: "NCBITaxon:9823", iconClass:"icon-mapicon_pig", displayWarning:true},
75
81
  "Cat":{taxo: "NCBITaxon:9685", iconClass:"icon-mapicon_cat", displayWarning:true},
82
+ "digestive tract":{taxo: "digestive tract", displayWarning:true}
76
83
  },
77
84
  tooltipContent: undefined,
78
85
  tStyle: {
@@ -81,9 +88,10 @@ export default {
81
88
  position: "absolute"
82
89
  },
83
90
  displayCloseButton: false,
84
- initial: "Rat",
91
+ initial: "digestive tract",
85
92
  helpMode: false,
86
- flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
93
+ //flatmapAPI: "https://mapcore-demo.org/fccb/flatmap/"
94
+ flatmapAPI: "https://mapcore-demo.org/devel/flatmap/v3/"
87
95
  }
88
96
  },
89
97
  mounted: function() {
@@ -338,24 +338,31 @@ export default {
338
338
  this.mapImp.showPaths(this.checkedItems);
339
339
  }
340
340
  },
341
+ enablePanZoomEvents: function(flag) {
342
+ this.mapImp.enablePanZoomEvents(flag);
343
+ },
341
344
  eventCallback: function() {
342
- return (eventType, feature, ...args) => {
343
- const label = feature.label;
344
- const resource = [feature.models];
345
- const taxonomy = this.entry;
346
- const data = {
347
- dataset: feature.dataset,
348
- taxonomy: taxonomy,
349
- resource: resource,
350
- label: label,
351
- feature: feature,
352
- userData: args,
353
- eventType: eventType
354
- };
355
- // Disable the nueron pop up for now.
356
- if (feature && feature.type !== "marker")
357
- this.checkAndCreatePopups(data);
358
- this.$emit("resource-selected", data);
345
+ return (eventType, data, ...args) => {
346
+ if (eventType !== "pan-zoom") {
347
+ const label = data.label;
348
+ const resource = [data.models];
349
+ const taxonomy = this.entry;
350
+ const payload = {
351
+ dataset: data.dataset,
352
+ taxonomy: taxonomy,
353
+ resource: resource,
354
+ label: label,
355
+ feature: data,
356
+ userData: args,
357
+ eventType: eventType
358
+ };
359
+ // Disable the nueron pop up for now.
360
+ if (data && data.type !== "marker")
361
+ this.checkAndCreatePopups(data);
362
+ this.$emit("resource-selected", payload);
363
+ } else {
364
+ this.$emit("pan-zoom-callback", data);
365
+ }
359
366
  };
360
367
  },
361
368
  // checkNeuronClicked shows a neuron path pop up if a path was recently clicked
@@ -578,6 +585,13 @@ export default {
578
585
  if (this.entry == state.entry) this._viewportToBeSet = state.viewport;
579
586
  }
580
587
  },
588
+ showMinimap: function(flag) {
589
+ if (this.mapImp)
590
+ this.mapImp.showMinimap(flag);
591
+ },
592
+ showPathwaysDrawer: function(flag) {
593
+ this.drawerOpen = flag;
594
+ },
581
595
  /**
582
596
  * Function to display features with annotation matching the provided term.
583
597
  */
@@ -36,6 +36,7 @@
36
36
  :ref="key"
37
37
  @resource-selected="FlatmapSelected"
38
38
  @ready="FlatmapReady"
39
+ @pan-zoom-callback="panZoomCallback"
39
40
  :featureInfo="featureInfo"
40
41
  :minZoom="minZoom"
41
42
  :pathControls="pathControls"
@@ -119,6 +120,9 @@ export default {
119
120
  getCurrentFlatmap: function() {
120
121
  return this.$refs[this.activeSpecies][0];
121
122
  },
123
+ panZoomCallback: function(payload) {
124
+ this.$emit("pan-zoom-callback", payload);
125
+ },
122
126
  showPopup: function(featureId, node, options) {
123
127
  let map = this.getCurrentFlatmap();
124
128
  map.showPopup(featureId, node, options);