@abi-software/flatmapvuer 1.1.0 → 1.1.1

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="container">
2
+ <div class="selections-container">
3
3
  <el-row>
4
4
  <el-col :span="12">
5
5
  <div class="title-text">Systems</div>
@@ -119,6 +119,10 @@ export default {
119
119
 
120
120
  <style lang="scss" scoped>
121
121
 
122
+ .selections-container {
123
+ padding-top: 5px;
124
+ }
125
+
122
126
  .checkbox-container {
123
127
  display: flex;
124
128
  cursor: pointer;
@@ -163,6 +167,7 @@ export default {
163
167
  background: #ffffff;
164
168
  margin-top: 6px;
165
169
  scrollbar-width: thin;
170
+ overflow: hidden;
166
171
 
167
172
  :deep(.el-tree) {
168
173
  max-height: 240px;
@@ -275,11 +275,32 @@ let FlatmapQueries = function () {
275
275
  }
276
276
  }
277
277
 
278
- this.createLabelFromNeuralNode = function (node, lookUp, isSingle=true) {
279
- if (isSingle) {
280
- return lookUp[node]
278
+ // This function is used to determine if a node is a single node or a node with multiple children
279
+ // Returns the id of the node if it is a single node, otherwise returns false
280
+ this.findIfNodeIsSingle = function (node) {
281
+ if (node.length === 1) { // If the node is in the form [id]
282
+ console.error("Server returns a single node", node)
283
+ return node[0]
284
+ } else {
285
+ if (node.length === 2 && node[1].length === 0) { // If the node is in the form [id, []]
286
+ return node[0]
287
+ } else {
288
+ return false // If the node is in the form [id, [id1, id2]]
289
+ }
290
+ }
291
+ }
292
+
293
+ this.createLabelFromNeuralNode = function (node, lookUp) {
294
+
295
+ // Check if the node is a single node or a node with multiple children
296
+ let nodeIsSingle = this.findIfNodeIsSingle(node)
297
+
298
+ // Case where node is in the form [id]
299
+ if (nodeIsSingle) {
300
+ return lookUp[nodeIsSingle]
281
301
  }
282
302
 
303
+ // Case where node is in the form [id, [id1 (,id2)]]
283
304
  let label = lookUp[node[0]]
284
305
  if (node.length === 2 && node[1].length > 0) {
285
306
  node[1].forEach((n) => {
@@ -328,12 +349,11 @@ let FlatmapQueries = function () {
328
349
  this.destinations = axons.map((a) =>
329
350
  this.createLabelFromNeuralNode(a, lookUp)
330
351
  )
331
-
332
352
  this.origins = dendrites.map((d) =>
333
- this.createLabelFromNeuralNode(d, lookUp, true)
353
+ this.createLabelFromNeuralNode(d, lookUp)
334
354
  )
335
355
  this.components = components.map((c) =>
336
- this.createLabelFromNeuralNode(c, lookUp, false)
356
+ this.createLabelFromNeuralNode(c, lookUp)
337
357
  )
338
358
  this.flattenAndFindDatasets(components, axons, dendrites)
339
359
  resolve({