@vitessce/dev 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-CH6xVgIJ.js → ReactNeuroglancer-QIxsKJha.js} +268 -287
- package/dist/{deflate-BqKmzFTB.js → deflate-DqOXPY2p.js} +1 -1
- package/dist/{higlass-BmGFiDC1.js → higlass-BWGk5Vo4.js} +1 -1
- package/dist/{index-hqXsNPmS.js → index-OgvPhv-B.js} +2 -2
- package/dist/{index-BF_aRAFs.js → index-klVkXiXz.js} +11 -14
- package/dist/index.js +1 -1
- package/dist/{jpeg-jDO_wzKG.js → jpeg-BYGM34Gf.js} +1 -1
- package/dist/{lerc-DAaNg3of.js → lerc-DgI5TVje.js} +1 -1
- package/dist/{lzw-B5FaO-Xa.js → lzw-BZy7adSL.js} +1 -1
- package/dist/{packbits-DAILsjqv.js → packbits-CsMAtNMQ.js} +1 -1
- package/dist/{raw-B9Ch0aMC.js → raw-wRFrb2B4.js} +1 -1
- package/dist/{troika-three-text.esm-BQz5yyW9.js → troika-three-text.esm-C46nWpnf.js} +1 -1
- package/dist/{webimage-CFFOMtoD.js → webimage-SnG_Zd5a.js} +1 -1
- package/package.json +5 -5
|
@@ -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, bm as require_root, bn as require_baseGetTag, bo as requireIsObjectLike, bp as requireIsObject, bq as requireEs6_symbol, br as requireDefineProperty, bs as require_toIobject, bt as require_objectGopd, bu as require_html, bv as require_domCreate, bw as require_library, bx as requireSymbol, by as require_objectPie, bz as require_has, bA as require_redefine, bB as require_objectAssign, bC as getAugmentedNamespace, bD 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, bm as require_root, bn as require_baseGetTag, bo as requireIsObjectLike, bp as requireIsObject, bq as requireEs6_symbol, br as requireDefineProperty, bs as require_toIobject, bt as require_objectGopd, bu as require_html, bv as require_domCreate, bw as require_library, bx as requireSymbol, by as require_objectPie, bz as require_has, bA as require_redefine, bB as require_objectAssign, bC as getAugmentedNamespace, bD as requirePropTypes, aI as jsxRuntimeExports } from "./index-klVkXiXz.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
|
});
|
|
@@ -1251,10 +1232,10 @@ function require_trimmedEndIndex() {
|
|
|
1251
1232
|
hasRequired_trimmedEndIndex = 1;
|
|
1252
1233
|
var reWhitespace = /\s/;
|
|
1253
1234
|
function trimmedEndIndex(string) {
|
|
1254
|
-
var
|
|
1255
|
-
while (
|
|
1235
|
+
var index = string.length;
|
|
1236
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
1256
1237
|
}
|
|
1257
|
-
return
|
|
1238
|
+
return index;
|
|
1258
1239
|
}
|
|
1259
1240
|
_trimmedEndIndex = trimmedEndIndex;
|
|
1260
1241
|
return _trimmedEndIndex;
|
|
@@ -1479,9 +1460,9 @@ class RefCounted {
|
|
|
1479
1460
|
unregisterDisposer(f) {
|
|
1480
1461
|
let disposers = this.disposers;
|
|
1481
1462
|
if (disposers != null) {
|
|
1482
|
-
let
|
|
1483
|
-
if (
|
|
1484
|
-
disposers.splice(
|
|
1463
|
+
let index = disposers.indexOf(f);
|
|
1464
|
+
if (index !== -1) {
|
|
1465
|
+
disposers.splice(index, 1);
|
|
1485
1466
|
}
|
|
1486
1467
|
}
|
|
1487
1468
|
return f;
|
|
@@ -8585,10 +8566,10 @@ function requireEs6_promise() {
|
|
|
8585
8566
|
var reject = capability.reject;
|
|
8586
8567
|
var result = perform(function() {
|
|
8587
8568
|
var values2 = [];
|
|
8588
|
-
var
|
|
8569
|
+
var index = 0;
|
|
8589
8570
|
var remaining = 1;
|
|
8590
8571
|
forOf(iterable, false, function(promise2) {
|
|
8591
|
-
var $index =
|
|
8572
|
+
var $index = index++;
|
|
8592
8573
|
var alreadyCalled = false;
|
|
8593
8574
|
values2.push(void 0);
|
|
8594
8575
|
remaining++;
|
|
@@ -13664,9 +13645,9 @@ class RenderScaleHistogram {
|
|
|
13664
13645
|
newValue.set(value);
|
|
13665
13646
|
this.value = value = newValue;
|
|
13666
13647
|
}
|
|
13667
|
-
const
|
|
13668
|
-
value[
|
|
13669
|
-
value[
|
|
13648
|
+
const index = spatialScaleIndex * numRenderScaleHistogramBins * 2 + Math.min(Math.max(0, Math.round(getRenderScaleHistogramOffset(renderScale))), numRenderScaleHistogramBins - 1);
|
|
13649
|
+
value[index] += presentCount;
|
|
13650
|
+
value[index + numRenderScaleHistogramBins] += notPresentCount;
|
|
13670
13651
|
}
|
|
13671
13652
|
}
|
|
13672
13653
|
class SliceViewRenderLayer extends RenderLayer {
|
|
@@ -14643,10 +14624,10 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
|
14643
14624
|
const idMap = serializedAnnotations.typeToIdMaps[type];
|
|
14644
14625
|
const handler = annotationTypeHandlers[type];
|
|
14645
14626
|
const numBytes = propertySerializers[type].serializedBytes;
|
|
14646
|
-
let
|
|
14647
|
-
if (
|
|
14648
|
-
|
|
14649
|
-
idMap.set(annotation.id,
|
|
14627
|
+
let index = idMap.get(annotation.id);
|
|
14628
|
+
if (index === void 0) {
|
|
14629
|
+
index = idMap.size;
|
|
14630
|
+
idMap.set(annotation.id, index);
|
|
14650
14631
|
const newData = copyOtherAnnotations(serializedAnnotations, propertySerializers, type, numBytes);
|
|
14651
14632
|
copyAnnotationSlice(
|
|
14652
14633
|
serializedAnnotations,
|
|
@@ -14656,11 +14637,11 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
|
14656
14637
|
/*sourceBeginIndex=*/
|
|
14657
14638
|
0,
|
|
14658
14639
|
/*sourceEndIndex=*/
|
|
14659
|
-
|
|
14640
|
+
index,
|
|
14660
14641
|
/*destBeginIndex=*/
|
|
14661
14642
|
0,
|
|
14662
14643
|
/*destCount=*/
|
|
14663
|
-
|
|
14644
|
+
index + 1
|
|
14664
14645
|
);
|
|
14665
14646
|
ids.push(annotation.id);
|
|
14666
14647
|
serializedAnnotations.data = newData;
|
|
@@ -14669,15 +14650,15 @@ function updateAnnotation(chunk, annotation, propertySerializers) {
|
|
|
14669
14650
|
const dv = new DataView(serializedAnnotations.data.buffer, serializedAnnotations.data.byteOffset, serializedAnnotations.data.byteLength);
|
|
14670
14651
|
const isLittleEndian = ENDIANNESS === Endianness.LITTLE;
|
|
14671
14652
|
const propertySerializer = propertySerializers[type];
|
|
14672
|
-
handler.serialize(dv, bufferOffset + propertySerializer.propertyGroupBytes[0] *
|
|
14673
|
-
propertySerializer.serialize(dv, bufferOffset,
|
|
14653
|
+
handler.serialize(dv, bufferOffset + propertySerializer.propertyGroupBytes[0] * index, isLittleEndian, rank, annotation);
|
|
14654
|
+
propertySerializer.serialize(dv, bufferOffset, index, ids.length, isLittleEndian, annotation.properties);
|
|
14674
14655
|
chunk.bufferValid = false;
|
|
14675
14656
|
}
|
|
14676
14657
|
function deleteAnnotation(chunk, type, id, propertySerializers) {
|
|
14677
14658
|
const serializedAnnotations = chunk.serializedAnnotations;
|
|
14678
14659
|
const idMap = serializedAnnotations.typeToIdMaps[type];
|
|
14679
|
-
const
|
|
14680
|
-
if (
|
|
14660
|
+
const index = idMap.get(id);
|
|
14661
|
+
if (index === void 0) {
|
|
14681
14662
|
return false;
|
|
14682
14663
|
}
|
|
14683
14664
|
const ids = serializedAnnotations.typeToIds[type];
|
|
@@ -14691,7 +14672,7 @@ function deleteAnnotation(chunk, type, id, propertySerializers) {
|
|
|
14691
14672
|
/*sourceBeginIndex=*/
|
|
14692
14673
|
0,
|
|
14693
14674
|
/*sourceEndIndex=*/
|
|
14694
|
-
|
|
14675
|
+
index,
|
|
14695
14676
|
/*destBeginIndex=*/
|
|
14696
14677
|
0,
|
|
14697
14678
|
/*destCount=*/
|
|
@@ -14703,17 +14684,17 @@ function deleteAnnotation(chunk, type, id, propertySerializers) {
|
|
|
14703
14684
|
type,
|
|
14704
14685
|
newData,
|
|
14705
14686
|
/*sourceBeginIndex=*/
|
|
14706
|
-
|
|
14687
|
+
index + 1,
|
|
14707
14688
|
/*sourceEndIndex=*/
|
|
14708
14689
|
ids.length,
|
|
14709
14690
|
/*destBeginIndex=*/
|
|
14710
|
-
|
|
14691
|
+
index,
|
|
14711
14692
|
/*destCount=*/
|
|
14712
14693
|
ids.length - 1
|
|
14713
14694
|
);
|
|
14714
|
-
ids.splice(
|
|
14695
|
+
ids.splice(index, 1);
|
|
14715
14696
|
idMap.delete(id);
|
|
14716
|
-
for (let i =
|
|
14697
|
+
for (let i = index, count = ids.length; i < count; ++i) {
|
|
14717
14698
|
idMap.set(ids[i], i);
|
|
14718
14699
|
}
|
|
14719
14700
|
serializedAnnotations.data = newData;
|
|
@@ -15214,11 +15195,11 @@ function findSourceGroupBasedOnSeparator(path, separator) {
|
|
|
15214
15195
|
separator = "/";
|
|
15215
15196
|
}
|
|
15216
15197
|
}
|
|
15217
|
-
let
|
|
15218
|
-
if (
|
|
15198
|
+
let index = path.lastIndexOf(separator);
|
|
15199
|
+
if (index === -1) {
|
|
15219
15200
|
return 0;
|
|
15220
15201
|
}
|
|
15221
|
-
return
|
|
15202
|
+
return index + 1;
|
|
15222
15203
|
}
|
|
15223
15204
|
function suggestLayerNameBasedOnSeparator(path, separator) {
|
|
15224
15205
|
let groupIndex = findSourceGroupBasedOnSeparator(path, separator);
|
|
@@ -15540,11 +15521,11 @@ function require_collectionWeak() {
|
|
|
15540
15521
|
else this.a.push([key, value]);
|
|
15541
15522
|
},
|
|
15542
15523
|
"delete": function(key) {
|
|
15543
|
-
var
|
|
15524
|
+
var index = arrayFindIndex(this.a, function(it) {
|
|
15544
15525
|
return it[0] === key;
|
|
15545
15526
|
});
|
|
15546
|
-
if (~
|
|
15547
|
-
return !!~
|
|
15527
|
+
if (~index) this.a.splice(index, 1);
|
|
15528
|
+
return !!~index;
|
|
15548
15529
|
}
|
|
15549
15530
|
};
|
|
15550
15531
|
_collectionWeak = {
|
|
@@ -15867,9 +15848,9 @@ class LayerDataSource extends RefCounted {
|
|
|
15867
15848
|
this.messages.clearMessages();
|
|
15868
15849
|
if (spec.url.length === 0) {
|
|
15869
15850
|
if (layer.dataSources.length !== 1) {
|
|
15870
|
-
const
|
|
15871
|
-
if (
|
|
15872
|
-
layer.dataSources.splice(
|
|
15851
|
+
const index = layer.dataSources.indexOf(this);
|
|
15852
|
+
if (index !== -1) {
|
|
15853
|
+
layer.dataSources.splice(index, 1);
|
|
15873
15854
|
layer.dataSourcesChanged.dispatch();
|
|
15874
15855
|
this.dispose();
|
|
15875
15856
|
return;
|
|
@@ -16960,9 +16941,9 @@ class TrackableDisplayDimensions extends RefCounted {
|
|
|
16960
16941
|
const names = coordinateSpace.names;
|
|
16961
16942
|
let displayRank = 0;
|
|
16962
16943
|
for (const name2 of displayDimensionNames) {
|
|
16963
|
-
const
|
|
16964
|
-
if (
|
|
16965
|
-
displayDimensionIndices[displayRank++] =
|
|
16944
|
+
const index = names.indexOf(name2);
|
|
16945
|
+
if (index === -1) continue;
|
|
16946
|
+
displayDimensionIndices[displayRank++] = index;
|
|
16966
16947
|
}
|
|
16967
16948
|
if (displayRank === 0) {
|
|
16968
16949
|
this.reset();
|
|
@@ -17944,11 +17925,11 @@ class HashTableBase {
|
|
|
17944
17925
|
return this.indexOfPair(low, high) !== -1;
|
|
17945
17926
|
}
|
|
17946
17927
|
delete(x) {
|
|
17947
|
-
let
|
|
17948
|
-
if (
|
|
17928
|
+
let index = this.indexOf(x);
|
|
17929
|
+
if (index !== -1) {
|
|
17949
17930
|
let table = this.table;
|
|
17950
|
-
table[
|
|
17951
|
-
table[
|
|
17931
|
+
table[index] = this.emptyLow;
|
|
17932
|
+
table[index + 1] = this.emptyHigh;
|
|
17952
17933
|
++this.generation;
|
|
17953
17934
|
this.size--;
|
|
17954
17935
|
return true;
|
|
@@ -18922,13 +18903,13 @@ class HierarchicalMap {
|
|
|
18922
18903
|
*/
|
|
18923
18904
|
addParent(parent, priority) {
|
|
18924
18905
|
const parents = this.parents, parentPriorities = this.parentPriorities;
|
|
18925
|
-
let
|
|
18906
|
+
let index = 0;
|
|
18926
18907
|
const length2 = parents.length;
|
|
18927
|
-
while (
|
|
18928
|
-
++
|
|
18908
|
+
while (index < length2 && priority < parentPriorities[index]) {
|
|
18909
|
+
++index;
|
|
18929
18910
|
}
|
|
18930
|
-
parents.splice(
|
|
18931
|
-
parentPriorities.splice(
|
|
18911
|
+
parents.splice(index, 0, parent);
|
|
18912
|
+
parentPriorities.splice(index, 0, priority);
|
|
18932
18913
|
return () => {
|
|
18933
18914
|
this.removeParent(parent);
|
|
18934
18915
|
};
|
|
@@ -18937,12 +18918,12 @@ class HierarchicalMap {
|
|
|
18937
18918
|
* Unregisters `parent` as a parent.
|
|
18938
18919
|
*/
|
|
18939
18920
|
removeParent(parent) {
|
|
18940
|
-
const
|
|
18941
|
-
if (
|
|
18921
|
+
const index = this.parents.indexOf(parent);
|
|
18922
|
+
if (index === -1) {
|
|
18942
18923
|
throw new Error(`Attempt to remove non-existent parent map.`);
|
|
18943
18924
|
}
|
|
18944
|
-
this.parents.splice(
|
|
18945
|
-
this.parentPriorities.splice(
|
|
18925
|
+
this.parents.splice(index, 1);
|
|
18926
|
+
this.parentPriorities.splice(index, 1);
|
|
18946
18927
|
}
|
|
18947
18928
|
/**
|
|
18948
18929
|
* Register a direct binding.
|
|
@@ -20919,11 +20900,11 @@ class SegmentWidgetWithExtraColumnsFactory extends SegmentWidgetFactory {
|
|
|
20919
20900
|
const numericalProperties = this.numericalProperties;
|
|
20920
20901
|
const numericalPropertyIndices = this.template.numericalPropertyIndices;
|
|
20921
20902
|
if (numericalPropertyIndices.length > 0) {
|
|
20922
|
-
const
|
|
20923
|
-
if (
|
|
20903
|
+
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;
|
|
20904
|
+
if (index !== -1) {
|
|
20924
20905
|
const numericalPropertyWidths = this.numericalPropertyWidths;
|
|
20925
20906
|
for (let i = 0, n = numericalPropertyIndices.length; i < n; ++i) {
|
|
20926
|
-
const value = numericalProperties[i].values[
|
|
20907
|
+
const value = numericalProperties[i].values[index];
|
|
20927
20908
|
if (!isNaN(value)) {
|
|
20928
20909
|
const s = value.toString();
|
|
20929
20910
|
const w = s.length;
|
|
@@ -23048,20 +23029,20 @@ class CoordinateSpaceTransformWidget extends RefCounted {
|
|
|
23048
23029
|
const target = event.target;
|
|
23049
23030
|
if (target instanceof HTMLInputElement) {
|
|
23050
23031
|
updateInputFieldWidth(target);
|
|
23051
|
-
let
|
|
23052
|
-
if (
|
|
23053
|
-
this.inputScaleModified[
|
|
23032
|
+
let index = this.inputScaleElements.indexOf(target);
|
|
23033
|
+
if (index !== -1) {
|
|
23034
|
+
this.inputScaleModified[index] = true;
|
|
23054
23035
|
this.updateScaleValidity(target);
|
|
23055
23036
|
return;
|
|
23056
23037
|
}
|
|
23057
|
-
|
|
23058
|
-
if (
|
|
23059
|
-
this.outputScaleModified[
|
|
23038
|
+
index = this.outputScaleElements.indexOf(target);
|
|
23039
|
+
if (index !== -1) {
|
|
23040
|
+
this.outputScaleModified[index] = true;
|
|
23060
23041
|
this.updateScaleValidity(target);
|
|
23061
23042
|
return;
|
|
23062
23043
|
}
|
|
23063
|
-
|
|
23064
|
-
if (
|
|
23044
|
+
index = this.outputNameElements.indexOf(target);
|
|
23045
|
+
if (index !== -1) {
|
|
23065
23046
|
this.updateOutputNameValidity();
|
|
23066
23047
|
return;
|
|
23067
23048
|
}
|
|
@@ -23790,18 +23771,18 @@ class SizeEstimates {
|
|
|
23790
23771
|
get averageSize() {
|
|
23791
23772
|
return this.totalKnownSize / this.numItemsInTotalKnownSize;
|
|
23792
23773
|
}
|
|
23793
|
-
getEstimatedSize(
|
|
23774
|
+
getEstimatedSize(index) {
|
|
23794
23775
|
var _a;
|
|
23795
|
-
return (_a = this.itemSize[
|
|
23776
|
+
return (_a = this.itemSize[index]) !== null && _a !== void 0 ? _a : this.averageSize;
|
|
23796
23777
|
}
|
|
23797
23778
|
getEstimatedTotalSize() {
|
|
23798
23779
|
return this.totalKnownSize / this.numItemsInTotalKnownSize * this.itemSize.length;
|
|
23799
23780
|
}
|
|
23800
|
-
getEstimatedOffset(
|
|
23801
|
-
for (; hintIndex <
|
|
23781
|
+
getEstimatedOffset(index, hintIndex = 0, hintOffset = 0) {
|
|
23782
|
+
for (; hintIndex < index; ++hintIndex) {
|
|
23802
23783
|
hintOffset += this.getEstimatedSize(hintIndex);
|
|
23803
23784
|
}
|
|
23804
|
-
for (; hintIndex >
|
|
23785
|
+
for (; hintIndex > index; --hintIndex) {
|
|
23805
23786
|
hintOffset -= this.getEstimatedSize(hintIndex - 1);
|
|
23806
23787
|
}
|
|
23807
23788
|
return hintOffset;
|
|
@@ -24050,8 +24031,8 @@ class VirtualList extends RefCounted {
|
|
|
24050
24031
|
bottomItems.style.top = `${renderParams.anchorOffset}px`;
|
|
24051
24032
|
element.scrollTop = renderParams.scrollOffset;
|
|
24052
24033
|
}
|
|
24053
|
-
getItemElement(
|
|
24054
|
-
return this.renderedItems[
|
|
24034
|
+
getItemElement(index) {
|
|
24035
|
+
return this.renderedItems[index];
|
|
24055
24036
|
}
|
|
24056
24037
|
forEachRenderedItem(callback) {
|
|
24057
24038
|
var _renderParams2 = this.renderParams;
|
|
@@ -24068,15 +24049,15 @@ class VirtualList extends RefCounted {
|
|
|
24068
24049
|
this.state.anchorClientOffset = 0;
|
|
24069
24050
|
this.debouncedUpdateView();
|
|
24070
24051
|
}
|
|
24071
|
-
scrollItemIntoView(
|
|
24072
|
-
const itemStartOffset = this.sizes.getEstimatedOffset(
|
|
24073
|
-
const itemEndOffset = itemStartOffset + this.sizes.getEstimatedSize(
|
|
24052
|
+
scrollItemIntoView(index) {
|
|
24053
|
+
const itemStartOffset = this.sizes.getEstimatedOffset(index);
|
|
24054
|
+
const itemEndOffset = itemStartOffset + this.sizes.getEstimatedSize(index);
|
|
24074
24055
|
const startOffset = this.element.scrollTop;
|
|
24075
24056
|
if (itemStartOffset < startOffset) {
|
|
24076
|
-
this.state.anchorIndex =
|
|
24057
|
+
this.state.anchorIndex = index;
|
|
24077
24058
|
this.state.anchorClientOffset = 0;
|
|
24078
24059
|
} else if (itemStartOffset > startOffset && itemEndOffset > startOffset + this.element.offsetHeight) {
|
|
24079
|
-
this.state.anchorIndex =
|
|
24060
|
+
this.state.anchorIndex = index + 1;
|
|
24080
24061
|
this.state.anchorClientOffset = this.element.offsetHeight;
|
|
24081
24062
|
} else {
|
|
24082
24063
|
return;
|
|
@@ -24460,12 +24441,12 @@ class AutocompleteTextInput extends RefCounted {
|
|
|
24460
24441
|
completionsVirtualList = this.completionsVirtualList = new VirtualList({
|
|
24461
24442
|
source: {
|
|
24462
24443
|
length: completionResult.completions.length,
|
|
24463
|
-
render: (
|
|
24464
|
-
const completion = completionResult.completions[
|
|
24444
|
+
render: (index) => {
|
|
24445
|
+
const completion = completionResult.completions[index];
|
|
24465
24446
|
const completionElement = makeElement.call(completionResult, completion);
|
|
24466
24447
|
completionElement.classList.add("neuroglancer-multiline-autocomplete-completion");
|
|
24467
|
-
completionElement.dataset.completionIndex = `${
|
|
24468
|
-
if (this.activeIndex ===
|
|
24448
|
+
completionElement.dataset.completionIndex = `${index}`;
|
|
24449
|
+
if (this.activeIndex === index) {
|
|
24469
24450
|
completionElement.classList.add(ACTIVE_COMPLETION_CLASS_NAME);
|
|
24470
24451
|
}
|
|
24471
24452
|
return completionElement;
|
|
@@ -24564,7 +24545,7 @@ class AutocompleteTextInput extends RefCounted {
|
|
|
24564
24545
|
* This sets the active completion, which causes it to be highlighted and displayed as the hint.
|
|
24565
24546
|
* Additionally, if the user hits tab then it is chosen.
|
|
24566
24547
|
*/
|
|
24567
|
-
setActiveIndex(
|
|
24548
|
+
setActiveIndex(index) {
|
|
24568
24549
|
if (!this.dropdownContentsStale) {
|
|
24569
24550
|
let activeIndex = this.activeIndex;
|
|
24570
24551
|
const completionsVirtualList = this.completionsVirtualList;
|
|
@@ -24575,22 +24556,22 @@ class AutocompleteTextInput extends RefCounted {
|
|
|
24575
24556
|
prevElement.classList.remove(ACTIVE_COMPLETION_CLASS_NAME);
|
|
24576
24557
|
}
|
|
24577
24558
|
}
|
|
24578
|
-
if (
|
|
24579
|
-
let completionElement = completionsVirtualList.getItemElement(
|
|
24559
|
+
if (index !== -1) {
|
|
24560
|
+
let completionElement = completionsVirtualList.getItemElement(index);
|
|
24580
24561
|
if (completionElement !== void 0) {
|
|
24581
24562
|
completionElement.classList.add(ACTIVE_COMPLETION_CLASS_NAME);
|
|
24582
24563
|
}
|
|
24583
|
-
completionsVirtualList.scrollItemIntoView(
|
|
24564
|
+
completionsVirtualList.scrollItemIntoView(index);
|
|
24584
24565
|
}
|
|
24585
24566
|
}
|
|
24586
24567
|
}
|
|
24587
|
-
if (
|
|
24588
|
-
this.setHintValue(this.getCompletedValueByIndex(
|
|
24568
|
+
if (index !== -1) {
|
|
24569
|
+
this.setHintValue(this.getCompletedValueByIndex(index));
|
|
24589
24570
|
}
|
|
24590
|
-
this.activeIndex =
|
|
24571
|
+
this.activeIndex = index;
|
|
24591
24572
|
}
|
|
24592
|
-
getCompletedValueByIndex(
|
|
24593
|
-
return this.getCompletedValue(this.completionResult.completions[
|
|
24573
|
+
getCompletedValueByIndex(index) {
|
|
24574
|
+
return this.getCompletedValue(this.completionResult.completions[index].value);
|
|
24594
24575
|
}
|
|
24595
24576
|
getCompletedValue(completionValue) {
|
|
24596
24577
|
let completionResult = this.completionResult;
|
|
@@ -24656,8 +24637,8 @@ class AutocompleteTextInput extends RefCounted {
|
|
|
24656
24637
|
this.moveCaretToEndOfInput();
|
|
24657
24638
|
return true;
|
|
24658
24639
|
}
|
|
24659
|
-
selectCompletion(
|
|
24660
|
-
this.value = this.getCompletedValueByIndex(
|
|
24640
|
+
selectCompletion(index) {
|
|
24641
|
+
this.value = this.getCompletedValueByIndex(index);
|
|
24661
24642
|
this.moveCaretToEndOfInput();
|
|
24662
24643
|
}
|
|
24663
24644
|
/**
|
|
@@ -26351,13 +26332,13 @@ class PickIDManager {
|
|
|
26351
26332
|
let renderLayers = this.renderLayers, values2 = this.values;
|
|
26352
26333
|
let pickID = this.nextPickID;
|
|
26353
26334
|
this.nextPickID += count;
|
|
26354
|
-
let
|
|
26355
|
-
renderLayers[
|
|
26356
|
-
let valuesOffset =
|
|
26335
|
+
let index = renderLayers.length;
|
|
26336
|
+
renderLayers[index] = renderLayer;
|
|
26337
|
+
let valuesOffset = index * 3;
|
|
26357
26338
|
values2[valuesOffset] = pickID;
|
|
26358
26339
|
values2[valuesOffset + 1] = low;
|
|
26359
26340
|
values2[valuesOffset + 2] = high;
|
|
26360
|
-
this.pickData[
|
|
26341
|
+
this.pickData[index] = data;
|
|
26361
26342
|
return pickID;
|
|
26362
26343
|
}
|
|
26363
26344
|
/**
|
|
@@ -28678,9 +28659,9 @@ class DisplayDimensionsWidget extends RefCounted {
|
|
|
28678
28659
|
const names = coordinateSpace.names;
|
|
28679
28660
|
const rank = displayDimensionNames.length;
|
|
28680
28661
|
for (let i = 0; i < rank; ++i) {
|
|
28681
|
-
const
|
|
28682
|
-
if (
|
|
28683
|
-
dimensionIndices[i] =
|
|
28662
|
+
const index = names.indexOf(displayDimensionNames[i]);
|
|
28663
|
+
if (index === -1) return false;
|
|
28664
|
+
dimensionIndices[i] = index;
|
|
28684
28665
|
}
|
|
28685
28666
|
if (arraysEqual(dimensionIndices, displayDimensions.value.displayDimensionIndices)) {
|
|
28686
28667
|
return true;
|
|
@@ -29924,8 +29905,8 @@ class DropLayers {
|
|
|
29924
29905
|
for (const _ref of this.layers) {
|
|
29925
29906
|
var _ref2 = _slicedToArray(_ref, 2);
|
|
29926
29907
|
const layer = _ref2[0];
|
|
29927
|
-
const
|
|
29928
|
-
initializeLayerFromSpecShowErrorStatus(layer, spec[
|
|
29908
|
+
const index = _ref2[1];
|
|
29909
|
+
initializeLayerFromSpecShowErrorStatus(layer, spec[index]);
|
|
29929
29910
|
}
|
|
29930
29911
|
} catch (_a) {
|
|
29931
29912
|
return false;
|
|
@@ -30056,13 +30037,13 @@ function getDropLayers(event, manager, options) {
|
|
|
30056
30037
|
result.forceCopy = false;
|
|
30057
30038
|
result.layoutSpec = source.layoutSpec;
|
|
30058
30039
|
if (moveSupported) {
|
|
30059
|
-
source.layers.forEach((layer,
|
|
30060
|
-
result.layers.set(layer,
|
|
30040
|
+
source.layers.forEach((layer, index) => {
|
|
30041
|
+
result.layers.set(layer, index);
|
|
30061
30042
|
});
|
|
30062
30043
|
} else {
|
|
30063
|
-
source.layers.forEach((layer,
|
|
30044
|
+
source.layers.forEach((layer, index) => {
|
|
30064
30045
|
if (newTarget || !manager.layerManager.has(layer)) {
|
|
30065
|
-
result.layers.set(layer.addRef(),
|
|
30046
|
+
result.layers.set(layer.addRef(), index);
|
|
30066
30047
|
}
|
|
30067
30048
|
});
|
|
30068
30049
|
}
|
|
@@ -30071,14 +30052,14 @@ function getDropLayers(event, manager, options) {
|
|
|
30071
30052
|
const info = getLayerDragInfo(event);
|
|
30072
30053
|
if (info !== void 0) {
|
|
30073
30054
|
try {
|
|
30074
|
-
const layers = parseArray(info.parameters, (layerInfo,
|
|
30055
|
+
const layers = parseArray(info.parameters, (layerInfo, index) => {
|
|
30075
30056
|
const name2 = verifyObjectProperty(layerInfo, "name", verifyString);
|
|
30076
30057
|
let visible = verifyObjectProperty(layerInfo, "visible", verifyBoolean);
|
|
30077
30058
|
const newLayer = new ManagedUserLayer(name2, manager);
|
|
30078
30059
|
if (isLayerListPanel) visible = false;
|
|
30079
30060
|
newLayer.visible = visible;
|
|
30080
30061
|
newLayer.archived = isLayerListPanel;
|
|
30081
|
-
return [newLayer,
|
|
30062
|
+
return [newLayer, index];
|
|
30082
30063
|
});
|
|
30083
30064
|
const result = new DropLayers();
|
|
30084
30065
|
result.numSourceLayers = layers.length;
|
|
@@ -30147,10 +30128,10 @@ function registerLayerBarDropHandlers(panel, target, targetLayer, isLayerListPan
|
|
|
30147
30128
|
const layerManager = panel.manager.layerManager;
|
|
30148
30129
|
const existingLayers = new _Set();
|
|
30149
30130
|
let firstRemovalIndex = Number.POSITIVE_INFINITY;
|
|
30150
|
-
const managedLayers = layerManager.managedLayers = layerManager.managedLayers.filter((x,
|
|
30131
|
+
const managedLayers = layerManager.managedLayers = layerManager.managedLayers.filter((x, index) => {
|
|
30151
30132
|
if (dropLayers.layers.has(x)) {
|
|
30152
30133
|
if (firstRemovalIndex === Number.POSITIVE_INFINITY) {
|
|
30153
|
-
firstRemovalIndex =
|
|
30134
|
+
firstRemovalIndex = index;
|
|
30154
30135
|
}
|
|
30155
30136
|
existingLayers.add(x);
|
|
30156
30137
|
return false;
|
|
@@ -30272,7 +30253,9 @@ const svg_bin = "data:image/svg+xml,%3csvg%20role='img'%20xmlns='http://www.w3.o
|
|
|
30272
30253
|
function makeDeleteButton(options = {}) {
|
|
30273
30254
|
const icon = makeIcon(_Object$assign({ svg: svg_bin }, options));
|
|
30274
30255
|
const svg = icon.firstElementChild;
|
|
30275
|
-
svg
|
|
30256
|
+
if (svg) {
|
|
30257
|
+
svg.style.fill = "white";
|
|
30258
|
+
}
|
|
30276
30259
|
return icon;
|
|
30277
30260
|
}
|
|
30278
30261
|
var es6_string_raw = {};
|
|
@@ -31136,9 +31119,9 @@ class PositionWidget extends RefCounted {
|
|
|
31136
31119
|
let label = "";
|
|
31137
31120
|
if (coordinateArray != null) {
|
|
31138
31121
|
const coordinates = coordinateArray.coordinates;
|
|
31139
|
-
const
|
|
31140
|
-
if (
|
|
31141
|
-
label = coordinateArray.labels[
|
|
31122
|
+
const index = binarySearch(coordinates, newCoord, (a, b) => a - b);
|
|
31123
|
+
if (index !== coordinates.length) {
|
|
31124
|
+
label = coordinateArray.labels[index];
|
|
31142
31125
|
}
|
|
31143
31126
|
}
|
|
31144
31127
|
const labelElement = widget.coordinateLabel;
|
|
@@ -31549,14 +31532,14 @@ class EnumSelectWidget extends RefCounted {
|
|
|
31549
31532
|
this.element = document.createElement("select");
|
|
31550
31533
|
this.valueIndexMap = new _Map();
|
|
31551
31534
|
const element = this.element, valueIndexMap = this.valueIndexMap;
|
|
31552
|
-
let
|
|
31535
|
+
let index = 0;
|
|
31553
31536
|
for (const key of _Object$keys(model.enumType)) {
|
|
31554
31537
|
if (isNaN(Number(key))) {
|
|
31555
31538
|
const option = document.createElement("option");
|
|
31556
31539
|
option.textContent = option.value = key.toLowerCase();
|
|
31557
31540
|
element.appendChild(option);
|
|
31558
|
-
valueIndexMap.set(model.enumType[key],
|
|
31559
|
-
++
|
|
31541
|
+
valueIndexMap.set(model.enumType[key], index);
|
|
31542
|
+
++index;
|
|
31560
31543
|
}
|
|
31561
31544
|
}
|
|
31562
31545
|
this.registerDisposer(model.changed.add(() => this.updateView()));
|
|
@@ -32268,8 +32251,8 @@ class StackLayoutComponent extends RefCounted {
|
|
|
32268
32251
|
get viewer() {
|
|
32269
32252
|
return this.container.viewer;
|
|
32270
32253
|
}
|
|
32271
|
-
get(
|
|
32272
|
-
return LayoutComponentContainer.getFromElement(this.element.children[
|
|
32254
|
+
get(index) {
|
|
32255
|
+
return LayoutComponentContainer.getFromElement(this.element.children[index * 2 + 1]);
|
|
32273
32256
|
}
|
|
32274
32257
|
insertChild(spec, before) {
|
|
32275
32258
|
const child = new LayoutComponentContainer(this.viewer, spec, this);
|
|
@@ -33590,9 +33573,9 @@ function requireCodemirror() {
|
|
|
33590
33573
|
} else {
|
|
33591
33574
|
var map3 = emitter._handlers, arr = map3 && map3[type];
|
|
33592
33575
|
if (arr) {
|
|
33593
|
-
var
|
|
33594
|
-
if (
|
|
33595
|
-
map3[type] = arr.slice(0,
|
|
33576
|
+
var index = indexOf(arr, f);
|
|
33577
|
+
if (index > -1) {
|
|
33578
|
+
map3[type] = arr.slice(0, index).concat(arr.slice(index + 1));
|
|
33596
33579
|
}
|
|
33597
33580
|
}
|
|
33598
33581
|
}
|
|
@@ -36034,7 +36017,7 @@ function requireCodemirror() {
|
|
|
36034
36017
|
return PosWithInfo(lineNo2, ch, sticky, outside, x - baseX);
|
|
36035
36018
|
}
|
|
36036
36019
|
function coordsBidiPart(cm, lineObj, lineNo2, preparedMeasure, order, x, y) {
|
|
36037
|
-
var
|
|
36020
|
+
var index = findFirst(function(i2) {
|
|
36038
36021
|
var part2 = order[i2], ltr2 = part2.level != 1;
|
|
36039
36022
|
return boxIsAfter(cursorCoords(
|
|
36040
36023
|
cm,
|
|
@@ -36044,8 +36027,8 @@ function requireCodemirror() {
|
|
|
36044
36027
|
preparedMeasure
|
|
36045
36028
|
), x, y, true);
|
|
36046
36029
|
}, 0, order.length - 1);
|
|
36047
|
-
var part = order[
|
|
36048
|
-
if (
|
|
36030
|
+
var part = order[index];
|
|
36031
|
+
if (index > 0) {
|
|
36049
36032
|
var ltr = part.level != 1;
|
|
36050
36033
|
var start = cursorCoords(
|
|
36051
36034
|
cm,
|
|
@@ -36055,7 +36038,7 @@ function requireCodemirror() {
|
|
|
36055
36038
|
preparedMeasure
|
|
36056
36039
|
);
|
|
36057
36040
|
if (boxIsAfter(start, x, y, true) && start.top > y) {
|
|
36058
|
-
part = order[
|
|
36041
|
+
part = order[index - 1];
|
|
36059
36042
|
}
|
|
36060
36043
|
}
|
|
36061
36044
|
return part;
|
|
@@ -36299,21 +36282,21 @@ function requireCodemirror() {
|
|
|
36299
36282
|
cm.display.viewOffset = 0;
|
|
36300
36283
|
}
|
|
36301
36284
|
function viewCuttingPoint(cm, oldN, newN, dir) {
|
|
36302
|
-
var
|
|
36285
|
+
var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
|
|
36303
36286
|
if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) {
|
|
36304
|
-
return { index
|
|
36287
|
+
return { index, lineN: newN };
|
|
36305
36288
|
}
|
|
36306
36289
|
var n = cm.display.viewFrom;
|
|
36307
|
-
for (var i2 = 0; i2 <
|
|
36290
|
+
for (var i2 = 0; i2 < index; i2++) {
|
|
36308
36291
|
n += view[i2].size;
|
|
36309
36292
|
}
|
|
36310
36293
|
if (n != oldN) {
|
|
36311
36294
|
if (dir > 0) {
|
|
36312
|
-
if (
|
|
36295
|
+
if (index == view.length - 1) {
|
|
36313
36296
|
return null;
|
|
36314
36297
|
}
|
|
36315
|
-
diff = n + view[
|
|
36316
|
-
|
|
36298
|
+
diff = n + view[index].size - oldN;
|
|
36299
|
+
index++;
|
|
36317
36300
|
} else {
|
|
36318
36301
|
diff = n - oldN;
|
|
36319
36302
|
}
|
|
@@ -36321,13 +36304,13 @@ function requireCodemirror() {
|
|
|
36321
36304
|
newN += diff;
|
|
36322
36305
|
}
|
|
36323
36306
|
while (visualLineNo(cm.doc, newN) != newN) {
|
|
36324
|
-
if (
|
|
36307
|
+
if (index == (dir < 0 ? 0 : view.length - 1)) {
|
|
36325
36308
|
return null;
|
|
36326
36309
|
}
|
|
36327
|
-
newN += dir * view[
|
|
36328
|
-
|
|
36310
|
+
newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
|
|
36311
|
+
index += dir;
|
|
36329
36312
|
}
|
|
36330
|
-
return { index
|
|
36313
|
+
return { index, lineN: newN };
|
|
36331
36314
|
}
|
|
36332
36315
|
function adjustView(cm, from2, to) {
|
|
36333
36316
|
var display = cm.display, view = display.view;
|
|
@@ -39781,15 +39764,15 @@ function requireCodemirror() {
|
|
|
39781
39764
|
},
|
|
39782
39765
|
indexFromPos: function(coords) {
|
|
39783
39766
|
coords = clipPos(this, coords);
|
|
39784
|
-
var
|
|
39767
|
+
var index = coords.ch;
|
|
39785
39768
|
if (coords.line < this.first || coords.ch < 0) {
|
|
39786
39769
|
return 0;
|
|
39787
39770
|
}
|
|
39788
39771
|
var sepSize = this.lineSeparator().length;
|
|
39789
39772
|
this.iter(this.first, coords.line, function(line) {
|
|
39790
|
-
|
|
39773
|
+
index += line.text.length + sepSize;
|
|
39791
39774
|
});
|
|
39792
|
-
return
|
|
39775
|
+
return index;
|
|
39793
39776
|
},
|
|
39794
39777
|
copy: function(copyHistory) {
|
|
39795
39778
|
var doc2 = new Doc(
|
|
@@ -41302,11 +41285,11 @@ function requireCodemirror() {
|
|
|
41302
41285
|
if (!order) {
|
|
41303
41286
|
return range2;
|
|
41304
41287
|
}
|
|
41305
|
-
var
|
|
41288
|
+
var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
|
|
41306
41289
|
if (part.from != anchor.ch && part.to != anchor.ch) {
|
|
41307
41290
|
return range2;
|
|
41308
41291
|
}
|
|
41309
|
-
var boundary =
|
|
41292
|
+
var boundary = index + (part.from == anchor.ch == (part.level != 1) ? 0 : 1);
|
|
41310
41293
|
if (boundary == 0 || boundary == order.length) {
|
|
41311
41294
|
return range2;
|
|
41312
41295
|
}
|
|
@@ -41315,7 +41298,7 @@ function requireCodemirror() {
|
|
|
41315
41298
|
leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
|
|
41316
41299
|
} else {
|
|
41317
41300
|
var headIndex = getBidiPartAt(order, head.ch, head.sticky);
|
|
41318
|
-
var dir = headIndex -
|
|
41301
|
+
var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
|
|
41319
41302
|
if (headIndex == boundary - 1 || headIndex == boundary) {
|
|
41320
41303
|
leftSide = dir < 0;
|
|
41321
41304
|
} else {
|
|
@@ -45881,8 +45864,8 @@ class AnnotationToolStatusWidget extends RefCounted {
|
|
|
45881
45864
|
layerNumberElement.className = "neuroglancer-annotation-tool-status-widget-layer-number";
|
|
45882
45865
|
const managedLayer = tool.layer.managedLayer;
|
|
45883
45866
|
managedLayer.manager.rootLayers.updateNonArchivedLayerIndices();
|
|
45884
|
-
const
|
|
45885
|
-
layerNumberElement.textContent = (
|
|
45867
|
+
const index = managedLayer.nonArchivedLayerIndex;
|
|
45868
|
+
layerNumberElement.textContent = (index + 1).toString();
|
|
45886
45869
|
const descriptionElement = document.createElement("div");
|
|
45887
45870
|
descriptionElement.className = "neuroglancer-annotation-tool-status-widget-description";
|
|
45888
45871
|
descriptionElement.textContent = tool.description;
|
|
@@ -46834,11 +46817,11 @@ class UserLayer extends RefCounted {
|
|
|
46834
46817
|
}
|
|
46835
46818
|
removeRenderLayer(layer) {
|
|
46836
46819
|
const renderLayers = this.renderLayers, layersChanged = this.layersChanged;
|
|
46837
|
-
const
|
|
46838
|
-
if (
|
|
46820
|
+
const index = renderLayers.indexOf(layer);
|
|
46821
|
+
if (index === -1) {
|
|
46839
46822
|
throw new Error("Attempted to remove invalid RenderLayer");
|
|
46840
46823
|
}
|
|
46841
|
-
renderLayers.splice(
|
|
46824
|
+
renderLayers.splice(index, 1);
|
|
46842
46825
|
layer.layerChanged.remove(layersChanged.dispatch);
|
|
46843
46826
|
layer.userLayer = void 0;
|
|
46844
46827
|
layer.dispose();
|
|
@@ -47045,23 +47028,23 @@ class LayerManager extends RefCounted {
|
|
|
47045
47028
|
const generation = this.layersChanged.count;
|
|
47046
47029
|
if (generation === this.nonArchivedLayerIndexGeneration) return;
|
|
47047
47030
|
this.nonArchivedLayerIndexGeneration = generation;
|
|
47048
|
-
let
|
|
47031
|
+
let index = 0;
|
|
47049
47032
|
for (const layer of this.managedLayers) {
|
|
47050
47033
|
if (!layer.archived) {
|
|
47051
|
-
layer.nonArchivedLayerIndex =
|
|
47034
|
+
layer.nonArchivedLayerIndex = index++;
|
|
47052
47035
|
}
|
|
47053
47036
|
}
|
|
47054
47037
|
for (const layer of this.managedLayers) {
|
|
47055
47038
|
if (layer.archived) {
|
|
47056
|
-
layer.nonArchivedLayerIndex =
|
|
47039
|
+
layer.nonArchivedLayerIndex = index++;
|
|
47057
47040
|
}
|
|
47058
47041
|
}
|
|
47059
47042
|
}
|
|
47060
|
-
getLayerByNonArchivedIndex(
|
|
47043
|
+
getLayerByNonArchivedIndex(index) {
|
|
47061
47044
|
let i = 0;
|
|
47062
47045
|
for (const layer of this.managedLayers) {
|
|
47063
47046
|
if (!layer.archived) {
|
|
47064
|
-
if (i ===
|
|
47047
|
+
if (i === index) return layer;
|
|
47065
47048
|
++i;
|
|
47066
47049
|
}
|
|
47067
47050
|
}
|
|
@@ -47124,14 +47107,14 @@ class LayerManager extends RefCounted {
|
|
|
47124
47107
|
/**
|
|
47125
47108
|
* Assumes ownership of an existing reference to managedLayer.
|
|
47126
47109
|
*/
|
|
47127
|
-
addManagedLayer(managedLayer,
|
|
47110
|
+
addManagedLayer(managedLayer, index) {
|
|
47128
47111
|
this.updateSignalBindings(managedLayer, addSignalBinding);
|
|
47129
47112
|
this.layerSet.add(managedLayer);
|
|
47130
47113
|
managedLayer.containers.add(this);
|
|
47131
|
-
if (
|
|
47132
|
-
|
|
47114
|
+
if (index === void 0) {
|
|
47115
|
+
index = this.managedLayers.length;
|
|
47133
47116
|
}
|
|
47134
|
-
this.managedLayers.splice(
|
|
47117
|
+
this.managedLayers.splice(index, 0, managedLayer);
|
|
47135
47118
|
this.layersChanged.dispatch();
|
|
47136
47119
|
this.readyStateChanged.dispatch();
|
|
47137
47120
|
return managedLayer;
|
|
@@ -47158,19 +47141,19 @@ class LayerManager extends RefCounted {
|
|
|
47158
47141
|
this.layerSet.clear();
|
|
47159
47142
|
this.layersChanged.dispatch();
|
|
47160
47143
|
}
|
|
47161
|
-
remove(
|
|
47162
|
-
const layer = this.managedLayers[
|
|
47144
|
+
remove(index) {
|
|
47145
|
+
const layer = this.managedLayers[index];
|
|
47163
47146
|
this.unbindManagedLayer(layer);
|
|
47164
|
-
this.managedLayers.splice(
|
|
47147
|
+
this.managedLayers.splice(index, 1);
|
|
47165
47148
|
this.layerSet.delete(layer);
|
|
47166
47149
|
this.layersChanged.dispatch();
|
|
47167
47150
|
}
|
|
47168
47151
|
removeManagedLayer(managedLayer) {
|
|
47169
|
-
let
|
|
47170
|
-
if (
|
|
47152
|
+
let index = this.managedLayers.indexOf(managedLayer);
|
|
47153
|
+
if (index === -1) {
|
|
47171
47154
|
throw new Error(`Internal error: invalid managed layer.`);
|
|
47172
47155
|
}
|
|
47173
|
-
this.remove(
|
|
47156
|
+
this.remove(index);
|
|
47174
47157
|
}
|
|
47175
47158
|
reorderManagedLayer(oldIndex, newIndex) {
|
|
47176
47159
|
const numLayers = this.managedLayers.length;
|
|
@@ -48073,11 +48056,11 @@ class TopLevelLayerListSpecification extends LayerListSpecification {
|
|
|
48073
48056
|
}
|
|
48074
48057
|
}
|
|
48075
48058
|
}
|
|
48076
|
-
add(layer,
|
|
48059
|
+
add(layer, index) {
|
|
48077
48060
|
if (this.layerManager.managedLayers.indexOf(layer) === -1) {
|
|
48078
48061
|
layer.name = this.layerManager.getUniqueLayerName(layer.name);
|
|
48079
48062
|
}
|
|
48080
|
-
this.layerManager.addManagedLayer(layer,
|
|
48063
|
+
this.layerManager.addManagedLayer(layer, index);
|
|
48081
48064
|
}
|
|
48082
48065
|
toJSON() {
|
|
48083
48066
|
const result = [];
|
|
@@ -48151,12 +48134,12 @@ class LayerSubsetSpecification extends LayerListSpecification {
|
|
|
48151
48134
|
toJSON() {
|
|
48152
48135
|
return this.layerManager.managedLayers.map((x) => x.name);
|
|
48153
48136
|
}
|
|
48154
|
-
add(layer,
|
|
48137
|
+
add(layer, index) {
|
|
48155
48138
|
if (this.master.layerManager.managedLayers.indexOf(layer) === -1) {
|
|
48156
48139
|
layer.name = this.master.layerManager.getUniqueLayerName(layer.name);
|
|
48157
48140
|
this.master.layerManager.addManagedLayer(layer.addRef());
|
|
48158
48141
|
}
|
|
48159
|
-
this.layerManager.addManagedLayer(layer,
|
|
48142
|
+
this.layerManager.addManagedLayer(layer, index);
|
|
48160
48143
|
}
|
|
48161
48144
|
get rootLayers() {
|
|
48162
48145
|
return this.master.rootLayers;
|
|
@@ -48339,11 +48322,11 @@ function queryUint64PermutationHashMap(table, values2, low, high) {
|
|
|
48339
48322
|
const mask = table.length - 1;
|
|
48340
48323
|
while (true) {
|
|
48341
48324
|
hashCode = hashCode & mask;
|
|
48342
|
-
let
|
|
48343
|
-
if (
|
|
48344
|
-
--
|
|
48345
|
-
if (values2[2 *
|
|
48346
|
-
return
|
|
48325
|
+
let index = table[hashCode];
|
|
48326
|
+
if (index === 0) return -1;
|
|
48327
|
+
--index;
|
|
48328
|
+
if (values2[2 * index] === low && values2[2 * index + 1] === high) {
|
|
48329
|
+
return index;
|
|
48347
48330
|
}
|
|
48348
48331
|
++hashCode;
|
|
48349
48332
|
}
|
|
@@ -48371,16 +48354,16 @@ class PreprocessedSegmentPropertyMap {
|
|
|
48371
48354
|
return queryUint64PermutationHashMap(inlineIdToIndex, this.segmentPropertyMap.inlineProperties.ids, id.low, id.high);
|
|
48372
48355
|
}
|
|
48373
48356
|
getSegmentLabel(id) {
|
|
48374
|
-
const
|
|
48375
|
-
if (
|
|
48357
|
+
const index = this.getSegmentInlineIndex(id);
|
|
48358
|
+
if (index === -1) return void 0;
|
|
48376
48359
|
const labels = this.labels, tagsProperty = this.tags;
|
|
48377
48360
|
let label = "";
|
|
48378
48361
|
if (labels !== void 0) {
|
|
48379
|
-
label = labels.values[
|
|
48362
|
+
label = labels.values[index];
|
|
48380
48363
|
}
|
|
48381
48364
|
if (tagsProperty !== void 0) {
|
|
48382
48365
|
const tags = tagsProperty.tags, values2 = tagsProperty.values;
|
|
48383
|
-
let tagIndices = values2[
|
|
48366
|
+
let tagIndices = values2[index];
|
|
48384
48367
|
for (let i = 0, length2 = tagIndices.length; i < length2; ++i) {
|
|
48385
48368
|
const tag = tags[tagIndices.charCodeAt(i)];
|
|
48386
48369
|
if (label.length > 0) {
|
|
@@ -48794,9 +48777,9 @@ function executeSegmentQuery(db, query) {
|
|
|
48794
48777
|
let length2 = indices.length;
|
|
48795
48778
|
let outIndex = 0;
|
|
48796
48779
|
for (let i = 0; i < length2; ++i) {
|
|
48797
|
-
const
|
|
48798
|
-
if (predicate(
|
|
48799
|
-
indices[outIndex] =
|
|
48780
|
+
const index = indices[i];
|
|
48781
|
+
if (predicate(index)) {
|
|
48782
|
+
indices[outIndex] = index;
|
|
48800
48783
|
++outIndex;
|
|
48801
48784
|
}
|
|
48802
48785
|
}
|
|
@@ -48806,10 +48789,10 @@ function executeSegmentQuery(db, query) {
|
|
|
48806
48789
|
const values2 = db.labels.values;
|
|
48807
48790
|
const regexp = query.regexp, prefix = query.prefix;
|
|
48808
48791
|
if (regexp !== void 0) {
|
|
48809
|
-
filterIndices((
|
|
48792
|
+
filterIndices((index) => values2[index].match(regexp) !== null);
|
|
48810
48793
|
}
|
|
48811
48794
|
if (prefix !== void 0) {
|
|
48812
|
-
filterIndices((
|
|
48795
|
+
filterIndices((index) => values2[index].startsWith(prefix));
|
|
48813
48796
|
}
|
|
48814
48797
|
}
|
|
48815
48798
|
const includeTags = query.includeTags, excludeTags = query.excludeTags;
|
|
@@ -48843,7 +48826,7 @@ function executeSegmentQuery(db, query) {
|
|
|
48843
48826
|
addSkipPattern(65535);
|
|
48844
48827
|
pattern += "$";
|
|
48845
48828
|
const regexp = new RegExp(pattern);
|
|
48846
|
-
filterIndices((
|
|
48829
|
+
filterIndices((index) => values2[index].match(regexp) !== null);
|
|
48847
48830
|
}
|
|
48848
48831
|
let intermediateIndicesMask;
|
|
48849
48832
|
let intermediateIndices;
|
|
@@ -49440,9 +49423,9 @@ let SharedDisjointUint64Sets = SharedDisjointUint64Sets_1 = class SharedDisjoint
|
|
|
49440
49423
|
if (obj !== void 0) {
|
|
49441
49424
|
let ids = [new Uint64(), new Uint64()];
|
|
49442
49425
|
parseArray(obj, (z) => {
|
|
49443
|
-
parseArray(z, (s,
|
|
49444
|
-
ids[
|
|
49445
|
-
if (
|
|
49426
|
+
parseArray(z, (s, index) => {
|
|
49427
|
+
ids[index % 2].parseString(String(s), 10);
|
|
49428
|
+
if (index !== 0) {
|
|
49446
49429
|
this.link(ids[0], ids[1]);
|
|
49447
49430
|
}
|
|
49448
49431
|
});
|
|
@@ -49575,9 +49558,9 @@ class LocalSegmentationGraphSource extends SegmentationGraphSource {
|
|
|
49575
49558
|
}
|
|
49576
49559
|
const ids = [new Uint64(), new Uint64()];
|
|
49577
49560
|
parseArray(obj, (groupObj) => {
|
|
49578
|
-
parseArray(groupObj, (s,
|
|
49579
|
-
ids[
|
|
49580
|
-
if (
|
|
49561
|
+
parseArray(groupObj, (s, index) => {
|
|
49562
|
+
ids[index % 2].parseString(String(s), 10);
|
|
49563
|
+
if (index !== 0) {
|
|
49581
49564
|
if (equivalences.link(ids[0], ids[1])) {
|
|
49582
49565
|
this.addSpanningTreeEdge(ids[0], ids[1]);
|
|
49583
49566
|
}
|
|
@@ -52441,9 +52424,9 @@ function AnnotationRenderLayer(Base2, renderHelperType) {
|
|
|
52441
52424
|
const handler = getAnnotationTypeRenderHandler(annotationType);
|
|
52442
52425
|
let selectedIndex = 4294967295;
|
|
52443
52426
|
if (hoverValue !== void 0) {
|
|
52444
|
-
const
|
|
52445
|
-
if (
|
|
52446
|
-
selectedIndex =
|
|
52427
|
+
const index = idMap.get(hoverValue.id);
|
|
52428
|
+
if (index !== void 0) {
|
|
52429
|
+
selectedIndex = index * handler.pickIdsPerInstance;
|
|
52447
52430
|
}
|
|
52448
52431
|
}
|
|
52449
52432
|
count = Math.round(count * drawFraction);
|
|
@@ -52662,7 +52645,7 @@ const SpatiallyIndexedAnnotationLayer = (Base2) => {
|
|
|
52662
52645
|
wireFrameShader = shader;
|
|
52663
52646
|
}
|
|
52664
52647
|
forEachVisibleAnnotationChunk(projectionParameters, this.base.state.localPosition.value, this.renderScaleTarget.value, transformedSources[0], () => {
|
|
52665
|
-
}, (tsource,
|
|
52648
|
+
}, (tsource, index, drawFraction, physicalSpacing, pixelSpacing) => {
|
|
52666
52649
|
const chunk = tsource.source.chunks.get(tsource.curPositionInChunks.join());
|
|
52667
52650
|
let present;
|
|
52668
52651
|
if (chunk === void 0 || chunk.state !== ChunkState.GPU_MEMORY) {
|
|
@@ -52733,8 +52716,8 @@ class MergedAnnotationStates extends RefCounted {
|
|
|
52733
52716
|
this.updateRelationships();
|
|
52734
52717
|
this.changed.dispatch();
|
|
52735
52718
|
return () => {
|
|
52736
|
-
const
|
|
52737
|
-
this.states.splice(
|
|
52719
|
+
const index = this.states.indexOf(state);
|
|
52720
|
+
this.states.splice(index, 1);
|
|
52738
52721
|
this.updateRelationships();
|
|
52739
52722
|
this.changed.dispatch();
|
|
52740
52723
|
};
|
|
@@ -52780,7 +52763,7 @@ class AnnotationLayerView extends Tab {
|
|
|
52780
52763
|
this.previousHoverAnnotationLayerState = void 0;
|
|
52781
52764
|
this.virtualListSource = {
|
|
52782
52765
|
length: 0,
|
|
52783
|
-
render: (
|
|
52766
|
+
render: (index) => this.render(index),
|
|
52784
52767
|
changed: new Signal()
|
|
52785
52768
|
};
|
|
52786
52769
|
this.virtualList = new VirtualList({ source: this.virtualListSource });
|
|
@@ -52959,11 +52942,11 @@ class AnnotationLayerView extends Tab {
|
|
|
52959
52942
|
getRenderedAnnotationListElement(state, id, scrollIntoView = false) {
|
|
52960
52943
|
const attached = this.attachedAnnotationStates.get(state);
|
|
52961
52944
|
if (attached == void 0) return void 0;
|
|
52962
|
-
const
|
|
52963
|
-
if (
|
|
52964
|
-
const listIndex = attached.listOffset +
|
|
52945
|
+
const index = attached.idToIndex.get(id);
|
|
52946
|
+
if (index === void 0) return void 0;
|
|
52947
|
+
const listIndex = attached.listOffset + index;
|
|
52965
52948
|
if (scrollIntoView) {
|
|
52966
|
-
this.virtualList.scrollItemIntoView(
|
|
52949
|
+
this.virtualList.scrollItemIntoView(index);
|
|
52967
52950
|
}
|
|
52968
52951
|
return this.virtualList.getItemElement(listIndex);
|
|
52969
52952
|
}
|
|
@@ -53026,8 +53009,8 @@ class AnnotationLayerView extends Tab {
|
|
|
53026
53009
|
if (element === void 0) return;
|
|
53027
53010
|
element.classList.add("neuroglancer-annotation-hover");
|
|
53028
53011
|
}
|
|
53029
|
-
render(
|
|
53030
|
-
var _listElements$index = this.listElements[
|
|
53012
|
+
render(index) {
|
|
53013
|
+
var _listElements$index = this.listElements[index];
|
|
53031
53014
|
const annotation = _listElements$index.annotation, state = _listElements$index.state;
|
|
53032
53015
|
return this.makeAnnotationListElement(annotation, state);
|
|
53033
53016
|
}
|
|
@@ -53137,12 +53120,12 @@ class AnnotationLayerView extends Tab {
|
|
|
53137
53120
|
}
|
|
53138
53121
|
const info = this.attachedAnnotationStates.get(state);
|
|
53139
53122
|
if (info !== void 0) {
|
|
53140
|
-
const
|
|
53123
|
+
const index = info.annotations.length;
|
|
53141
53124
|
info.annotations = [];
|
|
53142
53125
|
info.idToIndex.clear();
|
|
53143
53126
|
this.listElements = [];
|
|
53144
53127
|
this.updateListLength();
|
|
53145
|
-
this.virtualListSource.changed.dispatch([{ retainCount: 0, deleteCount:
|
|
53128
|
+
this.virtualListSource.changed.dispatch([{ retainCount: 0, deleteCount: index, insertCount: 0 }]);
|
|
53146
53129
|
}
|
|
53147
53130
|
this.resetOnUpdate();
|
|
53148
53131
|
}
|
|
@@ -53157,10 +53140,10 @@ class AnnotationLayerView extends Tab {
|
|
|
53157
53140
|
}
|
|
53158
53141
|
const info = this.attachedAnnotationStates.get(state);
|
|
53159
53142
|
if (info !== void 0) {
|
|
53160
|
-
const
|
|
53143
|
+
const index = info.annotations.length;
|
|
53161
53144
|
info.annotations.push(annotation);
|
|
53162
|
-
info.idToIndex.set(annotation.id,
|
|
53163
|
-
const spliceStart = info.listOffset +
|
|
53145
|
+
info.idToIndex.set(annotation.id, index);
|
|
53146
|
+
const spliceStart = info.listOffset + index;
|
|
53164
53147
|
this.listElements.splice(spliceStart, 0, { state, annotation });
|
|
53165
53148
|
this.updateListLength();
|
|
53166
53149
|
this.virtualListSource.changed.dispatch([{ retainCount: spliceStart, deleteCount: 0, insertCount: 1 }]);
|
|
@@ -53178,10 +53161,10 @@ class AnnotationLayerView extends Tab {
|
|
|
53178
53161
|
}
|
|
53179
53162
|
const info = this.attachedAnnotationStates.get(state);
|
|
53180
53163
|
if (info !== void 0) {
|
|
53181
|
-
const
|
|
53182
|
-
if (
|
|
53183
|
-
const updateStart = info.listOffset +
|
|
53184
|
-
info.annotations[
|
|
53164
|
+
const index = info.idToIndex.get(annotation.id);
|
|
53165
|
+
if (index !== void 0) {
|
|
53166
|
+
const updateStart = info.listOffset + index;
|
|
53167
|
+
info.annotations[index] = annotation;
|
|
53185
53168
|
this.listElements[updateStart].annotation = annotation;
|
|
53186
53169
|
this.virtualListSource.changed.dispatch([{ retainCount: updateStart, deleteCount: 1, insertCount: 1 }]);
|
|
53187
53170
|
}
|
|
@@ -53200,13 +53183,13 @@ class AnnotationLayerView extends Tab {
|
|
|
53200
53183
|
const info = this.attachedAnnotationStates.get(state);
|
|
53201
53184
|
if (info !== void 0) {
|
|
53202
53185
|
const idToIndex = info.idToIndex;
|
|
53203
|
-
const
|
|
53204
|
-
if (
|
|
53205
|
-
const spliceStart = info.listOffset +
|
|
53186
|
+
const index = idToIndex.get(annotationId);
|
|
53187
|
+
if (index !== void 0) {
|
|
53188
|
+
const spliceStart = info.listOffset + index;
|
|
53206
53189
|
const annotations = info.annotations;
|
|
53207
|
-
annotations.splice(
|
|
53190
|
+
annotations.splice(index, 1);
|
|
53208
53191
|
idToIndex.delete(annotationId);
|
|
53209
|
-
for (let i =
|
|
53192
|
+
for (let i = index, length2 = annotations.length; i < length2; ++i) {
|
|
53210
53193
|
idToIndex.set(annotations[i].id, i);
|
|
53211
53194
|
}
|
|
53212
53195
|
this.listElements.splice(spliceStart, 1);
|
|
@@ -55066,19 +55049,19 @@ class SegmentListSource extends RefCounted {
|
|
|
55066
55049
|
this.selectedMatches = 0;
|
|
55067
55050
|
this.matchStatusTextPrefix = "";
|
|
55068
55051
|
this.debouncedUpdate = debounce(() => this.update(), 0);
|
|
55069
|
-
this.render = (
|
|
55052
|
+
this.render = (index) => {
|
|
55070
55053
|
const explicitSegments = this.explicitSegments;
|
|
55071
55054
|
let id;
|
|
55072
55055
|
let visibleList = false;
|
|
55073
|
-
if (explicitSegments !== void 0 &&
|
|
55074
|
-
id = explicitSegments[
|
|
55056
|
+
if (explicitSegments !== void 0 && index < explicitSegments.length) {
|
|
55057
|
+
id = explicitSegments[index];
|
|
55075
55058
|
visibleList = this.explicitSegmentsVisible;
|
|
55076
55059
|
} else {
|
|
55077
55060
|
if (explicitSegments !== void 0) {
|
|
55078
|
-
|
|
55061
|
+
index -= explicitSegments.length;
|
|
55079
55062
|
}
|
|
55080
55063
|
id = tempUint64;
|
|
55081
|
-
const propIndex = this.queryResult.value.indices[
|
|
55064
|
+
const propIndex = this.queryResult.value.indices[index];
|
|
55082
55065
|
const ids = this.segmentPropertyMap.segmentPropertyMap.inlineProperties.ids;
|
|
55083
55066
|
id.low = ids[propIndex * 2];
|
|
55084
55067
|
id.high = ids[propIndex * 2 + 1];
|
|
@@ -57553,9 +57536,9 @@ class RenderScaleWidget extends RefCounted {
|
|
|
57553
57536
|
for (let bin = 0; bin < numRenderScaleHistogramBins; ++bin) {
|
|
57554
57537
|
let count = 0;
|
|
57555
57538
|
for (let row = 0; row < numRows; ++row) {
|
|
57556
|
-
const
|
|
57557
|
-
const presentCount = histogramData[
|
|
57558
|
-
const notPresentCount = histogramData[
|
|
57539
|
+
const index = row * numRenderScaleHistogramBins * 2 + bin;
|
|
57540
|
+
const presentCount = histogramData[index];
|
|
57541
|
+
const notPresentCount = histogramData[index + numRenderScaleHistogramBins];
|
|
57559
57542
|
totalPresent += presentCount;
|
|
57560
57543
|
totalNotPresent += notPresentCount;
|
|
57561
57544
|
count += presentCount + notPresentCount;
|
|
@@ -57576,8 +57559,8 @@ class RenderScaleWidget extends RefCounted {
|
|
|
57576
57559
|
for (let spatialScaleIndex = numRows - 1; spatialScaleIndex >= 0; --spatialScaleIndex) {
|
|
57577
57560
|
const spatialScale = sortedSpatialScales[spatialScaleIndex];
|
|
57578
57561
|
const row = spatialScales.get(spatialScale);
|
|
57579
|
-
const
|
|
57580
|
-
const count = histogramData[
|
|
57562
|
+
const index = 2 * row * numRenderScaleHistogramBins + i;
|
|
57563
|
+
const count = histogramData[index] + histogramData[index + numRenderScaleHistogramBins];
|
|
57581
57564
|
if (count === 0) continue;
|
|
57582
57565
|
const yStart = Math.round(countToCanvasY(sum));
|
|
57583
57566
|
sum += count;
|
|
@@ -57595,9 +57578,9 @@ class RenderScaleWidget extends RefCounted {
|
|
|
57595
57578
|
const row = spatialScales.get(hoverSpatialScale);
|
|
57596
57579
|
const baseIndex = 2 * row * numRenderScaleHistogramBins;
|
|
57597
57580
|
for (let bin = 0; bin < numRenderScaleHistogramBins; ++bin) {
|
|
57598
|
-
const
|
|
57599
|
-
totalPresent += histogramData[
|
|
57600
|
-
totalNotPresent += histogramData[
|
|
57581
|
+
const index = baseIndex + bin;
|
|
57582
|
+
totalPresent += histogramData[index];
|
|
57583
|
+
totalNotPresent += histogramData[index + numRenderScaleHistogramBins];
|
|
57601
57584
|
}
|
|
57602
57585
|
if (_Number$isFinite(hoverSpatialScale)) {
|
|
57603
57586
|
this.legendSpatialScale.textContent = formatScaleWithUnitAsString(hoverSpatialScale, "m", { precision: 2, elide1: false });
|
|
@@ -57627,9 +57610,9 @@ class RenderScaleWidget extends RefCounted {
|
|
|
57627
57610
|
for (let spatialScaleIndex = numRows - 1; spatialScaleIndex >= 0; --spatialScaleIndex) {
|
|
57628
57611
|
const spatialScale = sortedSpatialScales[spatialScaleIndex];
|
|
57629
57612
|
const row = spatialScales.get(spatialScale);
|
|
57630
|
-
const
|
|
57631
|
-
const presentCount = histogramData[
|
|
57632
|
-
const notPresentCount = histogramData[
|
|
57613
|
+
const index = row * numRenderScaleHistogramBins * 2 + i;
|
|
57614
|
+
const presentCount = histogramData[index];
|
|
57615
|
+
const notPresentCount = histogramData[index + numRenderScaleHistogramBins];
|
|
57633
57616
|
const count = presentCount + notPresentCount;
|
|
57634
57617
|
if (count === 0) continue;
|
|
57635
57618
|
const xStart = Math.round(binToCanvasX(i));
|
|
@@ -58310,19 +58293,19 @@ class SegmentationUserLayer extends Base$2 {
|
|
|
58310
58293
|
if (segmentPropertyMap !== void 0) {
|
|
58311
58294
|
const inlineProperties = segmentPropertyMap.segmentPropertyMap.inlineProperties;
|
|
58312
58295
|
if (inlineProperties !== void 0) {
|
|
58313
|
-
const
|
|
58314
|
-
if (
|
|
58296
|
+
const index = segmentPropertyMap.getSegmentInlineIndex(mapped);
|
|
58297
|
+
if (index !== -1) {
|
|
58315
58298
|
for (const property of inlineProperties.properties) {
|
|
58316
58299
|
if (property.type === "label") continue;
|
|
58317
58300
|
if (property.type === "description") {
|
|
58318
|
-
const value2 = property.values[
|
|
58301
|
+
const value2 = property.values[index];
|
|
58319
58302
|
if (!value2) continue;
|
|
58320
58303
|
const descriptionElement = document.createElement("div");
|
|
58321
58304
|
descriptionElement.classList.add("neuroglancer-selection-details-segment-description");
|
|
58322
58305
|
descriptionElement.textContent = value2;
|
|
58323
58306
|
parent.appendChild(descriptionElement);
|
|
58324
58307
|
} else if (property.type === "number" || property.type === "string") {
|
|
58325
|
-
const value2 = property.values[
|
|
58308
|
+
const value2 = property.values[index];
|
|
58326
58309
|
if (property.type === "number" ? isNaN(value2) : !value2) continue;
|
|
58327
58310
|
const propertyElement = document.createElement("div");
|
|
58328
58311
|
propertyElement.classList.add("neuroglancer-selection-details-segment-property");
|
|
@@ -59269,11 +59252,11 @@ class UncompressedVolumeChunk extends SingleTextureVolumeChunk {
|
|
|
59269
59252
|
getValueAt(dataPosition) {
|
|
59270
59253
|
let chunkFormat = this.chunkFormat;
|
|
59271
59254
|
const chunkDataSize = this.chunkDataSize;
|
|
59272
|
-
let
|
|
59255
|
+
let index = 0;
|
|
59273
59256
|
let stride = 1;
|
|
59274
59257
|
const rank = dataPosition.length;
|
|
59275
59258
|
for (let i = 0; i < rank; ++i) {
|
|
59276
|
-
|
|
59259
|
+
index += stride * dataPosition[i];
|
|
59277
59260
|
stride *= chunkDataSize[i];
|
|
59278
59261
|
}
|
|
59279
59262
|
let dataType = chunkFormat.dataType;
|
|
@@ -59286,10 +59269,10 @@ class UncompressedVolumeChunk extends SingleTextureVolumeChunk {
|
|
|
59286
59269
|
case DataType.INT16:
|
|
59287
59270
|
case DataType.UINT32:
|
|
59288
59271
|
case DataType.INT32:
|
|
59289
|
-
return data[
|
|
59272
|
+
return data[index];
|
|
59290
59273
|
case DataType.UINT64: {
|
|
59291
|
-
let
|
|
59292
|
-
return new Uint64(data[
|
|
59274
|
+
let index2 = index * 2;
|
|
59275
|
+
return new Uint64(data[index2], data[index2 + 1]);
|
|
59293
59276
|
}
|
|
59294
59277
|
}
|
|
59295
59278
|
}
|
|
@@ -63954,9 +63937,9 @@ function getAttributesJsonUrls(url) {
|
|
|
63954
63937
|
const urls = [];
|
|
63955
63938
|
while (true) {
|
|
63956
63939
|
urls.push(`${protocol}://${host}${path}/attributes.json`);
|
|
63957
|
-
const
|
|
63958
|
-
if (
|
|
63959
|
-
path = path.substring(0,
|
|
63940
|
+
const index = path.lastIndexOf("/");
|
|
63941
|
+
if (index === -1) break;
|
|
63942
|
+
path = path.substring(0, index);
|
|
63960
63943
|
}
|
|
63961
63944
|
return urls;
|
|
63962
63945
|
}
|
|
@@ -66244,11 +66227,9 @@ function requireLib() {
|
|
|
66244
66227
|
return lib;
|
|
66245
66228
|
}
|
|
66246
66229
|
var libExports = requireLib();
|
|
66247
|
-
const
|
|
66248
|
-
const
|
|
66249
|
-
|
|
66250
|
-
default: index
|
|
66251
|
-
}, [libExports]);
|
|
66230
|
+
const ReactNeuroglancer = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
|
|
66231
|
+
const Component = typeof ReactNeuroglancer.default === "function" ? ReactNeuroglancer.default : ReactNeuroglancer;
|
|
66232
|
+
const ReactNeuroglancerWrapper = React__default.forwardRef((props, ref) => jsxRuntimeExports.jsx(Component, { ref, ...props }));
|
|
66252
66233
|
export {
|
|
66253
|
-
|
|
66234
|
+
ReactNeuroglancerWrapper as default
|
|
66254
66235
|
};
|