@vitessce/all 3.6.1 → 3.6.2
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/{index-B9D28eUc.js → ReactNeuroglancer-CeoyM_6M.js} +268 -287
- package/dist/{deflate-CJhWCBiZ.js → deflate-DTO-rr8G.js} +1 -1
- package/dist/{higlass-CSu9Ti0B.js → higlass-BDwTvH9n.js} +1 -1
- package/dist/{index-Bo_wc6rR.js → index-BLLQzyXB.js} +2 -2
- package/dist/{index-CCplcSNt.js → index-Dysf8251.js} +10 -13
- package/dist/index.js +1 -1
- package/dist/{jpeg-DC5n1NNM.js → jpeg-C2g1td_K.js} +1 -1
- package/dist/{lerc-Cvg7Pl9S.js → lerc-DiBZtw18.js} +1 -1
- package/dist/{lzw-VhxZ7GCo.js → lzw-DmDsHkC2.js} +1 -1
- package/dist/{packbits-CSVuh-cH.js → packbits-B_GD-k-S.js} +1 -1
- package/dist/{raw-CFcwsnDK.js → raw-C8Sljmcb.js} +1 -1
- package/dist/{troika-three-text.esm-D6UL2roF.js → troika-three-text.esm-Brh3NnXI.js} +1 -1
- package/dist/{webimage-DfIQOYrX.js → webimage-CbHUHFQy.js} +1 -1
- package/package.json +31 -31
@@ -1,24 +1,5 @@
|
|
1
|
-
import { g as getDefaultExportFromCjs, aV as requireAssign, aW as require_export, aX as require_core, aY as require_fails, aZ as require_toObject, a_ as require_objectKeys, a$ as require_cof, b0 as require_wks, b1 as require_iterators, b2 as requireWeb_dom_iterable, b3 as requireEs6_string_iterator, b4 as require_anObject, b5 as require_hide, b6 as require_ctx, b7 as require_toLength, b8 as require_global, b9 as require_objectDp, ba as require_descriptors, bb as require_isObject, bc as require_objectCreate, bd as require_iterDefine, be as require_iterStep, bf as require_meta, bg as require_isArray, bh as require_iobject, bi as require_setToStringTag, bj as require_aFunction, bk as requireIterator, bl as require_propertyDesc, aS as commonjsGlobal, bm as requireEs6_symbol, bn as requireDefineProperty, bo as require_toIobject, bp as require_objectGopd, bq as require_html, br as require_domCreate, bs as require_library, bt as requireSymbol, bu as require_objectPie, bv as require_has, bw as require_redefine, bx as require_objectAssign, by as getAugmentedNamespace, bz as requirePropTypes } from "./index-
|
1
|
+
import { g as getDefaultExportFromCjs, aV as requireAssign, aW as require_export, aX as require_core, aY as require_fails, aZ as require_toObject, a_ as require_objectKeys, a$ as require_cof, b0 as require_wks, b1 as require_iterators, b2 as requireWeb_dom_iterable, b3 as requireEs6_string_iterator, b4 as require_anObject, b5 as require_hide, b6 as require_ctx, b7 as require_toLength, b8 as require_global, b9 as require_objectDp, ba as require_descriptors, bb as require_isObject, bc as require_objectCreate, bd as require_iterDefine, be as require_iterStep, bf as require_meta, bg as require_isArray, bh as require_iobject, bi as require_setToStringTag, bj as require_aFunction, bk as requireIterator, bl as require_propertyDesc, aS as commonjsGlobal, bm as requireEs6_symbol, bn as requireDefineProperty, bo as require_toIobject, bp as require_objectGopd, bq as require_html, br as require_domCreate, bs as require_library, bt as requireSymbol, bu as require_objectPie, bv as require_has, bw as require_redefine, bx as require_objectAssign, by as getAugmentedNamespace, bz as requirePropTypes, aI as jsxRuntimeExports } from "./index-Dysf8251.js";
|
2
2
|
import React__default from "react";
|
3
|
-
function _mergeNamespaces(n, m) {
|
4
|
-
for (var i = 0; i < m.length; i++) {
|
5
|
-
const e = m[i];
|
6
|
-
if (typeof e !== "string" && !Array.isArray(e)) {
|
7
|
-
for (const k in e) {
|
8
|
-
if (k !== "default" && !(k in n)) {
|
9
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
10
|
-
if (d) {
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
12
|
-
enumerable: true,
|
13
|
-
get: () => e[k]
|
14
|
-
});
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
21
|
-
}
|
22
3
|
var lib = {};
|
23
4
|
var assignExports = requireAssign();
|
24
5
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
@@ -298,11 +279,11 @@ function require_forOf() {
|
|
298
279
|
return iterable;
|
299
280
|
} : getIterFn(iterable);
|
300
281
|
var f = ctx(fn, that, entries2 ? 2 : 1);
|
301
|
-
var
|
282
|
+
var index = 0;
|
302
283
|
var length2, step, iterator, result;
|
303
284
|
if (typeof iterFn != "function") throw TypeError(iterable + " is not iterable!");
|
304
|
-
if (isArrayIter(iterFn)) for (length2 = toLength(iterable.length); length2 >
|
305
|
-
result = entries2 ? f(anObject(step = iterable[
|
285
|
+
if (isArrayIter(iterFn)) for (length2 = toLength(iterable.length); length2 > index; index++) {
|
286
|
+
result = entries2 ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
|
306
287
|
if (result === BREAK || result === RETURN) return result;
|
307
288
|
}
|
308
289
|
else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) {
|
@@ -366,9 +347,9 @@ function require_collectionStrong() {
|
|
366
347
|
var validate = require_validateCollection();
|
367
348
|
var SIZE = DESCRIPTORS ? "_s" : "size";
|
368
349
|
var getEntry = function(that, key) {
|
369
|
-
var
|
350
|
+
var index = fastKey(key);
|
370
351
|
var entry;
|
371
|
-
if (
|
352
|
+
if (index !== "F") return that._i[index];
|
372
353
|
for (entry = that._f; entry; entry = entry.n) {
|
373
354
|
if (entry.k == key) return entry;
|
374
355
|
}
|
@@ -440,12 +421,12 @@ function require_collectionStrong() {
|
|
440
421
|
},
|
441
422
|
def: function(that, key, value) {
|
442
423
|
var entry = getEntry(that, key);
|
443
|
-
var prev,
|
424
|
+
var prev, index;
|
444
425
|
if (entry) {
|
445
426
|
entry.v = value;
|
446
427
|
} else {
|
447
428
|
that._l = entry = {
|
448
|
-
i:
|
429
|
+
i: index = fastKey(key, true),
|
449
430
|
// <- index
|
450
431
|
k: key,
|
451
432
|
// <- key
|
@@ -461,7 +442,7 @@ function require_collectionStrong() {
|
|
461
442
|
if (!that._f) that._f = entry;
|
462
443
|
if (prev) prev.n = entry;
|
463
444
|
that[SIZE]++;
|
464
|
-
if (
|
445
|
+
if (index !== "F") that._i[index] = entry;
|
465
446
|
}
|
466
447
|
return that;
|
467
448
|
},
|
@@ -545,14 +526,14 @@ function require_arrayMethods() {
|
|
545
526
|
var self2 = IObject(O);
|
546
527
|
var f = ctx(callbackfn, that, 3);
|
547
528
|
var length2 = toLength(self2.length);
|
548
|
-
var
|
529
|
+
var index = 0;
|
549
530
|
var result = IS_MAP ? create2($this, length2) : IS_FILTER ? create2($this, 0) : void 0;
|
550
531
|
var val, res;
|
551
|
-
for (; length2 >
|
552
|
-
val = self2[
|
553
|
-
res = f(val,
|
532
|
+
for (; length2 > index; index++) if (NO_HOLES || index in self2) {
|
533
|
+
val = self2[index];
|
534
|
+
res = f(val, index, O);
|
554
535
|
if (TYPE) {
|
555
|
-
if (IS_MAP) result[
|
536
|
+
if (IS_MAP) result[index] = res;
|
556
537
|
else if (res) switch (TYPE) {
|
557
538
|
case 3:
|
558
539
|
return true;
|
@@ -561,7 +542,7 @@ function require_arrayMethods() {
|
|
561
542
|
return val;
|
562
543
|
// find
|
563
544
|
case 6:
|
564
|
-
return
|
545
|
+
return index;
|
565
546
|
// findIndex
|
566
547
|
case 2:
|
567
548
|
result.push(val);
|
@@ -793,9 +774,9 @@ function require_createProperty() {
|
|
793
774
|
hasRequired_createProperty = 1;
|
794
775
|
var $defineProperty = require_objectDp();
|
795
776
|
var createDesc = require_propertyDesc();
|
796
|
-
_createProperty = function(object,
|
797
|
-
if (
|
798
|
-
else object[
|
777
|
+
_createProperty = function(object, index, value) {
|
778
|
+
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
|
779
|
+
else object[index] = value;
|
799
780
|
};
|
800
781
|
return _createProperty;
|
801
782
|
}
|
@@ -857,21 +838,21 @@ function requireEs6_array_from() {
|
|
857
838
|
var aLen = arguments.length;
|
858
839
|
var mapfn = aLen > 1 ? arguments[1] : void 0;
|
859
840
|
var mapping = mapfn !== void 0;
|
860
|
-
var
|
841
|
+
var index = 0;
|
861
842
|
var iterFn = getIterFn(O);
|
862
843
|
var length2, result, step, iterator;
|
863
844
|
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : void 0, 2);
|
864
845
|
if (iterFn != void 0 && !(C == Array && isArrayIter(iterFn))) {
|
865
|
-
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done;
|
866
|
-
createProperty(result,
|
846
|
+
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
|
847
|
+
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
|
867
848
|
}
|
868
849
|
} else {
|
869
850
|
length2 = toLength(O.length);
|
870
|
-
for (result = new C(length2); length2 >
|
871
|
-
createProperty(result,
|
851
|
+
for (result = new C(length2); length2 > index; index++) {
|
852
|
+
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
|
872
853
|
}
|
873
854
|
}
|
874
|
-
result.length =
|
855
|
+
result.length = index;
|
875
856
|
return result;
|
876
857
|
}
|
877
858
|
});
|
@@ -1283,10 +1264,10 @@ function require_trimmedEndIndex() {
|
|
1283
1264
|
hasRequired_trimmedEndIndex = 1;
|
1284
1265
|
var reWhitespace = /\s/;
|
1285
1266
|
function trimmedEndIndex(string) {
|
1286
|
-
var
|
1287
|
-
while (
|
1267
|
+
var index = string.length;
|
1268
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
1288
1269
|
}
|
1289
|
-
return
|
1270
|
+
return index;
|
1290
1271
|
}
|
1291
1272
|
_trimmedEndIndex = trimmedEndIndex;
|
1292
1273
|
return _trimmedEndIndex;
|
@@ -1592,9 +1573,9 @@ class RefCounted {
|
|
1592
1573
|
unregisterDisposer(f) {
|
1593
1574
|
let disposers = this.disposers;
|
1594
1575
|
if (disposers != null) {
|
1595
|
-
let
|
1596
|
-
if (
|
1597
|
-
disposers.splice(
|
1576
|
+
let index = disposers.indexOf(f);
|
1577
|
+
if (index !== -1) {
|
1578
|
+
disposers.splice(index, 1);
|
1598
1579
|
}
|
1599
1580
|
}
|
1600
1581
|
return f;
|
@@ -8698,10 +8679,10 @@ function requireEs6_promise() {
|
|
8698
8679
|
var reject = capability.reject;
|
8699
8680
|
var result = perform(function() {
|
8700
8681
|
var values2 = [];
|
8701
|
-
var
|
8682
|
+
var index = 0;
|
8702
8683
|
var remaining = 1;
|
8703
8684
|
forOf(iterable, false, function(promise2) {
|
8704
|
-
var $index =
|
8685
|
+
var $index = index++;
|
8705
8686
|
var alreadyCalled = false;
|
8706
8687
|
values2.push(void 0);
|
8707
8688
|
remaining++;
|
@@ -13777,9 +13758,9 @@ class RenderScaleHistogram {
|
|
13777
13758
|
newValue.set(value);
|
13778
13759
|
this.value = value = newValue;
|
13779
13760
|
}
|
13780
|
-
const
|
13781
|
-
value[
|
13782
|
-
value[
|
13761
|
+
const index = spatialScaleIndex * numRenderScaleHistogramBins * 2 + Math.min(Math.max(0, Math.round(getRenderScaleHistogramOffset(renderScale))), numRenderScaleHistogramBins - 1);
|
13762
|
+
value[index] += presentCount;
|
13763
|
+
value[index + numRenderScaleHistogramBins] += notPresentCount;
|
13783
13764
|
}
|
13784
13765
|
}
|
13785
13766
|
class SliceViewRenderLayer extends RenderLayer {
|
@@ -14756,10 +14737,10 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
14756
14737
|
const idMap = serializedAnnotations.typeToIdMaps[type];
|
14757
14738
|
const handler = annotationTypeHandlers[type];
|
14758
14739
|
const numBytes = propertySerializers[type].serializedBytes;
|
14759
|
-
let
|
14760
|
-
if (
|
14761
|
-
|
14762
|
-
idMap.set(annotation.id,
|
14740
|
+
let index = idMap.get(annotation.id);
|
14741
|
+
if (index === void 0) {
|
14742
|
+
index = idMap.size;
|
14743
|
+
idMap.set(annotation.id, index);
|
14763
14744
|
const newData = copyOtherAnnotations(serializedAnnotations, propertySerializers, type, numBytes);
|
14764
14745
|
copyAnnotationSlice(
|
14765
14746
|
serializedAnnotations,
|
@@ -14769,11 +14750,11 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
14769
14750
|
/*sourceBeginIndex=*/
|
14770
14751
|
0,
|
14771
14752
|
/*sourceEndIndex=*/
|
14772
|
-
|
14753
|
+
index,
|
14773
14754
|
/*destBeginIndex=*/
|
14774
14755
|
0,
|
14775
14756
|
/*destCount=*/
|
14776
|
-
|
14757
|
+
index + 1
|
14777
14758
|
);
|
14778
14759
|
ids.push(annotation.id);
|
14779
14760
|
serializedAnnotations.data = newData;
|
@@ -14782,15 +14763,15 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
14782
14763
|
const dv = new DataView(serializedAnnotations.data.buffer, serializedAnnotations.data.byteOffset, serializedAnnotations.data.byteLength);
|
14783
14764
|
const isLittleEndian = ENDIANNESS === Endianness.LITTLE;
|
14784
14765
|
const propertySerializer = propertySerializers[type];
|
14785
|
-
handler.serialize(dv, bufferOffset + propertySerializer.propertyGroupBytes[0] *
|
14786
|
-
propertySerializer.serialize(dv, bufferOffset,
|
14766
|
+
handler.serialize(dv, bufferOffset + propertySerializer.propertyGroupBytes[0] * index, isLittleEndian, rank, annotation);
|
14767
|
+
propertySerializer.serialize(dv, bufferOffset, index, ids.length, isLittleEndian, annotation.properties);
|
14787
14768
|
chunk.bufferValid = false;
|
14788
14769
|
}
|
14789
14770
|
function deleteAnnotation(chunk, type, id, propertySerializers) {
|
14790
14771
|
const serializedAnnotations = chunk.serializedAnnotations;
|
14791
14772
|
const idMap = serializedAnnotations.typeToIdMaps[type];
|
14792
|
-
const
|
14793
|
-
if (
|
14773
|
+
const index = idMap.get(id);
|
14774
|
+
if (index === void 0) {
|
14794
14775
|
return false;
|
14795
14776
|
}
|
14796
14777
|
const ids = serializedAnnotations.typeToIds[type];
|
@@ -14804,7 +14785,7 @@ function deleteAnnotation(chunk, type, id, propertySerializers) {
|
|
14804
14785
|
/*sourceBeginIndex=*/
|
14805
14786
|
0,
|
14806
14787
|
/*sourceEndIndex=*/
|
14807
|
-
|
14788
|
+
index,
|
14808
14789
|
/*destBeginIndex=*/
|
14809
14790
|
0,
|
14810
14791
|
/*destCount=*/
|
@@ -14816,17 +14797,17 @@ function deleteAnnotation(chunk, type, id, propertySerializers) {
|
|
14816
14797
|
type,
|
14817
14798
|
newData,
|
14818
14799
|
/*sourceBeginIndex=*/
|
14819
|
-
|
14800
|
+
index + 1,
|
14820
14801
|
/*sourceEndIndex=*/
|
14821
14802
|
ids.length,
|
14822
14803
|
/*destBeginIndex=*/
|
14823
|
-
|
14804
|
+
index,
|
14824
14805
|
/*destCount=*/
|
14825
14806
|
ids.length - 1
|
14826
14807
|
);
|
14827
|
-
ids.splice(
|
14808
|
+
ids.splice(index, 1);
|
14828
14809
|
idMap.delete(id);
|
14829
|
-
for (let i =
|
14810
|
+
for (let i = index, count = ids.length; i < count; ++i) {
|
14830
14811
|
idMap.set(ids[i], i);
|
14831
14812
|
}
|
14832
14813
|
serializedAnnotations.data = newData;
|
@@ -15327,11 +15308,11 @@ function findSourceGroupBasedOnSeparator(path, separator) {
|
|
15327
15308
|
separator = "/";
|
15328
15309
|
}
|
15329
15310
|
}
|
15330
|
-
let
|
15331
|
-
if (
|
15311
|
+
let index = path.lastIndexOf(separator);
|
15312
|
+
if (index === -1) {
|
15332
15313
|
return 0;
|
15333
15314
|
}
|
15334
|
-
return
|
15315
|
+
return index + 1;
|
15335
15316
|
}
|
15336
15317
|
function suggestLayerNameBasedOnSeparator(path, separator) {
|
15337
15318
|
let groupIndex = findSourceGroupBasedOnSeparator(path, separator);
|
@@ -15653,11 +15634,11 @@ function require_collectionWeak() {
|
|
15653
15634
|
else this.a.push([key, value]);
|
15654
15635
|
},
|
15655
15636
|
"delete": function(key) {
|
15656
|
-
var
|
15637
|
+
var index = arrayFindIndex(this.a, function(it) {
|
15657
15638
|
return it[0] === key;
|
15658
15639
|
});
|
15659
|
-
if (~
|
15660
|
-
return !!~
|
15640
|
+
if (~index) this.a.splice(index, 1);
|
15641
|
+
return !!~index;
|
15661
15642
|
}
|
15662
15643
|
};
|
15663
15644
|
_collectionWeak = {
|
@@ -15980,9 +15961,9 @@ class LayerDataSource extends RefCounted {
|
|
15980
15961
|
this.messages.clearMessages();
|
15981
15962
|
if (spec.url.length === 0) {
|
15982
15963
|
if (layer.dataSources.length !== 1) {
|
15983
|
-
const
|
15984
|
-
if (
|
15985
|
-
layer.dataSources.splice(
|
15964
|
+
const index = layer.dataSources.indexOf(this);
|
15965
|
+
if (index !== -1) {
|
15966
|
+
layer.dataSources.splice(index, 1);
|
15986
15967
|
layer.dataSourcesChanged.dispatch();
|
15987
15968
|
this.dispose();
|
15988
15969
|
return;
|
@@ -17073,9 +17054,9 @@ class TrackableDisplayDimensions extends RefCounted {
|
|
17073
17054
|
const names = coordinateSpace.names;
|
17074
17055
|
let displayRank = 0;
|
17075
17056
|
for (const name2 of displayDimensionNames) {
|
17076
|
-
const
|
17077
|
-
if (
|
17078
|
-
displayDimensionIndices[displayRank++] =
|
17057
|
+
const index = names.indexOf(name2);
|
17058
|
+
if (index === -1) continue;
|
17059
|
+
displayDimensionIndices[displayRank++] = index;
|
17079
17060
|
}
|
17080
17061
|
if (displayRank === 0) {
|
17081
17062
|
this.reset();
|
@@ -18057,11 +18038,11 @@ class HashTableBase {
|
|
18057
18038
|
return this.indexOfPair(low, high) !== -1;
|
18058
18039
|
}
|
18059
18040
|
delete(x) {
|
18060
|
-
let
|
18061
|
-
if (
|
18041
|
+
let index = this.indexOf(x);
|
18042
|
+
if (index !== -1) {
|
18062
18043
|
let table = this.table;
|
18063
|
-
table[
|
18064
|
-
table[
|
18044
|
+
table[index] = this.emptyLow;
|
18045
|
+
table[index + 1] = this.emptyHigh;
|
18065
18046
|
++this.generation;
|
18066
18047
|
this.size--;
|
18067
18048
|
return true;
|
@@ -19035,13 +19016,13 @@ class HierarchicalMap {
|
|
19035
19016
|
*/
|
19036
19017
|
addParent(parent, priority) {
|
19037
19018
|
const parents = this.parents, parentPriorities = this.parentPriorities;
|
19038
|
-
let
|
19019
|
+
let index = 0;
|
19039
19020
|
const length2 = parents.length;
|
19040
|
-
while (
|
19041
|
-
++
|
19021
|
+
while (index < length2 && priority < parentPriorities[index]) {
|
19022
|
+
++index;
|
19042
19023
|
}
|
19043
|
-
parents.splice(
|
19044
|
-
parentPriorities.splice(
|
19024
|
+
parents.splice(index, 0, parent);
|
19025
|
+
parentPriorities.splice(index, 0, priority);
|
19045
19026
|
return () => {
|
19046
19027
|
this.removeParent(parent);
|
19047
19028
|
};
|
@@ -19050,12 +19031,12 @@ class HierarchicalMap {
|
|
19050
19031
|
* Unregisters `parent` as a parent.
|
19051
19032
|
*/
|
19052
19033
|
removeParent(parent) {
|
19053
|
-
const
|
19054
|
-
if (
|
19034
|
+
const index = this.parents.indexOf(parent);
|
19035
|
+
if (index === -1) {
|
19055
19036
|
throw new Error(`Attempt to remove non-existent parent map.`);
|
19056
19037
|
}
|
19057
|
-
this.parents.splice(
|
19058
|
-
this.parentPriorities.splice(
|
19038
|
+
this.parents.splice(index, 1);
|
19039
|
+
this.parentPriorities.splice(index, 1);
|
19059
19040
|
}
|
19060
19041
|
/**
|
19061
19042
|
* Register a direct binding.
|
@@ -21032,11 +21013,11 @@ class SegmentWidgetWithExtraColumnsFactory extends SegmentWidgetFactory {
|
|
21032
21013
|
const numericalProperties = this.numericalProperties;
|
21033
21014
|
const numericalPropertyIndices = this.template.numericalPropertyIndices;
|
21034
21015
|
if (numericalPropertyIndices.length > 0) {
|
21035
|
-
const
|
21036
|
-
if (
|
21016
|
+
const index = (_c = (_a = this.segmentPropertyMap) === null || _a === void 0 ? void 0 : _a.getSegmentInlineIndex((_b = normalizedId.value) !== null && _b !== void 0 ? _b : normalizedId.key)) !== null && _c !== void 0 ? _c : -1;
|
21017
|
+
if (index !== -1) {
|
21037
21018
|
const numericalPropertyWidths = this.numericalPropertyWidths;
|
21038
21019
|
for (let i = 0, n = numericalPropertyIndices.length; i < n; ++i) {
|
21039
|
-
const value = numericalProperties[i].values[
|
21020
|
+
const value = numericalProperties[i].values[index];
|
21040
21021
|
if (!isNaN(value)) {
|
21041
21022
|
const s = value.toString();
|
21042
21023
|
const w = s.length;
|
@@ -23161,20 +23142,20 @@ class CoordinateSpaceTransformWidget extends RefCounted {
|
|
23161
23142
|
const target = event.target;
|
23162
23143
|
if (target instanceof HTMLInputElement) {
|
23163
23144
|
updateInputFieldWidth(target);
|
23164
|
-
let
|
23165
|
-
if (
|
23166
|
-
this.inputScaleModified[
|
23145
|
+
let index = this.inputScaleElements.indexOf(target);
|
23146
|
+
if (index !== -1) {
|
23147
|
+
this.inputScaleModified[index] = true;
|
23167
23148
|
this.updateScaleValidity(target);
|
23168
23149
|
return;
|
23169
23150
|
}
|
23170
|
-
|
23171
|
-
if (
|
23172
|
-
this.outputScaleModified[
|
23151
|
+
index = this.outputScaleElements.indexOf(target);
|
23152
|
+
if (index !== -1) {
|
23153
|
+
this.outputScaleModified[index] = true;
|
23173
23154
|
this.updateScaleValidity(target);
|
23174
23155
|
return;
|
23175
23156
|
}
|
23176
|
-
|
23177
|
-
if (
|
23157
|
+
index = this.outputNameElements.indexOf(target);
|
23158
|
+
if (index !== -1) {
|
23178
23159
|
this.updateOutputNameValidity();
|
23179
23160
|
return;
|
23180
23161
|
}
|
@@ -23903,18 +23884,18 @@ class SizeEstimates {
|
|
23903
23884
|
get averageSize() {
|
23904
23885
|
return this.totalKnownSize / this.numItemsInTotalKnownSize;
|
23905
23886
|
}
|
23906
|
-
getEstimatedSize(
|
23887
|
+
getEstimatedSize(index) {
|
23907
23888
|
var _a;
|
23908
|
-
return (_a = this.itemSize[
|
23889
|
+
return (_a = this.itemSize[index]) !== null && _a !== void 0 ? _a : this.averageSize;
|
23909
23890
|
}
|
23910
23891
|
getEstimatedTotalSize() {
|
23911
23892
|
return this.totalKnownSize / this.numItemsInTotalKnownSize * this.itemSize.length;
|
23912
23893
|
}
|
23913
|
-
getEstimatedOffset(
|
23914
|
-
for (; hintIndex <
|
23894
|
+
getEstimatedOffset(index, hintIndex = 0, hintOffset = 0) {
|
23895
|
+
for (; hintIndex < index; ++hintIndex) {
|
23915
23896
|
hintOffset += this.getEstimatedSize(hintIndex);
|
23916
23897
|
}
|
23917
|
-
for (; hintIndex >
|
23898
|
+
for (; hintIndex > index; --hintIndex) {
|
23918
23899
|
hintOffset -= this.getEstimatedSize(hintIndex - 1);
|
23919
23900
|
}
|
23920
23901
|
return hintOffset;
|
@@ -24163,8 +24144,8 @@ class VirtualList extends RefCounted {
|
|
24163
24144
|
bottomItems.style.top = `${renderParams.anchorOffset}px`;
|
24164
24145
|
element.scrollTop = renderParams.scrollOffset;
|
24165
24146
|
}
|
24166
|
-
getItemElement(
|
24167
|
-
return this.renderedItems[
|
24147
|
+
getItemElement(index) {
|
24148
|
+
return this.renderedItems[index];
|
24168
24149
|
}
|
24169
24150
|
forEachRenderedItem(callback) {
|
24170
24151
|
var _renderParams2 = this.renderParams;
|
@@ -24181,15 +24162,15 @@ class VirtualList extends RefCounted {
|
|
24181
24162
|
this.state.anchorClientOffset = 0;
|
24182
24163
|
this.debouncedUpdateView();
|
24183
24164
|
}
|
24184
|
-
scrollItemIntoView(
|
24185
|
-
const itemStartOffset = this.sizes.getEstimatedOffset(
|
24186
|
-
const itemEndOffset = itemStartOffset + this.sizes.getEstimatedSize(
|
24165
|
+
scrollItemIntoView(index) {
|
24166
|
+
const itemStartOffset = this.sizes.getEstimatedOffset(index);
|
24167
|
+
const itemEndOffset = itemStartOffset + this.sizes.getEstimatedSize(index);
|
24187
24168
|
const startOffset = this.element.scrollTop;
|
24188
24169
|
if (itemStartOffset < startOffset) {
|
24189
|
-
this.state.anchorIndex =
|
24170
|
+
this.state.anchorIndex = index;
|
24190
24171
|
this.state.anchorClientOffset = 0;
|
24191
24172
|
} else if (itemStartOffset > startOffset && itemEndOffset > startOffset + this.element.offsetHeight) {
|
24192
|
-
this.state.anchorIndex =
|
24173
|
+
this.state.anchorIndex = index + 1;
|
24193
24174
|
this.state.anchorClientOffset = this.element.offsetHeight;
|
24194
24175
|
} else {
|
24195
24176
|
return;
|
@@ -24573,12 +24554,12 @@ class AutocompleteTextInput extends RefCounted {
|
|
24573
24554
|
completionsVirtualList = this.completionsVirtualList = new VirtualList({
|
24574
24555
|
source: {
|
24575
24556
|
length: completionResult.completions.length,
|
24576
|
-
render: (
|
24577
|
-
const completion = completionResult.completions[
|
24557
|
+
render: (index) => {
|
24558
|
+
const completion = completionResult.completions[index];
|
24578
24559
|
const completionElement = makeElement.call(completionResult, completion);
|
24579
24560
|
completionElement.classList.add("neuroglancer-multiline-autocomplete-completion");
|
24580
|
-
completionElement.dataset.completionIndex = `${
|
24581
|
-
if (this.activeIndex ===
|
24561
|
+
completionElement.dataset.completionIndex = `${index}`;
|
24562
|
+
if (this.activeIndex === index) {
|
24582
24563
|
completionElement.classList.add(ACTIVE_COMPLETION_CLASS_NAME);
|
24583
24564
|
}
|
24584
24565
|
return completionElement;
|
@@ -24677,7 +24658,7 @@ class AutocompleteTextInput extends RefCounted {
|
|
24677
24658
|
* This sets the active completion, which causes it to be highlighted and displayed as the hint.
|
24678
24659
|
* Additionally, if the user hits tab then it is chosen.
|
24679
24660
|
*/
|
24680
|
-
setActiveIndex(
|
24661
|
+
setActiveIndex(index) {
|
24681
24662
|
if (!this.dropdownContentsStale) {
|
24682
24663
|
let activeIndex = this.activeIndex;
|
24683
24664
|
const completionsVirtualList = this.completionsVirtualList;
|
@@ -24688,22 +24669,22 @@ class AutocompleteTextInput extends RefCounted {
|
|
24688
24669
|
prevElement.classList.remove(ACTIVE_COMPLETION_CLASS_NAME);
|
24689
24670
|
}
|
24690
24671
|
}
|
24691
|
-
if (
|
24692
|
-
let completionElement = completionsVirtualList.getItemElement(
|
24672
|
+
if (index !== -1) {
|
24673
|
+
let completionElement = completionsVirtualList.getItemElement(index);
|
24693
24674
|
if (completionElement !== void 0) {
|
24694
24675
|
completionElement.classList.add(ACTIVE_COMPLETION_CLASS_NAME);
|
24695
24676
|
}
|
24696
|
-
completionsVirtualList.scrollItemIntoView(
|
24677
|
+
completionsVirtualList.scrollItemIntoView(index);
|
24697
24678
|
}
|
24698
24679
|
}
|
24699
24680
|
}
|
24700
|
-
if (
|
24701
|
-
this.setHintValue(this.getCompletedValueByIndex(
|
24681
|
+
if (index !== -1) {
|
24682
|
+
this.setHintValue(this.getCompletedValueByIndex(index));
|
24702
24683
|
}
|
24703
|
-
this.activeIndex =
|
24684
|
+
this.activeIndex = index;
|
24704
24685
|
}
|
24705
|
-
getCompletedValueByIndex(
|
24706
|
-
return this.getCompletedValue(this.completionResult.completions[
|
24686
|
+
getCompletedValueByIndex(index) {
|
24687
|
+
return this.getCompletedValue(this.completionResult.completions[index].value);
|
24707
24688
|
}
|
24708
24689
|
getCompletedValue(completionValue) {
|
24709
24690
|
let completionResult = this.completionResult;
|
@@ -24769,8 +24750,8 @@ class AutocompleteTextInput extends RefCounted {
|
|
24769
24750
|
this.moveCaretToEndOfInput();
|
24770
24751
|
return true;
|
24771
24752
|
}
|
24772
|
-
selectCompletion(
|
24773
|
-
this.value = this.getCompletedValueByIndex(
|
24753
|
+
selectCompletion(index) {
|
24754
|
+
this.value = this.getCompletedValueByIndex(index);
|
24774
24755
|
this.moveCaretToEndOfInput();
|
24775
24756
|
}
|
24776
24757
|
/**
|
@@ -26464,13 +26445,13 @@ class PickIDManager {
|
|
26464
26445
|
let renderLayers = this.renderLayers, values2 = this.values;
|
26465
26446
|
let pickID = this.nextPickID;
|
26466
26447
|
this.nextPickID += count;
|
26467
|
-
let
|
26468
|
-
renderLayers[
|
26469
|
-
let valuesOffset =
|
26448
|
+
let index = renderLayers.length;
|
26449
|
+
renderLayers[index] = renderLayer;
|
26450
|
+
let valuesOffset = index * 3;
|
26470
26451
|
values2[valuesOffset] = pickID;
|
26471
26452
|
values2[valuesOffset + 1] = low;
|
26472
26453
|
values2[valuesOffset + 2] = high;
|
26473
|
-
this.pickData[
|
26454
|
+
this.pickData[index] = data;
|
26474
26455
|
return pickID;
|
26475
26456
|
}
|
26476
26457
|
/**
|
@@ -28791,9 +28772,9 @@ class DisplayDimensionsWidget extends RefCounted {
|
|
28791
28772
|
const names = coordinateSpace.names;
|
28792
28773
|
const rank = displayDimensionNames.length;
|
28793
28774
|
for (let i = 0; i < rank; ++i) {
|
28794
|
-
const
|
28795
|
-
if (
|
28796
|
-
dimensionIndices[i] =
|
28775
|
+
const index = names.indexOf(displayDimensionNames[i]);
|
28776
|
+
if (index === -1) return false;
|
28777
|
+
dimensionIndices[i] = index;
|
28797
28778
|
}
|
28798
28779
|
if (arraysEqual(dimensionIndices, displayDimensions.value.displayDimensionIndices)) {
|
28799
28780
|
return true;
|
@@ -30037,8 +30018,8 @@ class DropLayers {
|
|
30037
30018
|
for (const _ref of this.layers) {
|
30038
30019
|
var _ref2 = _slicedToArray(_ref, 2);
|
30039
30020
|
const layer = _ref2[0];
|
30040
|
-
const
|
30041
|
-
initializeLayerFromSpecShowErrorStatus(layer, spec[
|
30021
|
+
const index = _ref2[1];
|
30022
|
+
initializeLayerFromSpecShowErrorStatus(layer, spec[index]);
|
30042
30023
|
}
|
30043
30024
|
} catch (_a) {
|
30044
30025
|
return false;
|
@@ -30169,13 +30150,13 @@ function getDropLayers(event, manager, options) {
|
|
30169
30150
|
result.forceCopy = false;
|
30170
30151
|
result.layoutSpec = source.layoutSpec;
|
30171
30152
|
if (moveSupported) {
|
30172
|
-
source.layers.forEach((layer,
|
30173
|
-
result.layers.set(layer,
|
30153
|
+
source.layers.forEach((layer, index) => {
|
30154
|
+
result.layers.set(layer, index);
|
30174
30155
|
});
|
30175
30156
|
} else {
|
30176
|
-
source.layers.forEach((layer,
|
30157
|
+
source.layers.forEach((layer, index) => {
|
30177
30158
|
if (newTarget || !manager.layerManager.has(layer)) {
|
30178
|
-
result.layers.set(layer.addRef(),
|
30159
|
+
result.layers.set(layer.addRef(), index);
|
30179
30160
|
}
|
30180
30161
|
});
|
30181
30162
|
}
|
@@ -30184,14 +30165,14 @@ function getDropLayers(event, manager, options) {
|
|
30184
30165
|
const info = getLayerDragInfo(event);
|
30185
30166
|
if (info !== void 0) {
|
30186
30167
|
try {
|
30187
|
-
const layers = parseArray(info.parameters, (layerInfo,
|
30168
|
+
const layers = parseArray(info.parameters, (layerInfo, index) => {
|
30188
30169
|
const name2 = verifyObjectProperty(layerInfo, "name", verifyString);
|
30189
30170
|
let visible = verifyObjectProperty(layerInfo, "visible", verifyBoolean);
|
30190
30171
|
const newLayer = new ManagedUserLayer(name2, manager);
|
30191
30172
|
if (isLayerListPanel) visible = false;
|
30192
30173
|
newLayer.visible = visible;
|
30193
30174
|
newLayer.archived = isLayerListPanel;
|
30194
|
-
return [newLayer,
|
30175
|
+
return [newLayer, index];
|
30195
30176
|
});
|
30196
30177
|
const result = new DropLayers();
|
30197
30178
|
result.numSourceLayers = layers.length;
|
@@ -30260,10 +30241,10 @@ function registerLayerBarDropHandlers(panel, target, targetLayer, isLayerListPan
|
|
30260
30241
|
const layerManager = panel.manager.layerManager;
|
30261
30242
|
const existingLayers = new _Set();
|
30262
30243
|
let firstRemovalIndex = Number.POSITIVE_INFINITY;
|
30263
|
-
const managedLayers = layerManager.managedLayers = layerManager.managedLayers.filter((x,
|
30244
|
+
const managedLayers = layerManager.managedLayers = layerManager.managedLayers.filter((x, index) => {
|
30264
30245
|
if (dropLayers.layers.has(x)) {
|
30265
30246
|
if (firstRemovalIndex === Number.POSITIVE_INFINITY) {
|
30266
|
-
firstRemovalIndex =
|
30247
|
+
firstRemovalIndex = index;
|
30267
30248
|
}
|
30268
30249
|
existingLayers.add(x);
|
30269
30250
|
return false;
|
@@ -30385,7 +30366,9 @@ const svg_bin = '<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
30385
30366
|
function makeDeleteButton(options = {}) {
|
30386
30367
|
const icon = makeIcon(_Object$assign({ svg: svg_bin }, options));
|
30387
30368
|
const svg = icon.firstElementChild;
|
30388
|
-
svg
|
30369
|
+
if (svg) {
|
30370
|
+
svg.style.fill = "white";
|
30371
|
+
}
|
30389
30372
|
return icon;
|
30390
30373
|
}
|
30391
30374
|
var es6_string_raw = {};
|
@@ -31249,9 +31232,9 @@ class PositionWidget extends RefCounted {
|
|
31249
31232
|
let label = "";
|
31250
31233
|
if (coordinateArray != null) {
|
31251
31234
|
const coordinates = coordinateArray.coordinates;
|
31252
|
-
const
|
31253
|
-
if (
|
31254
|
-
label = coordinateArray.labels[
|
31235
|
+
const index = binarySearch(coordinates, newCoord, (a, b) => a - b);
|
31236
|
+
if (index !== coordinates.length) {
|
31237
|
+
label = coordinateArray.labels[index];
|
31255
31238
|
}
|
31256
31239
|
}
|
31257
31240
|
const labelElement = widget.coordinateLabel;
|
@@ -31662,14 +31645,14 @@ class EnumSelectWidget extends RefCounted {
|
|
31662
31645
|
this.element = document.createElement("select");
|
31663
31646
|
this.valueIndexMap = new _Map();
|
31664
31647
|
const element = this.element, valueIndexMap = this.valueIndexMap;
|
31665
|
-
let
|
31648
|
+
let index = 0;
|
31666
31649
|
for (const key of _Object$keys(model.enumType)) {
|
31667
31650
|
if (isNaN(Number(key))) {
|
31668
31651
|
const option = document.createElement("option");
|
31669
31652
|
option.textContent = option.value = key.toLowerCase();
|
31670
31653
|
element.appendChild(option);
|
31671
|
-
valueIndexMap.set(model.enumType[key],
|
31672
|
-
++
|
31654
|
+
valueIndexMap.set(model.enumType[key], index);
|
31655
|
+
++index;
|
31673
31656
|
}
|
31674
31657
|
}
|
31675
31658
|
this.registerDisposer(model.changed.add(() => this.updateView()));
|
@@ -32381,8 +32364,8 @@ class StackLayoutComponent extends RefCounted {
|
|
32381
32364
|
get viewer() {
|
32382
32365
|
return this.container.viewer;
|
32383
32366
|
}
|
32384
|
-
get(
|
32385
|
-
return LayoutComponentContainer.getFromElement(this.element.children[
|
32367
|
+
get(index) {
|
32368
|
+
return LayoutComponentContainer.getFromElement(this.element.children[index * 2 + 1]);
|
32386
32369
|
}
|
32387
32370
|
insertChild(spec, before) {
|
32388
32371
|
const child = new LayoutComponentContainer(this.viewer, spec, this);
|
@@ -33703,9 +33686,9 @@ function requireCodemirror() {
|
|
33703
33686
|
} else {
|
33704
33687
|
var map3 = emitter._handlers, arr = map3 && map3[type];
|
33705
33688
|
if (arr) {
|
33706
|
-
var
|
33707
|
-
if (
|
33708
|
-
map3[type] = arr.slice(0,
|
33689
|
+
var index = indexOf(arr, f);
|
33690
|
+
if (index > -1) {
|
33691
|
+
map3[type] = arr.slice(0, index).concat(arr.slice(index + 1));
|
33709
33692
|
}
|
33710
33693
|
}
|
33711
33694
|
}
|
@@ -36147,7 +36130,7 @@ function requireCodemirror() {
|
|
36147
36130
|
return PosWithInfo(lineNo2, ch, sticky, outside, x - baseX);
|
36148
36131
|
}
|
36149
36132
|
function coordsBidiPart(cm, lineObj, lineNo2, preparedMeasure, order, x, y) {
|
36150
|
-
var
|
36133
|
+
var index = findFirst(function(i2) {
|
36151
36134
|
var part2 = order[i2], ltr2 = part2.level != 1;
|
36152
36135
|
return boxIsAfter(cursorCoords(
|
36153
36136
|
cm,
|
@@ -36157,8 +36140,8 @@ function requireCodemirror() {
|
|
36157
36140
|
preparedMeasure
|
36158
36141
|
), x, y, true);
|
36159
36142
|
}, 0, order.length - 1);
|
36160
|
-
var part = order[
|
36161
|
-
if (
|
36143
|
+
var part = order[index];
|
36144
|
+
if (index > 0) {
|
36162
36145
|
var ltr = part.level != 1;
|
36163
36146
|
var start = cursorCoords(
|
36164
36147
|
cm,
|
@@ -36168,7 +36151,7 @@ function requireCodemirror() {
|
|
36168
36151
|
preparedMeasure
|
36169
36152
|
);
|
36170
36153
|
if (boxIsAfter(start, x, y, true) && start.top > y) {
|
36171
|
-
part = order[
|
36154
|
+
part = order[index - 1];
|
36172
36155
|
}
|
36173
36156
|
}
|
36174
36157
|
return part;
|
@@ -36412,21 +36395,21 @@ function requireCodemirror() {
|
|
36412
36395
|
cm.display.viewOffset = 0;
|
36413
36396
|
}
|
36414
36397
|
function viewCuttingPoint(cm, oldN, newN, dir) {
|
36415
|
-
var
|
36398
|
+
var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
|
36416
36399
|
if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) {
|
36417
|
-
return { index
|
36400
|
+
return { index, lineN: newN };
|
36418
36401
|
}
|
36419
36402
|
var n = cm.display.viewFrom;
|
36420
|
-
for (var i2 = 0; i2 <
|
36403
|
+
for (var i2 = 0; i2 < index; i2++) {
|
36421
36404
|
n += view[i2].size;
|
36422
36405
|
}
|
36423
36406
|
if (n != oldN) {
|
36424
36407
|
if (dir > 0) {
|
36425
|
-
if (
|
36408
|
+
if (index == view.length - 1) {
|
36426
36409
|
return null;
|
36427
36410
|
}
|
36428
|
-
diff = n + view[
|
36429
|
-
|
36411
|
+
diff = n + view[index].size - oldN;
|
36412
|
+
index++;
|
36430
36413
|
} else {
|
36431
36414
|
diff = n - oldN;
|
36432
36415
|
}
|
@@ -36434,13 +36417,13 @@ function requireCodemirror() {
|
|
36434
36417
|
newN += diff;
|
36435
36418
|
}
|
36436
36419
|
while (visualLineNo(cm.doc, newN) != newN) {
|
36437
|
-
if (
|
36420
|
+
if (index == (dir < 0 ? 0 : view.length - 1)) {
|
36438
36421
|
return null;
|
36439
36422
|
}
|
36440
|
-
newN += dir * view[
|
36441
|
-
|
36423
|
+
newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
|
36424
|
+
index += dir;
|
36442
36425
|
}
|
36443
|
-
return { index
|
36426
|
+
return { index, lineN: newN };
|
36444
36427
|
}
|
36445
36428
|
function adjustView(cm, from2, to) {
|
36446
36429
|
var display = cm.display, view = display.view;
|
@@ -39894,15 +39877,15 @@ function requireCodemirror() {
|
|
39894
39877
|
},
|
39895
39878
|
indexFromPos: function(coords) {
|
39896
39879
|
coords = clipPos(this, coords);
|
39897
|
-
var
|
39880
|
+
var index = coords.ch;
|
39898
39881
|
if (coords.line < this.first || coords.ch < 0) {
|
39899
39882
|
return 0;
|
39900
39883
|
}
|
39901
39884
|
var sepSize = this.lineSeparator().length;
|
39902
39885
|
this.iter(this.first, coords.line, function(line) {
|
39903
|
-
|
39886
|
+
index += line.text.length + sepSize;
|
39904
39887
|
});
|
39905
|
-
return
|
39888
|
+
return index;
|
39906
39889
|
},
|
39907
39890
|
copy: function(copyHistory) {
|
39908
39891
|
var doc2 = new Doc(
|
@@ -41415,11 +41398,11 @@ function requireCodemirror() {
|
|
41415
41398
|
if (!order) {
|
41416
41399
|
return range2;
|
41417
41400
|
}
|
41418
|
-
var
|
41401
|
+
var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
|
41419
41402
|
if (part.from != anchor.ch && part.to != anchor.ch) {
|
41420
41403
|
return range2;
|
41421
41404
|
}
|
41422
|
-
var boundary =
|
41405
|
+
var boundary = index + (part.from == anchor.ch == (part.level != 1) ? 0 : 1);
|
41423
41406
|
if (boundary == 0 || boundary == order.length) {
|
41424
41407
|
return range2;
|
41425
41408
|
}
|
@@ -41428,7 +41411,7 @@ function requireCodemirror() {
|
|
41428
41411
|
leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
|
41429
41412
|
} else {
|
41430
41413
|
var headIndex = getBidiPartAt(order, head.ch, head.sticky);
|
41431
|
-
var dir = headIndex -
|
41414
|
+
var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
|
41432
41415
|
if (headIndex == boundary - 1 || headIndex == boundary) {
|
41433
41416
|
leftSide = dir < 0;
|
41434
41417
|
} else {
|
@@ -45994,8 +45977,8 @@ class AnnotationToolStatusWidget extends RefCounted {
|
|
45994
45977
|
layerNumberElement.className = "neuroglancer-annotation-tool-status-widget-layer-number";
|
45995
45978
|
const managedLayer = tool.layer.managedLayer;
|
45996
45979
|
managedLayer.manager.rootLayers.updateNonArchivedLayerIndices();
|
45997
|
-
const
|
45998
|
-
layerNumberElement.textContent = (
|
45980
|
+
const index = managedLayer.nonArchivedLayerIndex;
|
45981
|
+
layerNumberElement.textContent = (index + 1).toString();
|
45999
45982
|
const descriptionElement = document.createElement("div");
|
46000
45983
|
descriptionElement.className = "neuroglancer-annotation-tool-status-widget-description";
|
46001
45984
|
descriptionElement.textContent = tool.description;
|
@@ -46947,11 +46930,11 @@ class UserLayer extends RefCounted {
|
|
46947
46930
|
}
|
46948
46931
|
removeRenderLayer(layer) {
|
46949
46932
|
const renderLayers = this.renderLayers, layersChanged = this.layersChanged;
|
46950
|
-
const
|
46951
|
-
if (
|
46933
|
+
const index = renderLayers.indexOf(layer);
|
46934
|
+
if (index === -1) {
|
46952
46935
|
throw new Error("Attempted to remove invalid RenderLayer");
|
46953
46936
|
}
|
46954
|
-
renderLayers.splice(
|
46937
|
+
renderLayers.splice(index, 1);
|
46955
46938
|
layer.layerChanged.remove(layersChanged.dispatch);
|
46956
46939
|
layer.userLayer = void 0;
|
46957
46940
|
layer.dispose();
|
@@ -47158,23 +47141,23 @@ class LayerManager extends RefCounted {
|
|
47158
47141
|
const generation = this.layersChanged.count;
|
47159
47142
|
if (generation === this.nonArchivedLayerIndexGeneration) return;
|
47160
47143
|
this.nonArchivedLayerIndexGeneration = generation;
|
47161
|
-
let
|
47144
|
+
let index = 0;
|
47162
47145
|
for (const layer of this.managedLayers) {
|
47163
47146
|
if (!layer.archived) {
|
47164
|
-
layer.nonArchivedLayerIndex =
|
47147
|
+
layer.nonArchivedLayerIndex = index++;
|
47165
47148
|
}
|
47166
47149
|
}
|
47167
47150
|
for (const layer of this.managedLayers) {
|
47168
47151
|
if (layer.archived) {
|
47169
|
-
layer.nonArchivedLayerIndex =
|
47152
|
+
layer.nonArchivedLayerIndex = index++;
|
47170
47153
|
}
|
47171
47154
|
}
|
47172
47155
|
}
|
47173
|
-
getLayerByNonArchivedIndex(
|
47156
|
+
getLayerByNonArchivedIndex(index) {
|
47174
47157
|
let i = 0;
|
47175
47158
|
for (const layer of this.managedLayers) {
|
47176
47159
|
if (!layer.archived) {
|
47177
|
-
if (i ===
|
47160
|
+
if (i === index) return layer;
|
47178
47161
|
++i;
|
47179
47162
|
}
|
47180
47163
|
}
|
@@ -47237,14 +47220,14 @@ class LayerManager extends RefCounted {
|
|
47237
47220
|
/**
|
47238
47221
|
* Assumes ownership of an existing reference to managedLayer.
|
47239
47222
|
*/
|
47240
|
-
addManagedLayer(managedLayer,
|
47223
|
+
addManagedLayer(managedLayer, index) {
|
47241
47224
|
this.updateSignalBindings(managedLayer, addSignalBinding);
|
47242
47225
|
this.layerSet.add(managedLayer);
|
47243
47226
|
managedLayer.containers.add(this);
|
47244
|
-
if (
|
47245
|
-
|
47227
|
+
if (index === void 0) {
|
47228
|
+
index = this.managedLayers.length;
|
47246
47229
|
}
|
47247
|
-
this.managedLayers.splice(
|
47230
|
+
this.managedLayers.splice(index, 0, managedLayer);
|
47248
47231
|
this.layersChanged.dispatch();
|
47249
47232
|
this.readyStateChanged.dispatch();
|
47250
47233
|
return managedLayer;
|
@@ -47271,19 +47254,19 @@ class LayerManager extends RefCounted {
|
|
47271
47254
|
this.layerSet.clear();
|
47272
47255
|
this.layersChanged.dispatch();
|
47273
47256
|
}
|
47274
|
-
remove(
|
47275
|
-
const layer = this.managedLayers[
|
47257
|
+
remove(index) {
|
47258
|
+
const layer = this.managedLayers[index];
|
47276
47259
|
this.unbindManagedLayer(layer);
|
47277
|
-
this.managedLayers.splice(
|
47260
|
+
this.managedLayers.splice(index, 1);
|
47278
47261
|
this.layerSet.delete(layer);
|
47279
47262
|
this.layersChanged.dispatch();
|
47280
47263
|
}
|
47281
47264
|
removeManagedLayer(managedLayer) {
|
47282
|
-
let
|
47283
|
-
if (
|
47265
|
+
let index = this.managedLayers.indexOf(managedLayer);
|
47266
|
+
if (index === -1) {
|
47284
47267
|
throw new Error(`Internal error: invalid managed layer.`);
|
47285
47268
|
}
|
47286
|
-
this.remove(
|
47269
|
+
this.remove(index);
|
47287
47270
|
}
|
47288
47271
|
reorderManagedLayer(oldIndex, newIndex) {
|
47289
47272
|
const numLayers = this.managedLayers.length;
|
@@ -48186,11 +48169,11 @@ class TopLevelLayerListSpecification extends LayerListSpecification {
|
|
48186
48169
|
}
|
48187
48170
|
}
|
48188
48171
|
}
|
48189
|
-
add(layer,
|
48172
|
+
add(layer, index) {
|
48190
48173
|
if (this.layerManager.managedLayers.indexOf(layer) === -1) {
|
48191
48174
|
layer.name = this.layerManager.getUniqueLayerName(layer.name);
|
48192
48175
|
}
|
48193
|
-
this.layerManager.addManagedLayer(layer,
|
48176
|
+
this.layerManager.addManagedLayer(layer, index);
|
48194
48177
|
}
|
48195
48178
|
toJSON() {
|
48196
48179
|
const result = [];
|
@@ -48264,12 +48247,12 @@ class LayerSubsetSpecification extends LayerListSpecification {
|
|
48264
48247
|
toJSON() {
|
48265
48248
|
return this.layerManager.managedLayers.map((x) => x.name);
|
48266
48249
|
}
|
48267
|
-
add(layer,
|
48250
|
+
add(layer, index) {
|
48268
48251
|
if (this.master.layerManager.managedLayers.indexOf(layer) === -1) {
|
48269
48252
|
layer.name = this.master.layerManager.getUniqueLayerName(layer.name);
|
48270
48253
|
this.master.layerManager.addManagedLayer(layer.addRef());
|
48271
48254
|
}
|
48272
|
-
this.layerManager.addManagedLayer(layer,
|
48255
|
+
this.layerManager.addManagedLayer(layer, index);
|
48273
48256
|
}
|
48274
48257
|
get rootLayers() {
|
48275
48258
|
return this.master.rootLayers;
|
@@ -48452,11 +48435,11 @@ function queryUint64PermutationHashMap(table, values2, low, high) {
|
|
48452
48435
|
const mask = table.length - 1;
|
48453
48436
|
while (true) {
|
48454
48437
|
hashCode = hashCode & mask;
|
48455
|
-
let
|
48456
|
-
if (
|
48457
|
-
--
|
48458
|
-
if (values2[2 *
|
48459
|
-
return
|
48438
|
+
let index = table[hashCode];
|
48439
|
+
if (index === 0) return -1;
|
48440
|
+
--index;
|
48441
|
+
if (values2[2 * index] === low && values2[2 * index + 1] === high) {
|
48442
|
+
return index;
|
48460
48443
|
}
|
48461
48444
|
++hashCode;
|
48462
48445
|
}
|
@@ -48484,16 +48467,16 @@ class PreprocessedSegmentPropertyMap {
|
|
48484
48467
|
return queryUint64PermutationHashMap(inlineIdToIndex, this.segmentPropertyMap.inlineProperties.ids, id.low, id.high);
|
48485
48468
|
}
|
48486
48469
|
getSegmentLabel(id) {
|
48487
|
-
const
|
48488
|
-
if (
|
48470
|
+
const index = this.getSegmentInlineIndex(id);
|
48471
|
+
if (index === -1) return void 0;
|
48489
48472
|
const labels = this.labels, tagsProperty = this.tags;
|
48490
48473
|
let label = "";
|
48491
48474
|
if (labels !== void 0) {
|
48492
|
-
label = labels.values[
|
48475
|
+
label = labels.values[index];
|
48493
48476
|
}
|
48494
48477
|
if (tagsProperty !== void 0) {
|
48495
48478
|
const tags = tagsProperty.tags, values2 = tagsProperty.values;
|
48496
|
-
let tagIndices = values2[
|
48479
|
+
let tagIndices = values2[index];
|
48497
48480
|
for (let i = 0, length2 = tagIndices.length; i < length2; ++i) {
|
48498
48481
|
const tag = tags[tagIndices.charCodeAt(i)];
|
48499
48482
|
if (label.length > 0) {
|
@@ -48907,9 +48890,9 @@ function executeSegmentQuery(db, query) {
|
|
48907
48890
|
let length2 = indices.length;
|
48908
48891
|
let outIndex = 0;
|
48909
48892
|
for (let i = 0; i < length2; ++i) {
|
48910
|
-
const
|
48911
|
-
if (predicate(
|
48912
|
-
indices[outIndex] =
|
48893
|
+
const index = indices[i];
|
48894
|
+
if (predicate(index)) {
|
48895
|
+
indices[outIndex] = index;
|
48913
48896
|
++outIndex;
|
48914
48897
|
}
|
48915
48898
|
}
|
@@ -48919,10 +48902,10 @@ function executeSegmentQuery(db, query) {
|
|
48919
48902
|
const values2 = db.labels.values;
|
48920
48903
|
const regexp = query.regexp, prefix = query.prefix;
|
48921
48904
|
if (regexp !== void 0) {
|
48922
|
-
filterIndices((
|
48905
|
+
filterIndices((index) => values2[index].match(regexp) !== null);
|
48923
48906
|
}
|
48924
48907
|
if (prefix !== void 0) {
|
48925
|
-
filterIndices((
|
48908
|
+
filterIndices((index) => values2[index].startsWith(prefix));
|
48926
48909
|
}
|
48927
48910
|
}
|
48928
48911
|
const includeTags = query.includeTags, excludeTags = query.excludeTags;
|
@@ -48956,7 +48939,7 @@ function executeSegmentQuery(db, query) {
|
|
48956
48939
|
addSkipPattern(65535);
|
48957
48940
|
pattern += "$";
|
48958
48941
|
const regexp = new RegExp(pattern);
|
48959
|
-
filterIndices((
|
48942
|
+
filterIndices((index) => values2[index].match(regexp) !== null);
|
48960
48943
|
}
|
48961
48944
|
let intermediateIndicesMask;
|
48962
48945
|
let intermediateIndices;
|
@@ -49553,9 +49536,9 @@ let SharedDisjointUint64Sets = SharedDisjointUint64Sets_1 = class SharedDisjoint
|
|
49553
49536
|
if (obj !== void 0) {
|
49554
49537
|
let ids = [new Uint64(), new Uint64()];
|
49555
49538
|
parseArray(obj, (z) => {
|
49556
|
-
parseArray(z, (s,
|
49557
|
-
ids[
|
49558
|
-
if (
|
49539
|
+
parseArray(z, (s, index) => {
|
49540
|
+
ids[index % 2].parseString(String(s), 10);
|
49541
|
+
if (index !== 0) {
|
49559
49542
|
this.link(ids[0], ids[1]);
|
49560
49543
|
}
|
49561
49544
|
});
|
@@ -49688,9 +49671,9 @@ class LocalSegmentationGraphSource extends SegmentationGraphSource {
|
|
49688
49671
|
}
|
49689
49672
|
const ids = [new Uint64(), new Uint64()];
|
49690
49673
|
parseArray(obj, (groupObj) => {
|
49691
|
-
parseArray(groupObj, (s,
|
49692
|
-
ids[
|
49693
|
-
if (
|
49674
|
+
parseArray(groupObj, (s, index) => {
|
49675
|
+
ids[index % 2].parseString(String(s), 10);
|
49676
|
+
if (index !== 0) {
|
49694
49677
|
if (equivalences.link(ids[0], ids[1])) {
|
49695
49678
|
this.addSpanningTreeEdge(ids[0], ids[1]);
|
49696
49679
|
}
|
@@ -52554,9 +52537,9 @@ function AnnotationRenderLayer(Base2, renderHelperType) {
|
|
52554
52537
|
const handler = getAnnotationTypeRenderHandler(annotationType);
|
52555
52538
|
let selectedIndex = 4294967295;
|
52556
52539
|
if (hoverValue !== void 0) {
|
52557
|
-
const
|
52558
|
-
if (
|
52559
|
-
selectedIndex =
|
52540
|
+
const index = idMap.get(hoverValue.id);
|
52541
|
+
if (index !== void 0) {
|
52542
|
+
selectedIndex = index * handler.pickIdsPerInstance;
|
52560
52543
|
}
|
52561
52544
|
}
|
52562
52545
|
count = Math.round(count * drawFraction);
|
@@ -52775,7 +52758,7 @@ const SpatiallyIndexedAnnotationLayer = (Base2) => {
|
|
52775
52758
|
wireFrameShader = shader;
|
52776
52759
|
}
|
52777
52760
|
forEachVisibleAnnotationChunk(projectionParameters, this.base.state.localPosition.value, this.renderScaleTarget.value, transformedSources[0], () => {
|
52778
|
-
}, (tsource,
|
52761
|
+
}, (tsource, index, drawFraction, physicalSpacing, pixelSpacing) => {
|
52779
52762
|
const chunk = tsource.source.chunks.get(tsource.curPositionInChunks.join());
|
52780
52763
|
let present;
|
52781
52764
|
if (chunk === void 0 || chunk.state !== ChunkState.GPU_MEMORY) {
|
@@ -52846,8 +52829,8 @@ class MergedAnnotationStates extends RefCounted {
|
|
52846
52829
|
this.updateRelationships();
|
52847
52830
|
this.changed.dispatch();
|
52848
52831
|
return () => {
|
52849
|
-
const
|
52850
|
-
this.states.splice(
|
52832
|
+
const index = this.states.indexOf(state);
|
52833
|
+
this.states.splice(index, 1);
|
52851
52834
|
this.updateRelationships();
|
52852
52835
|
this.changed.dispatch();
|
52853
52836
|
};
|
@@ -52893,7 +52876,7 @@ class AnnotationLayerView extends Tab {
|
|
52893
52876
|
this.previousHoverAnnotationLayerState = void 0;
|
52894
52877
|
this.virtualListSource = {
|
52895
52878
|
length: 0,
|
52896
|
-
render: (
|
52879
|
+
render: (index) => this.render(index),
|
52897
52880
|
changed: new Signal()
|
52898
52881
|
};
|
52899
52882
|
this.virtualList = new VirtualList({ source: this.virtualListSource });
|
@@ -53072,11 +53055,11 @@ class AnnotationLayerView extends Tab {
|
|
53072
53055
|
getRenderedAnnotationListElement(state, id, scrollIntoView = false) {
|
53073
53056
|
const attached = this.attachedAnnotationStates.get(state);
|
53074
53057
|
if (attached == void 0) return void 0;
|
53075
|
-
const
|
53076
|
-
if (
|
53077
|
-
const listIndex = attached.listOffset +
|
53058
|
+
const index = attached.idToIndex.get(id);
|
53059
|
+
if (index === void 0) return void 0;
|
53060
|
+
const listIndex = attached.listOffset + index;
|
53078
53061
|
if (scrollIntoView) {
|
53079
|
-
this.virtualList.scrollItemIntoView(
|
53062
|
+
this.virtualList.scrollItemIntoView(index);
|
53080
53063
|
}
|
53081
53064
|
return this.virtualList.getItemElement(listIndex);
|
53082
53065
|
}
|
@@ -53139,8 +53122,8 @@ class AnnotationLayerView extends Tab {
|
|
53139
53122
|
if (element === void 0) return;
|
53140
53123
|
element.classList.add("neuroglancer-annotation-hover");
|
53141
53124
|
}
|
53142
|
-
render(
|
53143
|
-
var _listElements$index = this.listElements[
|
53125
|
+
render(index) {
|
53126
|
+
var _listElements$index = this.listElements[index];
|
53144
53127
|
const annotation = _listElements$index.annotation, state = _listElements$index.state;
|
53145
53128
|
return this.makeAnnotationListElement(annotation, state);
|
53146
53129
|
}
|
@@ -53250,12 +53233,12 @@ class AnnotationLayerView extends Tab {
|
|
53250
53233
|
}
|
53251
53234
|
const info = this.attachedAnnotationStates.get(state);
|
53252
53235
|
if (info !== void 0) {
|
53253
|
-
const
|
53236
|
+
const index = info.annotations.length;
|
53254
53237
|
info.annotations = [];
|
53255
53238
|
info.idToIndex.clear();
|
53256
53239
|
this.listElements = [];
|
53257
53240
|
this.updateListLength();
|
53258
|
-
this.virtualListSource.changed.dispatch([{ retainCount: 0, deleteCount:
|
53241
|
+
this.virtualListSource.changed.dispatch([{ retainCount: 0, deleteCount: index, insertCount: 0 }]);
|
53259
53242
|
}
|
53260
53243
|
this.resetOnUpdate();
|
53261
53244
|
}
|
@@ -53270,10 +53253,10 @@ class AnnotationLayerView extends Tab {
|
|
53270
53253
|
}
|
53271
53254
|
const info = this.attachedAnnotationStates.get(state);
|
53272
53255
|
if (info !== void 0) {
|
53273
|
-
const
|
53256
|
+
const index = info.annotations.length;
|
53274
53257
|
info.annotations.push(annotation);
|
53275
|
-
info.idToIndex.set(annotation.id,
|
53276
|
-
const spliceStart = info.listOffset +
|
53258
|
+
info.idToIndex.set(annotation.id, index);
|
53259
|
+
const spliceStart = info.listOffset + index;
|
53277
53260
|
this.listElements.splice(spliceStart, 0, { state, annotation });
|
53278
53261
|
this.updateListLength();
|
53279
53262
|
this.virtualListSource.changed.dispatch([{ retainCount: spliceStart, deleteCount: 0, insertCount: 1 }]);
|
@@ -53291,10 +53274,10 @@ class AnnotationLayerView extends Tab {
|
|
53291
53274
|
}
|
53292
53275
|
const info = this.attachedAnnotationStates.get(state);
|
53293
53276
|
if (info !== void 0) {
|
53294
|
-
const
|
53295
|
-
if (
|
53296
|
-
const updateStart = info.listOffset +
|
53297
|
-
info.annotations[
|
53277
|
+
const index = info.idToIndex.get(annotation.id);
|
53278
|
+
if (index !== void 0) {
|
53279
|
+
const updateStart = info.listOffset + index;
|
53280
|
+
info.annotations[index] = annotation;
|
53298
53281
|
this.listElements[updateStart].annotation = annotation;
|
53299
53282
|
this.virtualListSource.changed.dispatch([{ retainCount: updateStart, deleteCount: 1, insertCount: 1 }]);
|
53300
53283
|
}
|
@@ -53313,13 +53296,13 @@ class AnnotationLayerView extends Tab {
|
|
53313
53296
|
const info = this.attachedAnnotationStates.get(state);
|
53314
53297
|
if (info !== void 0) {
|
53315
53298
|
const idToIndex = info.idToIndex;
|
53316
|
-
const
|
53317
|
-
if (
|
53318
|
-
const spliceStart = info.listOffset +
|
53299
|
+
const index = idToIndex.get(annotationId);
|
53300
|
+
if (index !== void 0) {
|
53301
|
+
const spliceStart = info.listOffset + index;
|
53319
53302
|
const annotations = info.annotations;
|
53320
|
-
annotations.splice(
|
53303
|
+
annotations.splice(index, 1);
|
53321
53304
|
idToIndex.delete(annotationId);
|
53322
|
-
for (let i =
|
53305
|
+
for (let i = index, length2 = annotations.length; i < length2; ++i) {
|
53323
53306
|
idToIndex.set(annotations[i].id, i);
|
53324
53307
|
}
|
53325
53308
|
this.listElements.splice(spliceStart, 1);
|
@@ -55179,19 +55162,19 @@ class SegmentListSource extends RefCounted {
|
|
55179
55162
|
this.selectedMatches = 0;
|
55180
55163
|
this.matchStatusTextPrefix = "";
|
55181
55164
|
this.debouncedUpdate = debounce(() => this.update(), 0);
|
55182
|
-
this.render = (
|
55165
|
+
this.render = (index) => {
|
55183
55166
|
const explicitSegments = this.explicitSegments;
|
55184
55167
|
let id;
|
55185
55168
|
let visibleList = false;
|
55186
|
-
if (explicitSegments !== void 0 &&
|
55187
|
-
id = explicitSegments[
|
55169
|
+
if (explicitSegments !== void 0 && index < explicitSegments.length) {
|
55170
|
+
id = explicitSegments[index];
|
55188
55171
|
visibleList = this.explicitSegmentsVisible;
|
55189
55172
|
} else {
|
55190
55173
|
if (explicitSegments !== void 0) {
|
55191
|
-
|
55174
|
+
index -= explicitSegments.length;
|
55192
55175
|
}
|
55193
55176
|
id = tempUint64;
|
55194
|
-
const propIndex = this.queryResult.value.indices[
|
55177
|
+
const propIndex = this.queryResult.value.indices[index];
|
55195
55178
|
const ids = this.segmentPropertyMap.segmentPropertyMap.inlineProperties.ids;
|
55196
55179
|
id.low = ids[propIndex * 2];
|
55197
55180
|
id.high = ids[propIndex * 2 + 1];
|
@@ -57666,9 +57649,9 @@ class RenderScaleWidget extends RefCounted {
|
|
57666
57649
|
for (let bin = 0; bin < numRenderScaleHistogramBins; ++bin) {
|
57667
57650
|
let count = 0;
|
57668
57651
|
for (let row = 0; row < numRows; ++row) {
|
57669
|
-
const
|
57670
|
-
const presentCount = histogramData[
|
57671
|
-
const notPresentCount = histogramData[
|
57652
|
+
const index = row * numRenderScaleHistogramBins * 2 + bin;
|
57653
|
+
const presentCount = histogramData[index];
|
57654
|
+
const notPresentCount = histogramData[index + numRenderScaleHistogramBins];
|
57672
57655
|
totalPresent += presentCount;
|
57673
57656
|
totalNotPresent += notPresentCount;
|
57674
57657
|
count += presentCount + notPresentCount;
|
@@ -57689,8 +57672,8 @@ class RenderScaleWidget extends RefCounted {
|
|
57689
57672
|
for (let spatialScaleIndex = numRows - 1; spatialScaleIndex >= 0; --spatialScaleIndex) {
|
57690
57673
|
const spatialScale = sortedSpatialScales[spatialScaleIndex];
|
57691
57674
|
const row = spatialScales.get(spatialScale);
|
57692
|
-
const
|
57693
|
-
const count = histogramData[
|
57675
|
+
const index = 2 * row * numRenderScaleHistogramBins + i;
|
57676
|
+
const count = histogramData[index] + histogramData[index + numRenderScaleHistogramBins];
|
57694
57677
|
if (count === 0) continue;
|
57695
57678
|
const yStart = Math.round(countToCanvasY(sum));
|
57696
57679
|
sum += count;
|
@@ -57708,9 +57691,9 @@ class RenderScaleWidget extends RefCounted {
|
|
57708
57691
|
const row = spatialScales.get(hoverSpatialScale);
|
57709
57692
|
const baseIndex = 2 * row * numRenderScaleHistogramBins;
|
57710
57693
|
for (let bin = 0; bin < numRenderScaleHistogramBins; ++bin) {
|
57711
|
-
const
|
57712
|
-
totalPresent += histogramData[
|
57713
|
-
totalNotPresent += histogramData[
|
57694
|
+
const index = baseIndex + bin;
|
57695
|
+
totalPresent += histogramData[index];
|
57696
|
+
totalNotPresent += histogramData[index + numRenderScaleHistogramBins];
|
57714
57697
|
}
|
57715
57698
|
if (_Number$isFinite(hoverSpatialScale)) {
|
57716
57699
|
this.legendSpatialScale.textContent = formatScaleWithUnitAsString(hoverSpatialScale, "m", { precision: 2, elide1: false });
|
@@ -57740,9 +57723,9 @@ class RenderScaleWidget extends RefCounted {
|
|
57740
57723
|
for (let spatialScaleIndex = numRows - 1; spatialScaleIndex >= 0; --spatialScaleIndex) {
|
57741
57724
|
const spatialScale = sortedSpatialScales[spatialScaleIndex];
|
57742
57725
|
const row = spatialScales.get(spatialScale);
|
57743
|
-
const
|
57744
|
-
const presentCount = histogramData[
|
57745
|
-
const notPresentCount = histogramData[
|
57726
|
+
const index = row * numRenderScaleHistogramBins * 2 + i;
|
57727
|
+
const presentCount = histogramData[index];
|
57728
|
+
const notPresentCount = histogramData[index + numRenderScaleHistogramBins];
|
57746
57729
|
const count = presentCount + notPresentCount;
|
57747
57730
|
if (count === 0) continue;
|
57748
57731
|
const xStart = Math.round(binToCanvasX(i));
|
@@ -58423,19 +58406,19 @@ class SegmentationUserLayer extends Base$2 {
|
|
58423
58406
|
if (segmentPropertyMap !== void 0) {
|
58424
58407
|
const inlineProperties = segmentPropertyMap.segmentPropertyMap.inlineProperties;
|
58425
58408
|
if (inlineProperties !== void 0) {
|
58426
|
-
const
|
58427
|
-
if (
|
58409
|
+
const index = segmentPropertyMap.getSegmentInlineIndex(mapped);
|
58410
|
+
if (index !== -1) {
|
58428
58411
|
for (const property of inlineProperties.properties) {
|
58429
58412
|
if (property.type === "label") continue;
|
58430
58413
|
if (property.type === "description") {
|
58431
|
-
const value2 = property.values[
|
58414
|
+
const value2 = property.values[index];
|
58432
58415
|
if (!value2) continue;
|
58433
58416
|
const descriptionElement = document.createElement("div");
|
58434
58417
|
descriptionElement.classList.add("neuroglancer-selection-details-segment-description");
|
58435
58418
|
descriptionElement.textContent = value2;
|
58436
58419
|
parent.appendChild(descriptionElement);
|
58437
58420
|
} else if (property.type === "number" || property.type === "string") {
|
58438
|
-
const value2 = property.values[
|
58421
|
+
const value2 = property.values[index];
|
58439
58422
|
if (property.type === "number" ? isNaN(value2) : !value2) continue;
|
58440
58423
|
const propertyElement = document.createElement("div");
|
58441
58424
|
propertyElement.classList.add("neuroglancer-selection-details-segment-property");
|
@@ -59382,11 +59365,11 @@ class UncompressedVolumeChunk extends SingleTextureVolumeChunk {
|
|
59382
59365
|
getValueAt(dataPosition) {
|
59383
59366
|
let chunkFormat = this.chunkFormat;
|
59384
59367
|
const chunkDataSize = this.chunkDataSize;
|
59385
|
-
let
|
59368
|
+
let index = 0;
|
59386
59369
|
let stride = 1;
|
59387
59370
|
const rank = dataPosition.length;
|
59388
59371
|
for (let i = 0; i < rank; ++i) {
|
59389
|
-
|
59372
|
+
index += stride * dataPosition[i];
|
59390
59373
|
stride *= chunkDataSize[i];
|
59391
59374
|
}
|
59392
59375
|
let dataType = chunkFormat.dataType;
|
@@ -59399,10 +59382,10 @@ class UncompressedVolumeChunk extends SingleTextureVolumeChunk {
|
|
59399
59382
|
case DataType.INT16:
|
59400
59383
|
case DataType.UINT32:
|
59401
59384
|
case DataType.INT32:
|
59402
|
-
return data[
|
59385
|
+
return data[index];
|
59403
59386
|
case DataType.UINT64: {
|
59404
|
-
let
|
59405
|
-
return new Uint64(data[
|
59387
|
+
let index2 = index * 2;
|
59388
|
+
return new Uint64(data[index2], data[index2 + 1]);
|
59406
59389
|
}
|
59407
59390
|
}
|
59408
59391
|
}
|
@@ -64067,9 +64050,9 @@ function getAttributesJsonUrls(url) {
|
|
64067
64050
|
const urls = [];
|
64068
64051
|
while (true) {
|
64069
64052
|
urls.push(`${protocol}://${host}${path}/attributes.json`);
|
64070
|
-
const
|
64071
|
-
if (
|
64072
|
-
path = path.substring(0,
|
64053
|
+
const index = path.lastIndexOf("/");
|
64054
|
+
if (index === -1) break;
|
64055
|
+
path = path.substring(0, index);
|
64073
64056
|
}
|
64074
64057
|
return urls;
|
64075
64058
|
}
|
@@ -66357,11 +66340,9 @@ function requireLib() {
|
|
66357
66340
|
return lib;
|
66358
66341
|
}
|
66359
66342
|
var libExports = requireLib();
|
66360
|
-
const
|
66361
|
-
const
|
66362
|
-
|
66363
|
-
default: index
|
66364
|
-
}, [libExports]);
|
66343
|
+
const ReactNeuroglancer = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
|
66344
|
+
const Component = typeof ReactNeuroglancer.default === "function" ? ReactNeuroglancer.default : ReactNeuroglancer;
|
66345
|
+
const ReactNeuroglancerWrapper = React__default.forwardRef((props, ref) => jsxRuntimeExports.jsx(Component, { ref, ...props }));
|
66365
66346
|
export {
|
66366
|
-
|
66347
|
+
ReactNeuroglancerWrapper as default
|
66367
66348
|
};
|