@vitessce/heatmap 3.2.1 → 3.3.0
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/{deflate-7ab0abb4.js → deflate-3d857d4d.js} +1 -1
- package/dist/{index-c1121c91.js → index-3c0e8e85.js} +172 -42
- package/dist/index.js +1 -1
- package/dist/{jpeg-71ae1b4c.js → jpeg-793f8655.js} +1 -1
- package/dist/{lerc-2f30a422.js → lerc-e636506e.js} +1 -1
- package/dist/{lzw-c78ce1c8.js → lzw-72ff5da2.js} +1 -1
- package/dist/{packbits-5b39eff5.js → packbits-f9a71497.js} +1 -1
- package/dist/{raw-f53bb94a.js → raw-7b8f8ab9.js} +1 -1
- package/dist/{webimage-33f727db.js → webimage-bddf84dc.js} +1 -1
- package/package.json +9 -9
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
1
7
|
import * as React from "react";
|
|
2
8
|
import React__default, { Children, isValidElement, cloneElement, useRef, useMemo, useEffect, useLayoutEffect, createElement, forwardRef, useState, useImperativeHandle, useReducer, useCallback, useContext } from "react";
|
|
3
9
|
import { useVitessceContainer, useComponentHover, useComponentViewInfo, usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useSetComponentHover, useSetComponentViewInfo, useCoordination, useDeckCanvasSize, useMultiObsLabels, useFeatureLabelsData, useObsFeatureMatrixData, useObsSetsData, useReady, useUrls, useUint8ObsFeatureMatrix, useGetObsInfo, useGetObsMembership, TitleInfo } from "@vitessce/vit-s";
|
|
@@ -10867,6 +10873,7 @@ const DataType$2 = {
|
|
|
10867
10873
|
const FileType$1 = {
|
|
10868
10874
|
// Joint file types
|
|
10869
10875
|
ANNDATA_ZARR: "anndata.zarr",
|
|
10876
|
+
SPATIALDATA_ZARR: "spatialdata.zarr",
|
|
10870
10877
|
// Atomic file types
|
|
10871
10878
|
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
10872
10879
|
OBS_SPOTS_CSV: "obsSpots.csv",
|
|
@@ -10889,6 +10896,16 @@ const FileType$1 = {
|
|
|
10889
10896
|
OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
|
|
10890
10897
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
10891
10898
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
10899
|
+
// SpatialData
|
|
10900
|
+
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
10901
|
+
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
10902
|
+
SHAPES_SPATIALDATA_ZARR: "shapes.spatialdata.zarr",
|
|
10903
|
+
OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
|
|
10904
|
+
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
10905
|
+
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
10906
|
+
// TODO:
|
|
10907
|
+
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
10908
|
+
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
10892
10909
|
// MuData
|
|
10893
10910
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
10894
10911
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -11690,9 +11707,30 @@ z.object({
|
|
|
11690
11707
|
offsetsUrl: z.string().optional(),
|
|
11691
11708
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11692
11709
|
});
|
|
11693
|
-
z.object({
|
|
11710
|
+
const imageOmeZarrSchema = z.object({
|
|
11694
11711
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11695
11712
|
});
|
|
11713
|
+
imageOmeZarrSchema.extend({
|
|
11714
|
+
path: z.string()
|
|
11715
|
+
});
|
|
11716
|
+
z.object({
|
|
11717
|
+
path: z.string()
|
|
11718
|
+
});
|
|
11719
|
+
z.object({
|
|
11720
|
+
path: z.string()
|
|
11721
|
+
});
|
|
11722
|
+
z.object({
|
|
11723
|
+
path: z.string(),
|
|
11724
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
11725
|
+
});
|
|
11726
|
+
annDataObsFeatureMatrix.extend({
|
|
11727
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
11728
|
+
});
|
|
11729
|
+
z.object({
|
|
11730
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
11731
|
+
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
11732
|
+
obsSets: annDataObsSets
|
|
11733
|
+
});
|
|
11696
11734
|
z.object({
|
|
11697
11735
|
obsIndex: z.string(),
|
|
11698
11736
|
obsEmbedding: z.array(z.string()).length(2)
|
|
@@ -18354,9 +18392,9 @@ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [2
|
|
|
18354
18392
|
function rgbSpline(spline) {
|
|
18355
18393
|
return (colors) => {
|
|
18356
18394
|
const n2 = colors.length;
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18395
|
+
const r2 = new Array(n2);
|
|
18396
|
+
const g2 = new Array(n2);
|
|
18397
|
+
const b = new Array(n2);
|
|
18360
18398
|
let i2;
|
|
18361
18399
|
let color2;
|
|
18362
18400
|
for (i2 = 0; i2 < n2; ++i2) {
|
|
@@ -18365,10 +18403,10 @@ function rgbSpline(spline) {
|
|
|
18365
18403
|
g2[i2] = color2[1] || 0;
|
|
18366
18404
|
b[i2] = color2[2] || 0;
|
|
18367
18405
|
}
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
return (t2) => [
|
|
18406
|
+
const rFunc = spline(r2);
|
|
18407
|
+
const gFunc = spline(g2);
|
|
18408
|
+
const bFunc = spline(b);
|
|
18409
|
+
return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
|
|
18372
18410
|
};
|
|
18373
18411
|
}
|
|
18374
18412
|
function basis(values2) {
|
|
@@ -18404,17 +18442,19 @@ function getCellColors(params) {
|
|
|
18404
18442
|
}
|
|
18405
18443
|
return /* @__PURE__ */ new Map();
|
|
18406
18444
|
}
|
|
18407
|
-
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 :
|
|
18445
|
+
const defaultPoolSize = typeof navigator !== "undefined" ? navigator.hardwareConcurrency || 4 : 1;
|
|
18408
18446
|
class Pool {
|
|
18409
18447
|
/**
|
|
18410
18448
|
* @constructor
|
|
18411
18449
|
* @param {object} Worker The worker class to be used for processing.
|
|
18412
18450
|
*/
|
|
18413
18451
|
constructor(createWorker2) {
|
|
18452
|
+
__publicField(this, "workers");
|
|
18453
|
+
__publicField(this, "idleWorkers");
|
|
18454
|
+
__publicField(this, "waitQueue");
|
|
18414
18455
|
this.workers = [];
|
|
18415
18456
|
this.idleWorkers = [];
|
|
18416
18457
|
this.waitQueue = [];
|
|
18417
|
-
this.decoder = null;
|
|
18418
18458
|
for (let i2 = 0; i2 < defaultPoolSize; ++i2) {
|
|
18419
18459
|
const w2 = createWorker2();
|
|
18420
18460
|
this.workers.push(w2);
|
|
@@ -18439,7 +18479,7 @@ class Pool {
|
|
|
18439
18479
|
}
|
|
18440
18480
|
async finishTask(currentWorker) {
|
|
18441
18481
|
const waiter = this.waitQueue.pop();
|
|
18442
|
-
if (waiter) {
|
|
18482
|
+
if (waiter && waiter.resolve) {
|
|
18443
18483
|
waiter.resolve(currentWorker);
|
|
18444
18484
|
} else {
|
|
18445
18485
|
this.idleWorkers.push(currentWorker);
|
|
@@ -30597,9 +30637,9 @@ function Legend(props2) {
|
|
|
30597
30637
|
const hasSubLabel = subLabel !== null;
|
|
30598
30638
|
if (!isSetColor) {
|
|
30599
30639
|
g2.append("text").attr("text-anchor", hasSubLabel ? "start" : "end").attr("dominant-baseline", "hanging").attr("x", hasSubLabel ? 0 : width).attr("y", 0).text(mainLabel).style("font-size", "10px").style("fill", foregroundColor);
|
|
30600
|
-
|
|
30601
|
-
|
|
30602
|
-
|
|
30640
|
+
if (hasSubLabel) {
|
|
30641
|
+
g2.append("text").attr("text-anchor", "end").attr("dominant-baseline", "hanging").attr("x", width).attr("y", titleHeight).text(subLabel).style("font-size", "9px").style("fill", foregroundColor);
|
|
30642
|
+
}
|
|
30603
30643
|
}
|
|
30604
30644
|
}, [
|
|
30605
30645
|
width,
|
|
@@ -132521,16 +132561,16 @@ function addDecoder(cases, importFn) {
|
|
|
132521
132561
|
}
|
|
132522
132562
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
132523
132563
|
}
|
|
132524
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
132525
|
-
addDecoder(5, () => import("./lzw-
|
|
132564
|
+
addDecoder([void 0, 1], () => import("./raw-7b8f8ab9.js").then((m) => m.default));
|
|
132565
|
+
addDecoder(5, () => import("./lzw-72ff5da2.js").then((m) => m.default));
|
|
132526
132566
|
addDecoder(6, () => {
|
|
132527
132567
|
throw new Error("old style JPEG compression is not supported.");
|
|
132528
132568
|
});
|
|
132529
|
-
addDecoder(7, () => import("./jpeg-
|
|
132530
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
132531
|
-
addDecoder(32773, () => import("./packbits-
|
|
132532
|
-
addDecoder(34887, () => import("./lerc-
|
|
132533
|
-
addDecoder(50001, () => import("./webimage-
|
|
132569
|
+
addDecoder(7, () => import("./jpeg-793f8655.js").then((m) => m.default));
|
|
132570
|
+
addDecoder([8, 32946], () => import("./deflate-3d857d4d.js").then((m) => m.default));
|
|
132571
|
+
addDecoder(32773, () => import("./packbits-f9a71497.js").then((m) => m.default));
|
|
132572
|
+
addDecoder(34887, () => import("./lerc-e636506e.js").then((m) => m.default));
|
|
132573
|
+
addDecoder(50001, () => import("./webimage-bddf84dc.js").then((m) => m.default));
|
|
132534
132574
|
function decodeRowAcc(row, stride) {
|
|
132535
132575
|
let length2 = row.length - stride;
|
|
132536
132576
|
let offset5 = 0;
|
|
@@ -141430,6 +141470,67 @@ function makeBoundingBox(viewState) {
|
|
|
141430
141470
|
viewport.unproject([0, viewport.height])
|
|
141431
141471
|
];
|
|
141432
141472
|
}
|
|
141473
|
+
const TARGETS = [1, 2, 3, 4, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1e3];
|
|
141474
|
+
const MIN_TARGET = TARGETS[0];
|
|
141475
|
+
const MAX_TARGET = TARGETS[TARGETS.length - 1];
|
|
141476
|
+
const SI_PREFIXES = [
|
|
141477
|
+
{ symbol: "Y", exponent: 24 },
|
|
141478
|
+
{ symbol: "Z", exponent: 21 },
|
|
141479
|
+
{ symbol: "E", exponent: 18 },
|
|
141480
|
+
{ symbol: "P", exponent: 15 },
|
|
141481
|
+
{ symbol: "T", exponent: 12 },
|
|
141482
|
+
{ symbol: "G", exponent: 9 },
|
|
141483
|
+
{ symbol: "M", exponent: 6 },
|
|
141484
|
+
{ symbol: "k", exponent: 3 },
|
|
141485
|
+
{ symbol: "h", exponent: 2 },
|
|
141486
|
+
{ symbol: "da", exponent: 1 },
|
|
141487
|
+
{ symbol: "", exponent: 0 },
|
|
141488
|
+
{ symbol: "d", exponent: -1 },
|
|
141489
|
+
{ symbol: "c", exponent: -2 },
|
|
141490
|
+
{ symbol: "m", exponent: -3 },
|
|
141491
|
+
{ symbol: "µ", exponent: -6 },
|
|
141492
|
+
{ symbol: "n", exponent: -9 },
|
|
141493
|
+
{ symbol: "p", exponent: -12 },
|
|
141494
|
+
{ symbol: "f", exponent: -15 },
|
|
141495
|
+
{ symbol: "a", exponent: -18 },
|
|
141496
|
+
{ symbol: "z", exponent: -21 },
|
|
141497
|
+
{ symbol: "y", exponent: -24 }
|
|
141498
|
+
];
|
|
141499
|
+
function sizeToMeters(size, unit2) {
|
|
141500
|
+
if (!unit2 || unit2 === "m") {
|
|
141501
|
+
return size;
|
|
141502
|
+
}
|
|
141503
|
+
if (unit2.length > 1) {
|
|
141504
|
+
let unitPrefix = unit2.substring(0, unit2.length - 1);
|
|
141505
|
+
if (unitPrefix === "u") {
|
|
141506
|
+
unitPrefix = "µ";
|
|
141507
|
+
}
|
|
141508
|
+
const unitObj = SI_PREFIXES.find((p) => p.symbol === unitPrefix);
|
|
141509
|
+
if (unitObj) {
|
|
141510
|
+
return size * 10 ** unitObj.exponent;
|
|
141511
|
+
}
|
|
141512
|
+
}
|
|
141513
|
+
throw new Error("Received unknown unit");
|
|
141514
|
+
}
|
|
141515
|
+
function snapValue(value) {
|
|
141516
|
+
let magnitude = 0;
|
|
141517
|
+
if (value < MIN_TARGET || value > MAX_TARGET) {
|
|
141518
|
+
magnitude = Math.floor(Math.log10(value));
|
|
141519
|
+
}
|
|
141520
|
+
let snappedUnit = SI_PREFIXES.find(
|
|
141521
|
+
(p) => p.exponent % 3 === 0 && p.exponent <= magnitude
|
|
141522
|
+
);
|
|
141523
|
+
let adjustedValue = value / 10 ** snappedUnit.exponent;
|
|
141524
|
+
if (adjustedValue > 500 && adjustedValue <= 1e3) {
|
|
141525
|
+
snappedUnit = SI_PREFIXES.find(
|
|
141526
|
+
(p) => p.exponent % 3 === 0 && p.exponent <= magnitude + 3
|
|
141527
|
+
);
|
|
141528
|
+
adjustedValue = value / 10 ** snappedUnit.exponent;
|
|
141529
|
+
}
|
|
141530
|
+
const targetNewUnits = TARGETS.find((t2) => t2 > adjustedValue);
|
|
141531
|
+
const targetOrigUnits = targetNewUnits * 10 ** snappedUnit.exponent;
|
|
141532
|
+
return [targetOrigUnits, targetNewUnits, snappedUnit.symbol];
|
|
141533
|
+
}
|
|
141433
141534
|
const fs$1$1 = `#define SHADER_NAME xr-layer-fragment-shader
|
|
141434
141535
|
|
|
141435
141536
|
precision highp float;
|
|
@@ -142197,26 +142298,27 @@ const OverviewLayer = class extends CompositeLayer {
|
|
|
142197
142298
|
OverviewLayer.layerName = "OverviewLayer";
|
|
142198
142299
|
OverviewLayer.defaultProps = defaultProps$3;
|
|
142199
142300
|
function getPosition(boundingBox, position, length2) {
|
|
142200
|
-
const
|
|
142301
|
+
const viewWidth = boundingBox[2][0] - boundingBox[0][0];
|
|
142302
|
+
const viewHeight = boundingBox[2][1] - boundingBox[0][1];
|
|
142201
142303
|
switch (position) {
|
|
142202
142304
|
case "bottom-right": {
|
|
142203
|
-
const yCoord = boundingBox[2][1] -
|
|
142204
|
-
const xLeftCoord = boundingBox[2][0] -
|
|
142305
|
+
const yCoord = boundingBox[2][1] - viewHeight * length2;
|
|
142306
|
+
const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
|
|
142205
142307
|
return [yCoord, xLeftCoord];
|
|
142206
142308
|
}
|
|
142207
142309
|
case "top-right": {
|
|
142208
|
-
const yCoord =
|
|
142209
|
-
const xLeftCoord = boundingBox[2][0] -
|
|
142310
|
+
const yCoord = boundingBox[0][1] + viewHeight * length2;
|
|
142311
|
+
const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
|
|
142210
142312
|
return [yCoord, xLeftCoord];
|
|
142211
142313
|
}
|
|
142212
142314
|
case "top-left": {
|
|
142213
|
-
const yCoord =
|
|
142214
|
-
const xLeftCoord =
|
|
142315
|
+
const yCoord = boundingBox[0][1] + viewHeight * length2;
|
|
142316
|
+
const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
|
|
142215
142317
|
return [yCoord, xLeftCoord];
|
|
142216
142318
|
}
|
|
142217
142319
|
case "bottom-left": {
|
|
142218
|
-
const yCoord = boundingBox[2][1] -
|
|
142219
|
-
const xLeftCoord =
|
|
142320
|
+
const yCoord = boundingBox[2][1] - viewHeight * length2;
|
|
142321
|
+
const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
|
|
142220
142322
|
return [yCoord, xLeftCoord];
|
|
142221
142323
|
}
|
|
142222
142324
|
default: {
|
|
@@ -142234,11 +142336,12 @@ const defaultProps$2 = {
|
|
|
142234
142336
|
unit: { type: "string", value: "", compare: true },
|
|
142235
142337
|
size: { type: "number", value: 1, compare: true },
|
|
142236
142338
|
position: { type: "string", value: "bottom-right", compare: true },
|
|
142237
|
-
length: { type: "number", value: 0.085, compare: true }
|
|
142339
|
+
length: { type: "number", value: 0.085, compare: true },
|
|
142340
|
+
snap: { type: "boolean", value: false, compare: true }
|
|
142238
142341
|
};
|
|
142239
142342
|
const ScaleBarLayer = class extends CompositeLayer {
|
|
142240
142343
|
renderLayers() {
|
|
142241
|
-
const { id, unit: unit2, size, position, viewState, length: length2 } = this.props;
|
|
142344
|
+
const { id, unit: unit2, size, position, viewState, length: length2, snap } = this.props;
|
|
142242
142345
|
const boundingBox = makeBoundingBox(viewState);
|
|
142243
142346
|
const { zoom } = viewState;
|
|
142244
142347
|
const viewLength = boundingBox[2][0] - boundingBox[0][0];
|
|
@@ -142247,15 +142350,27 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
142247
142350
|
2 ** (-zoom + 1.5),
|
|
142248
142351
|
(boundingBox[2][1] - boundingBox[0][1]) * 7e-3
|
|
142249
142352
|
);
|
|
142250
|
-
|
|
142353
|
+
let adjustedBarLength = barLength;
|
|
142354
|
+
let displayNumber = (barLength * size).toPrecision(5);
|
|
142355
|
+
let displayUnit = unit2;
|
|
142356
|
+
if (snap) {
|
|
142357
|
+
const meterSize = sizeToMeters(size, unit2);
|
|
142358
|
+
const numUnits = barLength * meterSize;
|
|
142359
|
+
const [snappedOrigUnits, snappedNewUnits, snappedUnitPrefix] = snapValue(numUnits);
|
|
142360
|
+
adjustedBarLength = snappedOrigUnits / meterSize;
|
|
142361
|
+
displayNumber = snappedNewUnits;
|
|
142362
|
+
displayUnit = `${snappedUnitPrefix}m`;
|
|
142363
|
+
}
|
|
142251
142364
|
const [yCoord, xLeftCoord] = getPosition(boundingBox, position, length2);
|
|
142365
|
+
const xRightCoord = xLeftCoord + barLength;
|
|
142366
|
+
const isLeft = position.endsWith("-left");
|
|
142252
142367
|
const lengthBar = new LineLayer({
|
|
142253
142368
|
id: `scale-bar-length-${id}`,
|
|
142254
142369
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
142255
142370
|
data: [
|
|
142256
142371
|
[
|
|
142257
|
-
[xLeftCoord, yCoord],
|
|
142258
|
-
[xLeftCoord +
|
|
142372
|
+
[isLeft ? xLeftCoord : xRightCoord - adjustedBarLength, yCoord],
|
|
142373
|
+
[isLeft ? xLeftCoord + adjustedBarLength : xRightCoord, yCoord]
|
|
142259
142374
|
]
|
|
142260
142375
|
],
|
|
142261
142376
|
getSourcePosition: (d) => d[0],
|
|
@@ -142268,8 +142383,14 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
142268
142383
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
142269
142384
|
data: [
|
|
142270
142385
|
[
|
|
142271
|
-
[
|
|
142272
|
-
|
|
142386
|
+
[
|
|
142387
|
+
isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
|
|
142388
|
+
yCoord - barHeight
|
|
142389
|
+
],
|
|
142390
|
+
[
|
|
142391
|
+
isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
|
|
142392
|
+
yCoord + barHeight
|
|
142393
|
+
]
|
|
142273
142394
|
]
|
|
142274
142395
|
],
|
|
142275
142396
|
getSourcePosition: (d) => d[0],
|
|
@@ -142282,8 +142403,14 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
142282
142403
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
142283
142404
|
data: [
|
|
142284
142405
|
[
|
|
142285
|
-
[
|
|
142286
|
-
|
|
142406
|
+
[
|
|
142407
|
+
isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
|
|
142408
|
+
yCoord - barHeight
|
|
142409
|
+
],
|
|
142410
|
+
[
|
|
142411
|
+
isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
|
|
142412
|
+
yCoord + barHeight
|
|
142413
|
+
]
|
|
142287
142414
|
]
|
|
142288
142415
|
],
|
|
142289
142416
|
getSourcePosition: (d) => d[0],
|
|
@@ -142296,8 +142423,11 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
142296
142423
|
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
142297
142424
|
data: [
|
|
142298
142425
|
{
|
|
142299
|
-
text:
|
|
142300
|
-
position: [
|
|
142426
|
+
text: `${displayNumber}${displayUnit}`,
|
|
142427
|
+
position: [
|
|
142428
|
+
isLeft ? xLeftCoord + barLength * 0.5 : xRightCoord - barLength * 0.5,
|
|
142429
|
+
yCoord + barHeight * 4
|
|
142430
|
+
]
|
|
142301
142431
|
}
|
|
142302
142432
|
],
|
|
142303
142433
|
getColor: [220, 220, 220, 255],
|
|
@@ -142306,7 +142436,7 @@ const ScaleBarLayer = class extends CompositeLayer {
|
|
|
142306
142436
|
sizeUnits: "meters",
|
|
142307
142437
|
sizeScale: 2 ** -zoom,
|
|
142308
142438
|
characterSet: [
|
|
142309
|
-
...
|
|
142439
|
+
...displayUnit.split(""),
|
|
142310
142440
|
...range(10).map((i2) => String(i2)),
|
|
142311
142441
|
".",
|
|
142312
142442
|
"e",
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-3c0e8e85.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/heatmap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"uuid": "^9.0.0",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/constants-internal": "3.
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/tooltip": "3.
|
|
28
|
-
"@vitessce/utils": "3.
|
|
29
|
-
"@vitessce/vit-s": "3.
|
|
30
|
-
"@vitessce/workers": "3.
|
|
23
|
+
"@vitessce/constants-internal": "3.3.0",
|
|
24
|
+
"@vitessce/legend": "3.3.0",
|
|
25
|
+
"@vitessce/sets-utils": "3.3.0",
|
|
26
|
+
"@vitessce/gl": "3.3.0",
|
|
27
|
+
"@vitessce/tooltip": "3.3.0",
|
|
28
|
+
"@vitessce/utils": "3.3.0",
|
|
29
|
+
"@vitessce/vit-s": "3.3.0",
|
|
30
|
+
"@vitessce/workers": "3.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|