@vitessce/scatterplot 3.1.1 → 3.1.3
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-9421b4b7.js → deflate-ac65438c.js} +1 -1
- package/dist/{index-e6103460.js → index-8a1f373a.js} +498 -63
- package/dist/index.js +1 -1
- package/dist/{jpeg-d5a25f84.js → jpeg-09198c7a.js} +1 -1
- package/dist/{lerc-16194edf.js → lerc-a1ea16ed.js} +1 -1
- package/dist/{lzw-083aa612.js → lzw-6ec4deb9.js} +1 -1
- package/dist/{packbits-014bd601.js → packbits-26db2d36.js} +1 -1
- package/dist/{raw-d6fe67be.js → raw-2ee0835f.js} +1 -1
- package/dist/{webimage-f11362e1.js → webimage-2075fc27.js} +1 -1
- package/dist-tsc/ScatterplotOptions.d.ts.map +1 -1
- package/dist-tsc/ScatterplotOptions.js +22 -9
- package/dist-tsc/shared-spatial-scatterplot/ToolMenu.d.ts.map +1 -1
- package/dist-tsc/shared-spatial-scatterplot/ToolMenu.js +1 -1
- package/package.json +7 -7
- package/src/ScatterplotOptions.js +103 -42
- package/src/shared-spatial-scatterplot/ToolMenu.js +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, Children, isValidElement, PureComponent, useCallback } from "react";
|
|
2
|
+
import React__default, { useLayoutEffect, useEffect, cloneElement, createElement, forwardRef, useState, useRef, useMemo, useImperativeHandle, Children, isValidElement, PureComponent, useId, useCallback } from "react";
|
|
3
3
|
import { usePlotOptionsStyles, OptionsContainer, CellColorEncodingOption, OptionSelect, useVitessceContainer, useComponentHover, useComponentViewInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
function _mergeNamespaces(n2, m2) {
|
|
@@ -104707,16 +104707,16 @@ function addDecoder(cases, importFn) {
|
|
|
104707
104707
|
}
|
|
104708
104708
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
104709
104709
|
}
|
|
104710
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
104711
|
-
addDecoder(5, () => import("./lzw-
|
|
104710
|
+
addDecoder([void 0, 1], () => import("./raw-2ee0835f.js").then((m2) => m2.default));
|
|
104711
|
+
addDecoder(5, () => import("./lzw-6ec4deb9.js").then((m2) => m2.default));
|
|
104712
104712
|
addDecoder(6, () => {
|
|
104713
104713
|
throw new Error("old style JPEG compression is not supported.");
|
|
104714
104714
|
});
|
|
104715
|
-
addDecoder(7, () => import("./jpeg-
|
|
104716
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
104717
|
-
addDecoder(32773, () => import("./packbits-
|
|
104718
|
-
addDecoder(34887, () => import("./lerc-
|
|
104719
|
-
addDecoder(50001, () => import("./webimage-
|
|
104715
|
+
addDecoder(7, () => import("./jpeg-09198c7a.js").then((m2) => m2.default));
|
|
104716
|
+
addDecoder([8, 32946], () => import("./deflate-ac65438c.js").then((m2) => m2.default));
|
|
104717
|
+
addDecoder(32773, () => import("./packbits-26db2d36.js").then((m2) => m2.default));
|
|
104718
|
+
addDecoder(34887, () => import("./lerc-a1ea16ed.js").then((m2) => m2.default));
|
|
104719
|
+
addDecoder(50001, () => import("./webimage-2075fc27.js").then((m2) => m2.default));
|
|
104720
104720
|
function decodeRowAcc(row, stride) {
|
|
104721
104721
|
let length2 = row.length - stride;
|
|
104722
104722
|
let offset5 = 0;
|
|
@@ -115435,6 +115435,360 @@ class BitmaskLayer extends XRLayer {
|
|
|
115435
115435
|
}
|
|
115436
115436
|
BitmaskLayer.layerName = "BitmaskLayer";
|
|
115437
115437
|
BitmaskLayer.defaultProps = defaultProps$1;
|
|
115438
|
+
var pluralize = { exports: {} };
|
|
115439
|
+
(function(module2, exports2) {
|
|
115440
|
+
(function(root2, pluralize2) {
|
|
115441
|
+
if (typeof commonjsRequire === "function" && true && true) {
|
|
115442
|
+
module2.exports = pluralize2();
|
|
115443
|
+
} else {
|
|
115444
|
+
root2.pluralize = pluralize2();
|
|
115445
|
+
}
|
|
115446
|
+
})(commonjsGlobal, function() {
|
|
115447
|
+
var pluralRules = [];
|
|
115448
|
+
var singularRules = [];
|
|
115449
|
+
var uncountables = {};
|
|
115450
|
+
var irregularPlurals = {};
|
|
115451
|
+
var irregularSingles = {};
|
|
115452
|
+
function sanitizeRule(rule) {
|
|
115453
|
+
if (typeof rule === "string") {
|
|
115454
|
+
return new RegExp("^" + rule + "$", "i");
|
|
115455
|
+
}
|
|
115456
|
+
return rule;
|
|
115457
|
+
}
|
|
115458
|
+
function restoreCase(word, token) {
|
|
115459
|
+
if (word === token)
|
|
115460
|
+
return token;
|
|
115461
|
+
if (word === word.toLowerCase())
|
|
115462
|
+
return token.toLowerCase();
|
|
115463
|
+
if (word === word.toUpperCase())
|
|
115464
|
+
return token.toUpperCase();
|
|
115465
|
+
if (word[0] === word[0].toUpperCase()) {
|
|
115466
|
+
return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
|
|
115467
|
+
}
|
|
115468
|
+
return token.toLowerCase();
|
|
115469
|
+
}
|
|
115470
|
+
function interpolate2(str, args) {
|
|
115471
|
+
return str.replace(/\$(\d{1,2})/g, function(match, index2) {
|
|
115472
|
+
return args[index2] || "";
|
|
115473
|
+
});
|
|
115474
|
+
}
|
|
115475
|
+
function replace(word, rule) {
|
|
115476
|
+
return word.replace(rule[0], function(match, index2) {
|
|
115477
|
+
var result = interpolate2(rule[1], arguments);
|
|
115478
|
+
if (match === "") {
|
|
115479
|
+
return restoreCase(word[index2 - 1], result);
|
|
115480
|
+
}
|
|
115481
|
+
return restoreCase(match, result);
|
|
115482
|
+
});
|
|
115483
|
+
}
|
|
115484
|
+
function sanitizeWord(token, word, rules) {
|
|
115485
|
+
if (!token.length || uncountables.hasOwnProperty(token)) {
|
|
115486
|
+
return word;
|
|
115487
|
+
}
|
|
115488
|
+
var len2 = rules.length;
|
|
115489
|
+
while (len2--) {
|
|
115490
|
+
var rule = rules[len2];
|
|
115491
|
+
if (rule[0].test(word))
|
|
115492
|
+
return replace(word, rule);
|
|
115493
|
+
}
|
|
115494
|
+
return word;
|
|
115495
|
+
}
|
|
115496
|
+
function replaceWord(replaceMap, keepMap, rules) {
|
|
115497
|
+
return function(word) {
|
|
115498
|
+
var token = word.toLowerCase();
|
|
115499
|
+
if (keepMap.hasOwnProperty(token)) {
|
|
115500
|
+
return restoreCase(word, token);
|
|
115501
|
+
}
|
|
115502
|
+
if (replaceMap.hasOwnProperty(token)) {
|
|
115503
|
+
return restoreCase(word, replaceMap[token]);
|
|
115504
|
+
}
|
|
115505
|
+
return sanitizeWord(token, word, rules);
|
|
115506
|
+
};
|
|
115507
|
+
}
|
|
115508
|
+
function checkWord(replaceMap, keepMap, rules, bool) {
|
|
115509
|
+
return function(word) {
|
|
115510
|
+
var token = word.toLowerCase();
|
|
115511
|
+
if (keepMap.hasOwnProperty(token))
|
|
115512
|
+
return true;
|
|
115513
|
+
if (replaceMap.hasOwnProperty(token))
|
|
115514
|
+
return false;
|
|
115515
|
+
return sanitizeWord(token, token, rules) === token;
|
|
115516
|
+
};
|
|
115517
|
+
}
|
|
115518
|
+
function pluralize2(word, count2, inclusive) {
|
|
115519
|
+
var pluralized = count2 === 1 ? pluralize2.singular(word) : pluralize2.plural(word);
|
|
115520
|
+
return (inclusive ? count2 + " " : "") + pluralized;
|
|
115521
|
+
}
|
|
115522
|
+
pluralize2.plural = replaceWord(
|
|
115523
|
+
irregularSingles,
|
|
115524
|
+
irregularPlurals,
|
|
115525
|
+
pluralRules
|
|
115526
|
+
);
|
|
115527
|
+
pluralize2.isPlural = checkWord(
|
|
115528
|
+
irregularSingles,
|
|
115529
|
+
irregularPlurals,
|
|
115530
|
+
pluralRules
|
|
115531
|
+
);
|
|
115532
|
+
pluralize2.singular = replaceWord(
|
|
115533
|
+
irregularPlurals,
|
|
115534
|
+
irregularSingles,
|
|
115535
|
+
singularRules
|
|
115536
|
+
);
|
|
115537
|
+
pluralize2.isSingular = checkWord(
|
|
115538
|
+
irregularPlurals,
|
|
115539
|
+
irregularSingles,
|
|
115540
|
+
singularRules
|
|
115541
|
+
);
|
|
115542
|
+
pluralize2.addPluralRule = function(rule, replacement) {
|
|
115543
|
+
pluralRules.push([sanitizeRule(rule), replacement]);
|
|
115544
|
+
};
|
|
115545
|
+
pluralize2.addSingularRule = function(rule, replacement) {
|
|
115546
|
+
singularRules.push([sanitizeRule(rule), replacement]);
|
|
115547
|
+
};
|
|
115548
|
+
pluralize2.addUncountableRule = function(word) {
|
|
115549
|
+
if (typeof word === "string") {
|
|
115550
|
+
uncountables[word.toLowerCase()] = true;
|
|
115551
|
+
return;
|
|
115552
|
+
}
|
|
115553
|
+
pluralize2.addPluralRule(word, "$0");
|
|
115554
|
+
pluralize2.addSingularRule(word, "$0");
|
|
115555
|
+
};
|
|
115556
|
+
pluralize2.addIrregularRule = function(single, plural) {
|
|
115557
|
+
plural = plural.toLowerCase();
|
|
115558
|
+
single = single.toLowerCase();
|
|
115559
|
+
irregularSingles[single] = plural;
|
|
115560
|
+
irregularPlurals[plural] = single;
|
|
115561
|
+
};
|
|
115562
|
+
[
|
|
115563
|
+
// Pronouns.
|
|
115564
|
+
["I", "we"],
|
|
115565
|
+
["me", "us"],
|
|
115566
|
+
["he", "they"],
|
|
115567
|
+
["she", "they"],
|
|
115568
|
+
["them", "them"],
|
|
115569
|
+
["myself", "ourselves"],
|
|
115570
|
+
["yourself", "yourselves"],
|
|
115571
|
+
["itself", "themselves"],
|
|
115572
|
+
["herself", "themselves"],
|
|
115573
|
+
["himself", "themselves"],
|
|
115574
|
+
["themself", "themselves"],
|
|
115575
|
+
["is", "are"],
|
|
115576
|
+
["was", "were"],
|
|
115577
|
+
["has", "have"],
|
|
115578
|
+
["this", "these"],
|
|
115579
|
+
["that", "those"],
|
|
115580
|
+
// Words ending in with a consonant and `o`.
|
|
115581
|
+
["echo", "echoes"],
|
|
115582
|
+
["dingo", "dingoes"],
|
|
115583
|
+
["volcano", "volcanoes"],
|
|
115584
|
+
["tornado", "tornadoes"],
|
|
115585
|
+
["torpedo", "torpedoes"],
|
|
115586
|
+
// Ends with `us`.
|
|
115587
|
+
["genus", "genera"],
|
|
115588
|
+
["viscus", "viscera"],
|
|
115589
|
+
// Ends with `ma`.
|
|
115590
|
+
["stigma", "stigmata"],
|
|
115591
|
+
["stoma", "stomata"],
|
|
115592
|
+
["dogma", "dogmata"],
|
|
115593
|
+
["lemma", "lemmata"],
|
|
115594
|
+
["schema", "schemata"],
|
|
115595
|
+
["anathema", "anathemata"],
|
|
115596
|
+
// Other irregular rules.
|
|
115597
|
+
["ox", "oxen"],
|
|
115598
|
+
["axe", "axes"],
|
|
115599
|
+
["die", "dice"],
|
|
115600
|
+
["yes", "yeses"],
|
|
115601
|
+
["foot", "feet"],
|
|
115602
|
+
["eave", "eaves"],
|
|
115603
|
+
["goose", "geese"],
|
|
115604
|
+
["tooth", "teeth"],
|
|
115605
|
+
["quiz", "quizzes"],
|
|
115606
|
+
["human", "humans"],
|
|
115607
|
+
["proof", "proofs"],
|
|
115608
|
+
["carve", "carves"],
|
|
115609
|
+
["valve", "valves"],
|
|
115610
|
+
["looey", "looies"],
|
|
115611
|
+
["thief", "thieves"],
|
|
115612
|
+
["groove", "grooves"],
|
|
115613
|
+
["pickaxe", "pickaxes"],
|
|
115614
|
+
["passerby", "passersby"]
|
|
115615
|
+
].forEach(function(rule) {
|
|
115616
|
+
return pluralize2.addIrregularRule(rule[0], rule[1]);
|
|
115617
|
+
});
|
|
115618
|
+
[
|
|
115619
|
+
[/s?$/i, "s"],
|
|
115620
|
+
[/[^\u0000-\u007F]$/i, "$0"],
|
|
115621
|
+
[/([^aeiou]ese)$/i, "$1"],
|
|
115622
|
+
[/(ax|test)is$/i, "$1es"],
|
|
115623
|
+
[/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
|
|
115624
|
+
[/(e[mn]u)s?$/i, "$1s"],
|
|
115625
|
+
[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
|
|
115626
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
|
|
115627
|
+
[/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
|
|
115628
|
+
[/(seraph|cherub)(?:im)?$/i, "$1im"],
|
|
115629
|
+
[/(her|at|gr)o$/i, "$1oes"],
|
|
115630
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
|
|
115631
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
|
|
115632
|
+
[/sis$/i, "ses"],
|
|
115633
|
+
[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
|
|
115634
|
+
[/([^aeiouy]|qu)y$/i, "$1ies"],
|
|
115635
|
+
[/([^ch][ieo][ln])ey$/i, "$1ies"],
|
|
115636
|
+
[/(x|ch|ss|sh|zz)$/i, "$1es"],
|
|
115637
|
+
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
|
|
115638
|
+
[/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
|
|
115639
|
+
[/(pe)(?:rson|ople)$/i, "$1ople"],
|
|
115640
|
+
[/(child)(?:ren)?$/i, "$1ren"],
|
|
115641
|
+
[/eaux$/i, "$0"],
|
|
115642
|
+
[/m[ae]n$/i, "men"],
|
|
115643
|
+
["thou", "you"]
|
|
115644
|
+
].forEach(function(rule) {
|
|
115645
|
+
return pluralize2.addPluralRule(rule[0], rule[1]);
|
|
115646
|
+
});
|
|
115647
|
+
[
|
|
115648
|
+
[/s$/i, ""],
|
|
115649
|
+
[/(ss)$/i, "$1"],
|
|
115650
|
+
[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
|
|
115651
|
+
[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
|
|
115652
|
+
[/ies$/i, "y"],
|
|
115653
|
+
[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
|
|
115654
|
+
[/\b(mon|smil)ies$/i, "$1ey"],
|
|
115655
|
+
[/\b((?:tit)?m|l)ice$/i, "$1ouse"],
|
|
115656
|
+
[/(seraph|cherub)im$/i, "$1"],
|
|
115657
|
+
[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
|
|
115658
|
+
[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
|
|
115659
|
+
[/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
|
|
115660
|
+
[/(test)(?:is|es)$/i, "$1is"],
|
|
115661
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
|
|
115662
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
|
|
115663
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
|
|
115664
|
+
[/(alumn|alg|vertebr)ae$/i, "$1a"],
|
|
115665
|
+
[/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
|
|
115666
|
+
[/(matr|append)ices$/i, "$1ix"],
|
|
115667
|
+
[/(pe)(rson|ople)$/i, "$1rson"],
|
|
115668
|
+
[/(child)ren$/i, "$1"],
|
|
115669
|
+
[/(eau)x?$/i, "$1"],
|
|
115670
|
+
[/men$/i, "man"]
|
|
115671
|
+
].forEach(function(rule) {
|
|
115672
|
+
return pluralize2.addSingularRule(rule[0], rule[1]);
|
|
115673
|
+
});
|
|
115674
|
+
[
|
|
115675
|
+
// Singular words with no plurals.
|
|
115676
|
+
"adulthood",
|
|
115677
|
+
"advice",
|
|
115678
|
+
"agenda",
|
|
115679
|
+
"aid",
|
|
115680
|
+
"aircraft",
|
|
115681
|
+
"alcohol",
|
|
115682
|
+
"ammo",
|
|
115683
|
+
"analytics",
|
|
115684
|
+
"anime",
|
|
115685
|
+
"athletics",
|
|
115686
|
+
"audio",
|
|
115687
|
+
"bison",
|
|
115688
|
+
"blood",
|
|
115689
|
+
"bream",
|
|
115690
|
+
"buffalo",
|
|
115691
|
+
"butter",
|
|
115692
|
+
"carp",
|
|
115693
|
+
"cash",
|
|
115694
|
+
"chassis",
|
|
115695
|
+
"chess",
|
|
115696
|
+
"clothing",
|
|
115697
|
+
"cod",
|
|
115698
|
+
"commerce",
|
|
115699
|
+
"cooperation",
|
|
115700
|
+
"corps",
|
|
115701
|
+
"debris",
|
|
115702
|
+
"diabetes",
|
|
115703
|
+
"digestion",
|
|
115704
|
+
"elk",
|
|
115705
|
+
"energy",
|
|
115706
|
+
"equipment",
|
|
115707
|
+
"excretion",
|
|
115708
|
+
"expertise",
|
|
115709
|
+
"firmware",
|
|
115710
|
+
"flounder",
|
|
115711
|
+
"fun",
|
|
115712
|
+
"gallows",
|
|
115713
|
+
"garbage",
|
|
115714
|
+
"graffiti",
|
|
115715
|
+
"hardware",
|
|
115716
|
+
"headquarters",
|
|
115717
|
+
"health",
|
|
115718
|
+
"herpes",
|
|
115719
|
+
"highjinks",
|
|
115720
|
+
"homework",
|
|
115721
|
+
"housework",
|
|
115722
|
+
"information",
|
|
115723
|
+
"jeans",
|
|
115724
|
+
"justice",
|
|
115725
|
+
"kudos",
|
|
115726
|
+
"labour",
|
|
115727
|
+
"literature",
|
|
115728
|
+
"machinery",
|
|
115729
|
+
"mackerel",
|
|
115730
|
+
"mail",
|
|
115731
|
+
"media",
|
|
115732
|
+
"mews",
|
|
115733
|
+
"moose",
|
|
115734
|
+
"music",
|
|
115735
|
+
"mud",
|
|
115736
|
+
"manga",
|
|
115737
|
+
"news",
|
|
115738
|
+
"only",
|
|
115739
|
+
"personnel",
|
|
115740
|
+
"pike",
|
|
115741
|
+
"plankton",
|
|
115742
|
+
"pliers",
|
|
115743
|
+
"police",
|
|
115744
|
+
"pollution",
|
|
115745
|
+
"premises",
|
|
115746
|
+
"rain",
|
|
115747
|
+
"research",
|
|
115748
|
+
"rice",
|
|
115749
|
+
"salmon",
|
|
115750
|
+
"scissors",
|
|
115751
|
+
"series",
|
|
115752
|
+
"sewage",
|
|
115753
|
+
"shambles",
|
|
115754
|
+
"shrimp",
|
|
115755
|
+
"software",
|
|
115756
|
+
"species",
|
|
115757
|
+
"staff",
|
|
115758
|
+
"swine",
|
|
115759
|
+
"tennis",
|
|
115760
|
+
"traffic",
|
|
115761
|
+
"transportation",
|
|
115762
|
+
"trout",
|
|
115763
|
+
"tuna",
|
|
115764
|
+
"wealth",
|
|
115765
|
+
"welfare",
|
|
115766
|
+
"whiting",
|
|
115767
|
+
"wildebeest",
|
|
115768
|
+
"wildlife",
|
|
115769
|
+
"you",
|
|
115770
|
+
/pok[eé]mon$/i,
|
|
115771
|
+
// Regexes.
|
|
115772
|
+
/[^aeiou]ese$/i,
|
|
115773
|
+
// "chinese", "japanese"
|
|
115774
|
+
/deer$/i,
|
|
115775
|
+
// "deer", "reindeer"
|
|
115776
|
+
/fish$/i,
|
|
115777
|
+
// "fish", "blowfish", "angelfish"
|
|
115778
|
+
/measles$/i,
|
|
115779
|
+
/o[iu]s$/i,
|
|
115780
|
+
// "carnivorous"
|
|
115781
|
+
/pox$/i,
|
|
115782
|
+
// "chickpox", "smallpox"
|
|
115783
|
+
/sheep$/i
|
|
115784
|
+
].forEach(pluralize2.addUncountableRule);
|
|
115785
|
+
return pluralize2;
|
|
115786
|
+
});
|
|
115787
|
+
})(pluralize);
|
|
115788
|
+
var pluralizeExports = pluralize.exports;
|
|
115789
|
+
const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
|
|
115790
|
+
plur.addPluralRule("glomerulus", "glomeruli");
|
|
115791
|
+
plur.addPluralRule("interstitium", "interstitia");
|
|
115438
115792
|
function fromEntries(iterable) {
|
|
115439
115793
|
return [...iterable].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {});
|
|
115440
115794
|
}
|
|
@@ -140635,6 +140989,7 @@ function ToolMenu(props2) {
|
|
|
140635
140989
|
{
|
|
140636
140990
|
alt: "click to recenter",
|
|
140637
140991
|
onClick: () => onRecenterButtonCLick(),
|
|
140992
|
+
"aria-label": "Recenter scatterplot view",
|
|
140638
140993
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CenterFocusStrong, {})
|
|
140639
140994
|
}
|
|
140640
140995
|
)
|
|
@@ -141407,6 +141762,7 @@ function ScatterplotOptions(props2) {
|
|
|
141407
141762
|
geneExpressionColormapRange,
|
|
141408
141763
|
setGeneExpressionColormapRange
|
|
141409
141764
|
} = props2;
|
|
141765
|
+
const scatterplotOptionsId = useId();
|
|
141410
141766
|
const observationsLabelNice = capitalize$1(observationsLabel);
|
|
141411
141767
|
const classes = usePlotOptionsStyles();
|
|
141412
141768
|
function handleCellRadiusModeChange(event) {
|
|
@@ -141454,47 +141810,74 @@ function ScatterplotOptions(props2) {
|
|
|
141454
141810
|
}
|
|
141455
141811
|
),
|
|
141456
141812
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141457
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141458
|
-
|
|
141459
|
-
|
|
141460
|
-
|
|
141461
|
-
|
|
141813
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141814
|
+
"label",
|
|
141815
|
+
{
|
|
141816
|
+
htmlFor: `scatterplot-set-labels-visible-${scatterplotOptionsId}`,
|
|
141817
|
+
children: [
|
|
141818
|
+
observationsLabelNice,
|
|
141819
|
+
" Set Labels Visible"
|
|
141820
|
+
]
|
|
141821
|
+
}
|
|
141822
|
+
) }),
|
|
141823
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141462
141824
|
Checkbox$1,
|
|
141463
141825
|
{
|
|
141464
141826
|
className: classes.checkbox,
|
|
141465
141827
|
checked: cellSetLabelsVisible,
|
|
141466
141828
|
onChange: handleLabelVisibilityChange,
|
|
141467
141829
|
name: "scatterplot-option-cell-set-labels",
|
|
141468
|
-
color: "default"
|
|
141830
|
+
color: "default",
|
|
141831
|
+
inputProps: {
|
|
141832
|
+
"aria-label": "Show or hide set labels",
|
|
141833
|
+
id: `scatterplot-set-labels-visible-${scatterplotOptionsId}`
|
|
141834
|
+
}
|
|
141469
141835
|
}
|
|
141470
141836
|
) })
|
|
141471
141837
|
] }),
|
|
141472
141838
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141473
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell,
|
|
141474
|
-
|
|
141839
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141840
|
+
"label",
|
|
141841
|
+
{
|
|
141842
|
+
htmlFor: `scatterplot-set-tooltips-visible-${scatterplotOptionsId}`,
|
|
141843
|
+
children: "Tooltips Visible"
|
|
141844
|
+
}
|
|
141845
|
+
) }),
|
|
141846
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141475
141847
|
Checkbox$1,
|
|
141476
141848
|
{
|
|
141477
141849
|
className: classes.checkbox,
|
|
141478
141850
|
checked: tooltipsVisible,
|
|
141479
141851
|
onChange: handleTooltipsVisibilityChange,
|
|
141480
|
-
name: "scatterplot-option-
|
|
141481
|
-
color: "default"
|
|
141852
|
+
name: "scatterplot-option-tooltip-visibility",
|
|
141853
|
+
color: "default",
|
|
141854
|
+
inputProps: {
|
|
141855
|
+
"aria-label": "Show or hide tooltips",
|
|
141856
|
+
id: `scatterplot-set-tooltips-visible-${scatterplotOptionsId}`
|
|
141857
|
+
}
|
|
141482
141858
|
}
|
|
141483
141859
|
) })
|
|
141484
141860
|
] }),
|
|
141485
141861
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141486
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141487
|
-
|
|
141488
|
-
|
|
141489
|
-
|
|
141490
|
-
|
|
141862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141863
|
+
"label",
|
|
141864
|
+
{
|
|
141865
|
+
htmlFor: `scatterplot-set-label-size-${scatterplotOptionsId}`,
|
|
141866
|
+
children: [
|
|
141867
|
+
observationsLabelNice,
|
|
141868
|
+
" Set Label Size"
|
|
141869
|
+
]
|
|
141870
|
+
}
|
|
141871
|
+
) }),
|
|
141872
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141491
141873
|
Slider$1,
|
|
141492
141874
|
{
|
|
141493
|
-
disabled: !cellSetLabelsVisible,
|
|
141494
141875
|
classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
|
|
141876
|
+
disabled: !cellSetLabelsVisible,
|
|
141495
141877
|
value: cellSetLabelSize,
|
|
141496
141878
|
onChange: handleLabelSizeChange,
|
|
141497
|
-
"aria-
|
|
141879
|
+
"aria-label": "Scatterplot label size slider",
|
|
141880
|
+
id: `scatterplot-set-label-size-${scatterplotOptionsId}`,
|
|
141498
141881
|
valueLabelDisplay: "auto",
|
|
141499
141882
|
step: 1,
|
|
141500
141883
|
min: 8,
|
|
@@ -141503,34 +141886,50 @@ function ScatterplotOptions(props2) {
|
|
|
141503
141886
|
) })
|
|
141504
141887
|
] }),
|
|
141505
141888
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141506
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141507
|
-
|
|
141508
|
-
|
|
141509
|
-
|
|
141510
|
-
|
|
141889
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141890
|
+
"label",
|
|
141891
|
+
{
|
|
141892
|
+
htmlFor: `scatterplot-set-polygons-visible-${scatterplotOptionsId}`,
|
|
141893
|
+
children: [
|
|
141894
|
+
observationsLabelNice,
|
|
141895
|
+
" Set Polygons Visible"
|
|
141896
|
+
]
|
|
141897
|
+
}
|
|
141898
|
+
) }),
|
|
141899
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141511
141900
|
Checkbox$1,
|
|
141512
141901
|
{
|
|
141513
141902
|
className: classes.checkbox,
|
|
141514
141903
|
checked: cellSetPolygonsVisible,
|
|
141515
141904
|
onChange: handlePolygonVisibilityChange,
|
|
141516
141905
|
name: "scatterplot-option-cell-set-polygons",
|
|
141517
|
-
color: "default"
|
|
141906
|
+
color: "default",
|
|
141907
|
+
inputProps: {
|
|
141908
|
+
"aria-label": "Show or hide polygons",
|
|
141909
|
+
id: `scatterplot-set-polygons-visible-${scatterplotOptionsId}`
|
|
141910
|
+
}
|
|
141518
141911
|
}
|
|
141519
141912
|
) })
|
|
141520
141913
|
] }),
|
|
141521
141914
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141522
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141523
|
-
|
|
141524
|
-
|
|
141525
|
-
|
|
141526
|
-
|
|
141915
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141916
|
+
"label",
|
|
141917
|
+
{
|
|
141918
|
+
htmlFor: `scatterplot-set-radius-mode-select-${scatterplotOptionsId}`,
|
|
141919
|
+
children: [
|
|
141920
|
+
observationsLabelNice,
|
|
141921
|
+
" Radius Mode"
|
|
141922
|
+
]
|
|
141923
|
+
}
|
|
141924
|
+
) }),
|
|
141925
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141527
141926
|
OptionSelect,
|
|
141528
141927
|
{
|
|
141529
141928
|
className: classes.select,
|
|
141530
141929
|
value: cellRadiusMode,
|
|
141531
141930
|
onChange: handleCellRadiusModeChange,
|
|
141532
141931
|
inputProps: {
|
|
141533
|
-
id:
|
|
141932
|
+
id: `scatterplot-set-radius-mode-select-${scatterplotOptionsId}`
|
|
141534
141933
|
},
|
|
141535
141934
|
children: [
|
|
141536
141935
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "auto", children: "Auto" }),
|
|
@@ -141540,18 +141939,25 @@ function ScatterplotOptions(props2) {
|
|
|
141540
141939
|
) })
|
|
141541
141940
|
] }),
|
|
141542
141941
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141543
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141544
|
-
|
|
141545
|
-
|
|
141546
|
-
|
|
141547
|
-
|
|
141942
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141943
|
+
"label",
|
|
141944
|
+
{
|
|
141945
|
+
htmlFor: `scatterplot-set-radius-size-select-${scatterplotOptionsId}`,
|
|
141946
|
+
children: [
|
|
141947
|
+
observationsLabelNice,
|
|
141948
|
+
" Radius Size"
|
|
141949
|
+
]
|
|
141950
|
+
}
|
|
141951
|
+
) }),
|
|
141952
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141548
141953
|
Slider$1,
|
|
141549
141954
|
{
|
|
141550
|
-
disabled: cellRadiusMode !== "manual",
|
|
141551
141955
|
classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
|
|
141956
|
+
disabled: cellRadiusMode !== "manual",
|
|
141552
141957
|
value: cellRadius,
|
|
141553
141958
|
onChange: handleRadiusChange,
|
|
141554
|
-
"aria-
|
|
141959
|
+
"aria-label": "Scatterplot radius size slider",
|
|
141960
|
+
id: `scatterplot-set-radius-size-select-${scatterplotOptionsId}`,
|
|
141555
141961
|
valueLabelDisplay: "auto",
|
|
141556
141962
|
step: 0.01,
|
|
141557
141963
|
min: 0.01,
|
|
@@ -141560,18 +141966,24 @@ function ScatterplotOptions(props2) {
|
|
|
141560
141966
|
) })
|
|
141561
141967
|
] }),
|
|
141562
141968
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141563
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141564
|
-
|
|
141565
|
-
|
|
141566
|
-
|
|
141567
|
-
|
|
141969
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141970
|
+
"label",
|
|
141971
|
+
{
|
|
141972
|
+
htmlFor: `scatterplot-set-opacity-mode-${scatterplotOptionsId}`,
|
|
141973
|
+
children: [
|
|
141974
|
+
observationsLabelNice,
|
|
141975
|
+
" Opacity Mode"
|
|
141976
|
+
]
|
|
141977
|
+
}
|
|
141978
|
+
) }),
|
|
141979
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141568
141980
|
OptionSelect,
|
|
141569
141981
|
{
|
|
141570
141982
|
className: classes.select,
|
|
141571
141983
|
value: cellOpacityMode,
|
|
141572
141984
|
onChange: handleCellOpacityModeChange,
|
|
141573
141985
|
inputProps: {
|
|
141574
|
-
id:
|
|
141986
|
+
id: `scatterplot-set-opacity-mode-${scatterplotOptionsId}`
|
|
141575
141987
|
},
|
|
141576
141988
|
children: [
|
|
141577
141989
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "auto", children: "Auto" }),
|
|
@@ -141581,18 +141993,25 @@ function ScatterplotOptions(props2) {
|
|
|
141581
141993
|
) })
|
|
141582
141994
|
] }),
|
|
141583
141995
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141584
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
141585
|
-
|
|
141586
|
-
|
|
141587
|
-
|
|
141588
|
-
|
|
141996
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
141997
|
+
"label",
|
|
141998
|
+
{
|
|
141999
|
+
htmlFor: `scatterplot-set-opacity-level-${scatterplotOptionsId}`,
|
|
142000
|
+
children: [
|
|
142001
|
+
observationsLabelNice,
|
|
142002
|
+
" Opacity Level"
|
|
142003
|
+
]
|
|
142004
|
+
}
|
|
142005
|
+
) }),
|
|
142006
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141589
142007
|
Slider$1,
|
|
141590
142008
|
{
|
|
141591
|
-
disabled: cellOpacityMode !== "manual",
|
|
141592
142009
|
classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
|
|
142010
|
+
disabled: cellOpacityMode !== "manual",
|
|
141593
142011
|
value: cellOpacity,
|
|
141594
142012
|
onChange: handleOpacityChange,
|
|
141595
|
-
"aria-
|
|
142013
|
+
"aria-label": "Scatterplot opacity level slider",
|
|
142014
|
+
id: `scatterplot-set-opacity-level-${scatterplotOptionsId}`,
|
|
141596
142015
|
valueLabelDisplay: "auto",
|
|
141597
142016
|
step: 0.05,
|
|
141598
142017
|
min: 0,
|
|
@@ -141601,29 +142020,45 @@ function ScatterplotOptions(props2) {
|
|
|
141601
142020
|
) })
|
|
141602
142021
|
] }),
|
|
141603
142022
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141604
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell,
|
|
141605
|
-
|
|
142023
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
142024
|
+
"label",
|
|
142025
|
+
{
|
|
142026
|
+
htmlFor: `scatterplot-gene-expression-colormap-${scatterplotOptionsId}`,
|
|
142027
|
+
children: "Gene Expression Colormap"
|
|
142028
|
+
}
|
|
142029
|
+
) }),
|
|
142030
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141606
142031
|
OptionSelect,
|
|
141607
142032
|
{
|
|
141608
142033
|
className: classes.select,
|
|
141609
142034
|
value: geneExpressionColormap,
|
|
141610
142035
|
onChange: handleGeneExpressionColormapChange,
|
|
141611
142036
|
inputProps: {
|
|
141612
|
-
id:
|
|
142037
|
+
id: `scatterplot-gene-expression-colormap-${scatterplotOptionsId}`
|
|
141613
142038
|
},
|
|
141614
142039
|
children: GLSL_COLORMAPS.map((cmap) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: cmap, children: cmap }, cmap))
|
|
141615
142040
|
}
|
|
141616
142041
|
) })
|
|
141617
142042
|
] }),
|
|
141618
142043
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
141619
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell,
|
|
141620
|
-
|
|
142044
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
142045
|
+
"label",
|
|
142046
|
+
{
|
|
142047
|
+
htmlFor: `scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`,
|
|
142048
|
+
children: "Gene Expression Colormap Range"
|
|
142049
|
+
}
|
|
142050
|
+
) }),
|
|
142051
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
141621
142052
|
Slider$1,
|
|
141622
142053
|
{
|
|
141623
142054
|
classes: { root: classes.slider, valueLabel: classes.sliderValueLabel },
|
|
141624
142055
|
value: geneExpressionColormapRange,
|
|
141625
142056
|
onChange: handleColormapRangeChangeDebounced,
|
|
141626
|
-
|
|
142057
|
+
getAriaLabel: (index2) => {
|
|
142058
|
+
const labelPrefix = index2 === 0 ? "Low value slider" : "High value slider";
|
|
142059
|
+
return `${labelPrefix} for scatterplot gene expression colormap range`;
|
|
142060
|
+
},
|
|
142061
|
+
id: `scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`,
|
|
141627
142062
|
valueLabelDisplay: "auto",
|
|
141628
142063
|
step: 5e-3,
|
|
141629
142064
|
min: 0,
|
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-8a1f373a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/ScatterplotOptions.js"],"names":[],"mappings":"AASA,
|
|
1
|
+
{"version":3,"file":"ScatterplotOptions.d.ts","sourceRoot":"","sources":["../src/ScatterplotOptions.js"],"names":[],"mappings":"AASA,oEAgUC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
2
|
+
import React, { useCallback, useId } from 'react';
|
|
3
3
|
import { debounce } from 'lodash-es';
|
|
4
4
|
import { Checkbox, Slider, TableCell, TableRow } from '@material-ui/core';
|
|
5
5
|
import { capitalize } from '@vitessce/utils';
|
|
@@ -7,6 +7,7 @@ import { usePlotOptionsStyles, CellColorEncodingOption, OptionsContainer, Option
|
|
|
7
7
|
import { GLSL_COLORMAPS } from '@vitessce/gl';
|
|
8
8
|
export default function ScatterplotOptions(props) {
|
|
9
9
|
const { children, observationsLabel, cellRadius, setCellRadius, cellRadiusMode, setCellRadiusMode, cellOpacity, setCellOpacity, cellOpacityMode, setCellOpacityMode, cellSetLabelsVisible, setCellSetLabelsVisible, tooltipsVisible, setTooltipsVisible, cellSetLabelSize, setCellSetLabelSize, cellSetPolygonsVisible, setCellSetPolygonsVisible, cellColorEncoding, setCellColorEncoding, geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange, } = props;
|
|
10
|
+
const scatterplotOptionsId = useId();
|
|
10
11
|
const observationsLabelNice = capitalize(observationsLabel);
|
|
11
12
|
const classes = usePlotOptionsStyles();
|
|
12
13
|
function handleCellRadiusModeChange(event) {
|
|
@@ -40,17 +41,29 @@ export default function ScatterplotOptions(props) {
|
|
|
40
41
|
setGeneExpressionColormapRange(value);
|
|
41
42
|
}
|
|
42
43
|
const handleColormapRangeChangeDebounced = useCallback(debounce(handleColormapRangeChange, 5, { trailing: true }), [handleColormapRangeChange]);
|
|
43
|
-
return (_jsxs(OptionsContainer, { children: [children, _jsx(CellColorEncodingOption, { observationsLabel: observationsLabel, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding }), _jsxs(TableRow, { children: [
|
|
44
|
+
return (_jsxs(OptionsContainer, { children: [children, _jsx(CellColorEncodingOption, { observationsLabel: observationsLabel, cellColorEncoding: cellColorEncoding, setCellColorEncoding: setCellColorEncoding }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-labels-visible-${scatterplotOptionsId}`, children: [observationsLabelNice, " Set Labels Visible"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Checkbox, { className: classes.checkbox, checked: cellSetLabelsVisible, onChange: handleLabelVisibilityChange, name: "scatterplot-option-cell-set-labels", color: "default", inputProps: {
|
|
45
|
+
'aria-label': 'Show or hide set labels',
|
|
46
|
+
id: `scatterplot-set-labels-visible-${scatterplotOptionsId}`,
|
|
47
|
+
} }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `scatterplot-set-tooltips-visible-${scatterplotOptionsId}`, children: "Tooltips Visible" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Checkbox, { className: classes.checkbox,
|
|
44
48
|
/**
|
|
45
49
|
* We have to use "checked" here, not "value".
|
|
46
50
|
* The checkbox state is not persisting with value.
|
|
47
51
|
* For reference, https://v4.mui.com/api/checkbox/
|
|
48
52
|
*/
|
|
49
|
-
checked: tooltipsVisible, onChange: handleTooltipsVisibilityChange, name: "scatterplot-option-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
id:
|
|
55
|
-
}
|
|
53
|
+
checked: tooltipsVisible, onChange: handleTooltipsVisibilityChange, name: "scatterplot-option-tooltip-visibility", color: "default", inputProps: {
|
|
54
|
+
'aria-label': 'Show or hide tooltips',
|
|
55
|
+
id: `scatterplot-set-tooltips-visible-${scatterplotOptionsId}`,
|
|
56
|
+
} }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-label-size-${scatterplotOptionsId}`, children: [observationsLabelNice, " Set Label Size"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { classes: { root: classes.slider, valueLabel: classes.sliderValueLabel }, disabled: !cellSetLabelsVisible, value: cellSetLabelSize, onChange: handleLabelSizeChange, "aria-label": "Scatterplot label size slider", id: `scatterplot-set-label-size-${scatterplotOptionsId}`, valueLabelDisplay: "auto", step: 1, min: 8, max: 36 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-polygons-visible-${scatterplotOptionsId}`, children: [observationsLabelNice, " Set Polygons Visible"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Checkbox, { className: classes.checkbox, checked: cellSetPolygonsVisible, onChange: handlePolygonVisibilityChange, name: "scatterplot-option-cell-set-polygons", color: "default", inputProps: {
|
|
57
|
+
'aria-label': 'Show or hide polygons',
|
|
58
|
+
id: `scatterplot-set-polygons-visible-${scatterplotOptionsId}`,
|
|
59
|
+
} }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-radius-mode-select-${scatterplotOptionsId}`, children: [observationsLabelNice, " Radius Mode"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsxs(OptionSelect, { className: classes.select, value: cellRadiusMode, onChange: handleCellRadiusModeChange, inputProps: {
|
|
60
|
+
id: `scatterplot-set-radius-mode-select-${scatterplotOptionsId}`,
|
|
61
|
+
}, children: [_jsx("option", { value: "auto", children: "Auto" }), _jsx("option", { value: "manual", children: "Manual" })] }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-radius-size-select-${scatterplotOptionsId}`, children: [observationsLabelNice, " Radius Size"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { classes: { root: classes.slider, valueLabel: classes.sliderValueLabel }, disabled: cellRadiusMode !== 'manual', value: cellRadius, onChange: handleRadiusChange, "aria-label": "Scatterplot radius size slider", id: `scatterplot-set-radius-size-select-${scatterplotOptionsId}`, valueLabelDisplay: "auto", step: 0.01, min: 0.01, max: 10 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-opacity-mode-${scatterplotOptionsId}`, children: [observationsLabelNice, " Opacity Mode"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsxs(OptionSelect, { className: classes.select, value: cellOpacityMode, onChange: handleCellOpacityModeChange, inputProps: {
|
|
62
|
+
id: `scatterplot-set-opacity-mode-${scatterplotOptionsId}`,
|
|
63
|
+
}, children: [_jsx("option", { value: "auto", children: "Auto" }), _jsx("option", { value: "manual", children: "Manual" })] }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsxs("label", { htmlFor: `scatterplot-set-opacity-level-${scatterplotOptionsId}`, children: [observationsLabelNice, " Opacity Level"] }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { classes: { root: classes.slider, valueLabel: classes.sliderValueLabel }, disabled: cellOpacityMode !== 'manual', value: cellOpacity, onChange: handleOpacityChange, "aria-label": "Scatterplot opacity level slider", id: `scatterplot-set-opacity-level-${scatterplotOptionsId}`, valueLabelDisplay: "auto", step: 0.05, min: 0.0, max: 1.0 }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `scatterplot-gene-expression-colormap-${scatterplotOptionsId}`, children: "Gene Expression Colormap" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(OptionSelect, { className: classes.select, value: geneExpressionColormap, onChange: handleGeneExpressionColormapChange, inputProps: {
|
|
64
|
+
id: `scatterplot-gene-expression-colormap-${scatterplotOptionsId}`,
|
|
65
|
+
}, children: GLSL_COLORMAPS.map(cmap => (_jsx("option", { value: cmap, children: cmap }, cmap))) }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`, children: "Gene Expression Colormap Range" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(Slider, { classes: { root: classes.slider, valueLabel: classes.sliderValueLabel }, value: geneExpressionColormapRange, onChange: handleColormapRangeChangeDebounced, getAriaLabel: (index) => {
|
|
66
|
+
const labelPrefix = index === 0 ? 'Low value slider' : 'High value slider';
|
|
67
|
+
return `${labelPrefix} for scatterplot gene expression colormap range`;
|
|
68
|
+
}, id: `scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`, valueLabelDisplay: "auto", step: 0.005, min: 0.0, max: 1.0 }) })] })] }));
|
|
56
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,
|
|
1
|
+
{"version":3,"file":"ToolMenu.d.ts","sourceRoot":"","sources":["../../src/shared-spatial-scatterplot/ToolMenu.js"],"names":[],"mappings":"AAsEA,kDAeC;AAED,oDAeC;AAED,0DAuCC"}
|
|
@@ -79,5 +79,5 @@ export default function ToolMenu(props) {
|
|
|
79
79
|
const onRecenterButtonCLick = () => {
|
|
80
80
|
recenterOnClick();
|
|
81
81
|
};
|
|
82
|
-
return (_jsxs("div", { className: classes.tool, children: [visibleTools.pan && (_jsx(IconTool, { alt: "pointer tool", onClick: () => setActiveTool(null), isActive: activeTool === null, children: _jsx(PointerIconSVG, {}) })), visibleTools.selectLasso ? (_jsx(IconTool, { alt: "select lasso", onClick: () => setActiveTool(SELECTION_TYPE.POLYGON), isActive: activeTool === SELECTION_TYPE.POLYGON, children: _jsx(SelectLassoIconSVG, {}) })) : null, _jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), children: _jsx(CenterFocusStrong, {}) })] }));
|
|
82
|
+
return (_jsxs("div", { className: classes.tool, children: [visibleTools.pan && (_jsx(IconTool, { alt: "pointer tool", onClick: () => setActiveTool(null), isActive: activeTool === null, children: _jsx(PointerIconSVG, {}) })), visibleTools.selectLasso ? (_jsx(IconTool, { alt: "select lasso", onClick: () => setActiveTool(SELECTION_TYPE.POLYGON), isActive: activeTool === SELECTION_TYPE.POLYGON, children: _jsx(SelectLassoIconSVG, {}) })) : null, _jsx(IconButton, { alt: "click to recenter", onClick: () => onRecenterButtonCLick(), "aria-label": "Recenter scatterplot view", children: _jsx(CenterFocusStrong, {}) })] }));
|
|
83
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"d3-force": "^2.1.1",
|
|
23
23
|
"d3-quadtree": "^1.0.7",
|
|
24
24
|
"lodash-es": "^4.17.21",
|
|
25
|
-
"@vitessce/constants-internal": "3.1.
|
|
26
|
-
"@vitessce/gl": "3.1.
|
|
27
|
-
"@vitessce/icons": "3.1.
|
|
28
|
-
"@vitessce/tooltip": "3.1.
|
|
29
|
-
"@vitessce/utils": "3.1.
|
|
30
|
-
"@vitessce/vit-s": "3.1.
|
|
25
|
+
"@vitessce/constants-internal": "3.1.3",
|
|
26
|
+
"@vitessce/gl": "3.1.3",
|
|
27
|
+
"@vitessce/icons": "3.1.3",
|
|
28
|
+
"@vitessce/tooltip": "3.1.3",
|
|
29
|
+
"@vitessce/utils": "3.1.3",
|
|
30
|
+
"@vitessce/vit-s": "3.1.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useId } from 'react';
|
|
2
2
|
import { debounce } from 'lodash-es';
|
|
3
3
|
import { Checkbox, Slider, TableCell, TableRow } from '@material-ui/core';
|
|
4
4
|
import { capitalize } from '@vitessce/utils';
|
|
@@ -35,6 +35,8 @@ export default function ScatterplotOptions(props) {
|
|
|
35
35
|
setGeneExpressionColormapRange,
|
|
36
36
|
} = props;
|
|
37
37
|
|
|
38
|
+
const scatterplotOptionsId = useId();
|
|
39
|
+
|
|
38
40
|
const observationsLabelNice = capitalize(observationsLabel);
|
|
39
41
|
|
|
40
42
|
const classes = usePlotOptionsStyles();
|
|
@@ -92,24 +94,36 @@ export default function ScatterplotOptions(props) {
|
|
|
92
94
|
setCellColorEncoding={setCellColorEncoding}
|
|
93
95
|
/>
|
|
94
96
|
<TableRow>
|
|
95
|
-
<TableCell className={classes.labelCell}>
|
|
96
|
-
|
|
97
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
98
|
+
<label
|
|
99
|
+
htmlFor={`scatterplot-set-labels-visible-${scatterplotOptionsId}`}
|
|
100
|
+
>
|
|
101
|
+
{observationsLabelNice} Set Labels Visible
|
|
102
|
+
</label>
|
|
97
103
|
</TableCell>
|
|
98
|
-
<TableCell className={classes.inputCell}>
|
|
104
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
99
105
|
<Checkbox
|
|
100
106
|
className={classes.checkbox}
|
|
101
107
|
checked={cellSetLabelsVisible}
|
|
102
108
|
onChange={handleLabelVisibilityChange}
|
|
103
109
|
name="scatterplot-option-cell-set-labels"
|
|
104
110
|
color="default"
|
|
111
|
+
inputProps={{
|
|
112
|
+
'aria-label': 'Show or hide set labels',
|
|
113
|
+
id: `scatterplot-set-labels-visible-${scatterplotOptionsId}`,
|
|
114
|
+
}}
|
|
105
115
|
/>
|
|
106
116
|
</TableCell>
|
|
107
117
|
</TableRow>
|
|
108
118
|
<TableRow>
|
|
109
|
-
<TableCell className={classes.labelCell}>
|
|
110
|
-
|
|
119
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
120
|
+
<label
|
|
121
|
+
htmlFor={`scatterplot-set-tooltips-visible-${scatterplotOptionsId}`}
|
|
122
|
+
>
|
|
123
|
+
Tooltips Visible
|
|
124
|
+
</label>
|
|
111
125
|
</TableCell>
|
|
112
|
-
<TableCell className={classes.inputCell}>
|
|
126
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
113
127
|
<Checkbox
|
|
114
128
|
className={classes.checkbox}
|
|
115
129
|
/**
|
|
@@ -119,22 +133,31 @@ export default function ScatterplotOptions(props) {
|
|
|
119
133
|
*/
|
|
120
134
|
checked={tooltipsVisible}
|
|
121
135
|
onChange={handleTooltipsVisibilityChange}
|
|
122
|
-
name="scatterplot-option-
|
|
136
|
+
name="scatterplot-option-tooltip-visibility"
|
|
123
137
|
color="default"
|
|
138
|
+
inputProps={{
|
|
139
|
+
'aria-label': 'Show or hide tooltips',
|
|
140
|
+
id: `scatterplot-set-tooltips-visible-${scatterplotOptionsId}`,
|
|
141
|
+
}}
|
|
124
142
|
/>
|
|
125
143
|
</TableCell>
|
|
126
144
|
</TableRow>
|
|
127
145
|
<TableRow>
|
|
128
|
-
<TableCell className={classes.labelCell}>
|
|
129
|
-
|
|
146
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
147
|
+
<label
|
|
148
|
+
htmlFor={`scatterplot-set-label-size-${scatterplotOptionsId}`}
|
|
149
|
+
>
|
|
150
|
+
{observationsLabelNice} Set Label Size
|
|
151
|
+
</label>
|
|
130
152
|
</TableCell>
|
|
131
|
-
<TableCell className={classes.inputCell}>
|
|
153
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
132
154
|
<Slider
|
|
133
|
-
disabled={!cellSetLabelsVisible}
|
|
134
155
|
classes={{ root: classes.slider, valueLabel: classes.sliderValueLabel }}
|
|
156
|
+
disabled={!cellSetLabelsVisible}
|
|
135
157
|
value={cellSetLabelSize}
|
|
136
158
|
onChange={handleLabelSizeChange}
|
|
137
|
-
aria-
|
|
159
|
+
aria-label="Scatterplot label size slider"
|
|
160
|
+
id={`scatterplot-set-label-size-${scatterplotOptionsId}`}
|
|
138
161
|
valueLabelDisplay="auto"
|
|
139
162
|
step={1}
|
|
140
163
|
min={8}
|
|
@@ -143,30 +166,42 @@ export default function ScatterplotOptions(props) {
|
|
|
143
166
|
</TableCell>
|
|
144
167
|
</TableRow>
|
|
145
168
|
<TableRow>
|
|
146
|
-
<TableCell className={classes.labelCell}>
|
|
147
|
-
|
|
169
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
170
|
+
<label
|
|
171
|
+
htmlFor={`scatterplot-set-polygons-visible-${scatterplotOptionsId}`}
|
|
172
|
+
>
|
|
173
|
+
{observationsLabelNice} Set Polygons Visible
|
|
174
|
+
</label>
|
|
148
175
|
</TableCell>
|
|
149
|
-
<TableCell className={classes.inputCell}>
|
|
176
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
150
177
|
<Checkbox
|
|
151
178
|
className={classes.checkbox}
|
|
152
179
|
checked={cellSetPolygonsVisible}
|
|
153
180
|
onChange={handlePolygonVisibilityChange}
|
|
154
181
|
name="scatterplot-option-cell-set-polygons"
|
|
155
182
|
color="default"
|
|
183
|
+
inputProps={{
|
|
184
|
+
'aria-label': 'Show or hide polygons',
|
|
185
|
+
id: `scatterplot-set-polygons-visible-${scatterplotOptionsId}`,
|
|
186
|
+
}}
|
|
156
187
|
/>
|
|
157
188
|
</TableCell>
|
|
158
189
|
</TableRow>
|
|
159
190
|
<TableRow>
|
|
160
|
-
<TableCell className={classes.labelCell}
|
|
161
|
-
|
|
191
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
192
|
+
<label
|
|
193
|
+
htmlFor={`scatterplot-set-radius-mode-select-${scatterplotOptionsId}`}
|
|
194
|
+
>
|
|
195
|
+
{observationsLabelNice} Radius Mode
|
|
196
|
+
</label>
|
|
162
197
|
</TableCell>
|
|
163
|
-
<TableCell className={classes.inputCell}>
|
|
198
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
164
199
|
<OptionSelect
|
|
165
200
|
className={classes.select}
|
|
166
201
|
value={cellRadiusMode}
|
|
167
202
|
onChange={handleCellRadiusModeChange}
|
|
168
203
|
inputProps={{
|
|
169
|
-
id:
|
|
204
|
+
id: `scatterplot-set-radius-mode-select-${scatterplotOptionsId}`,
|
|
170
205
|
}}
|
|
171
206
|
>
|
|
172
207
|
<option value="auto">Auto</option>
|
|
@@ -175,16 +210,21 @@ export default function ScatterplotOptions(props) {
|
|
|
175
210
|
</TableCell>
|
|
176
211
|
</TableRow>
|
|
177
212
|
<TableRow>
|
|
178
|
-
<TableCell className={classes.labelCell}>
|
|
179
|
-
|
|
213
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
214
|
+
<label
|
|
215
|
+
htmlFor={`scatterplot-set-radius-size-select-${scatterplotOptionsId}`}
|
|
216
|
+
>
|
|
217
|
+
{observationsLabelNice} Radius Size
|
|
218
|
+
</label>
|
|
180
219
|
</TableCell>
|
|
181
|
-
<TableCell className={classes.inputCell}>
|
|
220
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
182
221
|
<Slider
|
|
183
|
-
disabled={cellRadiusMode !== 'manual'}
|
|
184
222
|
classes={{ root: classes.slider, valueLabel: classes.sliderValueLabel }}
|
|
223
|
+
disabled={cellRadiusMode !== 'manual'}
|
|
185
224
|
value={cellRadius}
|
|
186
225
|
onChange={handleRadiusChange}
|
|
187
|
-
aria-
|
|
226
|
+
aria-label="Scatterplot radius size slider"
|
|
227
|
+
id={`scatterplot-set-radius-size-select-${scatterplotOptionsId}`}
|
|
188
228
|
valueLabelDisplay="auto"
|
|
189
229
|
step={0.01}
|
|
190
230
|
min={0.01}
|
|
@@ -193,16 +233,20 @@ export default function ScatterplotOptions(props) {
|
|
|
193
233
|
</TableCell>
|
|
194
234
|
</TableRow>
|
|
195
235
|
<TableRow>
|
|
196
|
-
<TableCell className={classes.labelCell}
|
|
197
|
-
|
|
236
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
237
|
+
<label
|
|
238
|
+
htmlFor={`scatterplot-set-opacity-mode-${scatterplotOptionsId}`}
|
|
239
|
+
>
|
|
240
|
+
{observationsLabelNice} Opacity Mode
|
|
241
|
+
</label>
|
|
198
242
|
</TableCell>
|
|
199
|
-
<TableCell className={classes.inputCell}>
|
|
243
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
200
244
|
<OptionSelect
|
|
201
245
|
className={classes.select}
|
|
202
246
|
value={cellOpacityMode}
|
|
203
247
|
onChange={handleCellOpacityModeChange}
|
|
204
248
|
inputProps={{
|
|
205
|
-
id:
|
|
249
|
+
id: `scatterplot-set-opacity-mode-${scatterplotOptionsId}`,
|
|
206
250
|
}}
|
|
207
251
|
>
|
|
208
252
|
<option value="auto">Auto</option>
|
|
@@ -211,16 +255,21 @@ export default function ScatterplotOptions(props) {
|
|
|
211
255
|
</TableCell>
|
|
212
256
|
</TableRow>
|
|
213
257
|
<TableRow>
|
|
214
|
-
<TableCell className={classes.labelCell}>
|
|
215
|
-
|
|
258
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
259
|
+
<label
|
|
260
|
+
htmlFor={`scatterplot-set-opacity-level-${scatterplotOptionsId}`}
|
|
261
|
+
>
|
|
262
|
+
{observationsLabelNice} Opacity Level
|
|
263
|
+
</label>
|
|
216
264
|
</TableCell>
|
|
217
|
-
<TableCell className={classes.inputCell}>
|
|
265
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
218
266
|
<Slider
|
|
219
|
-
disabled={cellOpacityMode !== 'manual'}
|
|
220
267
|
classes={{ root: classes.slider, valueLabel: classes.sliderValueLabel }}
|
|
268
|
+
disabled={cellOpacityMode !== 'manual'}
|
|
221
269
|
value={cellOpacity}
|
|
222
270
|
onChange={handleOpacityChange}
|
|
223
|
-
aria-
|
|
271
|
+
aria-label="Scatterplot opacity level slider"
|
|
272
|
+
id={`scatterplot-set-opacity-level-${scatterplotOptionsId}`}
|
|
224
273
|
valueLabelDisplay="auto"
|
|
225
274
|
step={0.05}
|
|
226
275
|
min={0.0}
|
|
@@ -229,16 +278,20 @@ export default function ScatterplotOptions(props) {
|
|
|
229
278
|
</TableCell>
|
|
230
279
|
</TableRow>
|
|
231
280
|
<TableRow>
|
|
232
|
-
<TableCell className={classes.labelCell}
|
|
233
|
-
|
|
281
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
282
|
+
<label
|
|
283
|
+
htmlFor={`scatterplot-gene-expression-colormap-${scatterplotOptionsId}`}
|
|
284
|
+
>
|
|
285
|
+
Gene Expression Colormap
|
|
286
|
+
</label>
|
|
234
287
|
</TableCell>
|
|
235
|
-
<TableCell className={classes.inputCell}>
|
|
288
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
236
289
|
<OptionSelect
|
|
237
290
|
className={classes.select}
|
|
238
291
|
value={geneExpressionColormap}
|
|
239
292
|
onChange={handleGeneExpressionColormapChange}
|
|
240
293
|
inputProps={{
|
|
241
|
-
id:
|
|
294
|
+
id: `scatterplot-gene-expression-colormap-${scatterplotOptionsId}`,
|
|
242
295
|
}}
|
|
243
296
|
>
|
|
244
297
|
{GLSL_COLORMAPS.map(cmap => (
|
|
@@ -248,15 +301,23 @@ export default function ScatterplotOptions(props) {
|
|
|
248
301
|
</TableCell>
|
|
249
302
|
</TableRow>
|
|
250
303
|
<TableRow>
|
|
251
|
-
<TableCell className={classes.labelCell}>
|
|
252
|
-
|
|
304
|
+
<TableCell className={classes.labelCell} variant="head" scope="row">
|
|
305
|
+
<label
|
|
306
|
+
htmlFor={`scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`}
|
|
307
|
+
>
|
|
308
|
+
Gene Expression Colormap Range
|
|
309
|
+
</label>
|
|
253
310
|
</TableCell>
|
|
254
|
-
<TableCell className={classes.inputCell}>
|
|
311
|
+
<TableCell className={classes.inputCell} variant="body">
|
|
255
312
|
<Slider
|
|
256
313
|
classes={{ root: classes.slider, valueLabel: classes.sliderValueLabel }}
|
|
257
314
|
value={geneExpressionColormapRange}
|
|
258
315
|
onChange={handleColormapRangeChangeDebounced}
|
|
259
|
-
|
|
316
|
+
getAriaLabel={(index) => {
|
|
317
|
+
const labelPrefix = index === 0 ? 'Low value slider' : 'High value slider';
|
|
318
|
+
return `${labelPrefix} for scatterplot gene expression colormap range`;
|
|
319
|
+
}}
|
|
320
|
+
id={`scatterplot-gene-expression-colormap-range-${scatterplotOptionsId}`}
|
|
260
321
|
valueLabelDisplay="auto"
|
|
261
322
|
step={0.005}
|
|
262
323
|
min={0.0}
|