@sjcrh/proteinpaint-shared 2.150.0 → 2.153.1-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/package.json +6 -1
- package/src/termdb.bins.js +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-shared",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.153.1-2",
|
|
4
4
|
"description": "ProteinPaint code that is shared between server and client-side workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -23,5 +23,10 @@
|
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"esbuild": "^0.25.9"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/stjude/proteinpaint",
|
|
30
|
+
"directory": "server"
|
|
26
31
|
}
|
|
27
32
|
}
|
package/src/termdb.bins.js
CHANGED
|
@@ -359,10 +359,13 @@ export function get_bin_label(bin, binconfig, valueConversion) {
|
|
|
359
359
|
export function get_bin_range_equation(bin, binconfig) {
|
|
360
360
|
const x = '<span style="font-family:Times;font-style:italic;">x</span>'
|
|
361
361
|
let range_eq
|
|
362
|
-
|
|
362
|
+
// should always use computed (not user-customized) bin label to determine bin range text
|
|
363
|
+
const copy = structuredClone(bin)
|
|
364
|
+
copy.label = '' // mutate only the copy, and not the original bin argument
|
|
365
|
+
const bin_label = get_bin_label(copy, binconfig)
|
|
363
366
|
if (bin.startunbounded || bin.stopunbounded) {
|
|
364
367
|
// first or last bins, e.g. x ≤ 14 and x > 16
|
|
365
|
-
range_eq = x + '
|
|
368
|
+
range_eq = x + ' ' + bin_label
|
|
366
369
|
} else if (bin.startinclusive) {
|
|
367
370
|
// bins with startinclusive, e.g. 14 ≤ x < 16
|
|
368
371
|
range_eq = bin_label.replace('to <', '≤ ' + x + ' <')
|