@genome-spy/core 0.50.0 → 0.50.1
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/bundle/index.es.js +2148 -2140
- package/dist/bundle/index.js +77 -76
- package/dist/schema.json +339 -256
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +12 -8
- package/dist/src/marks/mark.d.ts +1 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +7 -4
- package/dist/src/spec/mark.d.ts +43 -9
- package/dist/src/spec/view.d.ts +113 -32
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +1 -0
- package/dist/src/styles/genome-spy.scss +1 -0
- package/dist/src/view/layout/flexLayout.d.ts +6 -0
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +9 -0
- package/dist/src/view/view.js +1 -1
- package/dist/src/view/viewUtils.d.ts +0 -4
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +0 -7
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":"AA6CA;IACI;;;;;OAKG;IAEH;;;;;OAKG;IACH,uBAJW,WAAW,qDAEX,OAAO,qBAAqB,EAAE,YAAY,EA6FpD;IA1FG,uBAA0B;IAC1B,oDAAsB;IAItB,6BAA6B;IAC7B,uBADW,CAAC,MAAM,IAAI,CAAC,EAAE,CACM;IAE/B,sCAAsC;IACtC,wCAAgB;IAEhB,yBAAoC;IAEpC,4CAA4C;IAC5C,oBADW,QAAU,MAAM,KAAE,MAAM,EA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;;OAGG;IACH,UAFa,QAAQ,OAAO,CAAC,CA6B5B;IAED,4BA8JC;IAvIe,iCAAoC;IAyIpD;;;OAGG;IACH,kBAHW,MAAM,KACN,MAAM,QAqEhB;IAED;;;;;;;OAOG;IACH,oDAHuB,QAAQ,MAAM,GAAG,WAAW,GAAG,OAAO,KAAK,EAAE,cAAc,CAAC,QAYlF;IAED,sBA6CC;IAED,kBAIC;IAED,iCAOC;IAED,iCASC;IAED,qFAWC;;CACJ;;;;iCAt8BY,eAAe,GAAG,YAAY,GAAG,QAAQ,GAAG,gBAAgB;4BAP7B,uBAAuB;qBAZ9C,qBAAqB;wBAIlB,yBAAyB;yCARR,yDAAyD;oBAYvD,oBAAoB;kBAT7C,wBAAwB;wBALlB,qBAAqB;oBATzB,uBAAuB;qBAOtB,oBAAoB"}
|
package/dist/src/genomeSpy.js
CHANGED
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
checkForDuplicateScaleNames,
|
|
11
11
|
setImplicitScaleNames,
|
|
12
12
|
calculateCanvasSize,
|
|
13
|
-
calculateViewRootSize,
|
|
14
13
|
} from "./view/viewUtils.js";
|
|
15
14
|
import UnitView from "./view/unitView.js";
|
|
16
15
|
|
|
@@ -288,6 +287,9 @@ export default class GenomeSpy {
|
|
|
288
287
|
// Do some hacks to stop css animations of the loading indicators.
|
|
289
288
|
// Otherwise they fire animation frames even when their opacity is zero.
|
|
290
289
|
// TODO: Instead of this, replace the animated spinners with static images.
|
|
290
|
+
// Or even better, once more widely supported, use `allow-discrete`
|
|
291
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/transition-behavior
|
|
292
|
+
// to enable transition of the display property.
|
|
291
293
|
if (isSomethingVisible()) {
|
|
292
294
|
this.loadingIndicatorsElement.style.display = "block";
|
|
293
295
|
} else {
|
|
@@ -316,10 +318,12 @@ export default class GenomeSpy {
|
|
|
316
318
|
this.renderAll();
|
|
317
319
|
};
|
|
318
320
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
if (this.viewRoot.getSize().isGrowing()) {
|
|
322
|
+
// TODO: Size should be observed only if the content is not absolutely sized
|
|
323
|
+
const resizeObserver = new ResizeObserver(resizeCallback);
|
|
324
|
+
resizeObserver.observe(this.container);
|
|
325
|
+
this._destructionCallbacks.push(() => resizeObserver.disconnect());
|
|
326
|
+
}
|
|
323
327
|
|
|
324
328
|
/** @type {() => void} */
|
|
325
329
|
let remove = null;
|
|
@@ -362,7 +366,7 @@ export default class GenomeSpy {
|
|
|
362
366
|
canvasWrapper,
|
|
363
367
|
() =>
|
|
364
368
|
this.viewRoot
|
|
365
|
-
? calculateCanvasSize(
|
|
369
|
+
? calculateCanvasSize(this.viewRoot.getSize())
|
|
366
370
|
: { width: undefined, height: undefined },
|
|
367
371
|
this.spec.background,
|
|
368
372
|
{ powerPreference: this.options.powerPreference ?? "default" }
|
|
@@ -384,7 +388,7 @@ export default class GenomeSpy {
|
|
|
384
388
|
});
|
|
385
389
|
canvasWrapper.appendChild(this.loadingIndicatorsElement);
|
|
386
390
|
|
|
387
|
-
this.tooltip = new Tooltip(
|
|
391
|
+
this.tooltip = new Tooltip(this.container);
|
|
388
392
|
|
|
389
393
|
this.loadingMessageElement
|
|
390
394
|
.querySelector(".message")
|
|
@@ -539,7 +543,7 @@ export default class GenomeSpy {
|
|
|
539
543
|
);
|
|
540
544
|
|
|
541
545
|
this.#canvasWrapper.style.flexGrow =
|
|
542
|
-
|
|
546
|
+
this.viewRoot.getSize().height.grow > 0 ? "1" : "0";
|
|
543
547
|
|
|
544
548
|
this.#initializeParameterBindings();
|
|
545
549
|
|
package/dist/src/marks/mark.d.ts
CHANGED
|
@@ -236,6 +236,7 @@ export default class Mark<P extends import("../spec/mark.js").MarkProps = import
|
|
|
236
236
|
/**
|
|
237
237
|
* @param {DrawFunction} draw A function that draws a range of vertices
|
|
238
238
|
* @param {import("./mark.js").MarkRenderingOptions} options
|
|
239
|
+
* @returns {function():void}
|
|
239
240
|
*/
|
|
240
241
|
createRenderCallback(draw: DrawFunction, options: import("./mark.js").MarkRenderingOptions): () => void;
|
|
241
242
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../../src/marks/mark.js"],"names":[],"mappings":";AAoDA,0DAA2D;AAC3D,0DAA2D;AAE3D;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH;IAgBI;;OAEG;IACH,sBAFW,OAAO,qBAAqB,EAAE,OAAO,EAoG/C;IAjGG,gDAAwB;IAExB,8EAA8E;IAC9E,uGAAyB;IAIzB;;;OAGG;IACH,sBAHU,OAAO,SAAS,EAAE,UAAU,GAAG;QAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,CAG5C;IAE3B;;;;;;;OAOG;IACH,2BAHU,IAAI,MAAM,EAAE,MAAM,CAAC,CAGG;IAEhC;;;OAGG;IACH,uBAHU,OAAO,SAAS,EAAE,WAAW,CAGX;IAE5B;;;OAGG;IACH,2BAHU,OAAO,SAAS,EAAE,eAAe,CAGX;IAEhC;;;OAGG;IACH,2BAHU,OAAO,SAAS,EAAE,gBAAgB,CAGZ;IAEhC;;;;;OAKG;IACH,2BAHU,OAAO,SAAS,EAAE,gBAAgB,CAGZ;IAEhC;;;;;OAKG;IACH,uCAA+B;IAE/B,kFAAkF;IAClF,UADW,SAAS,GAAG,CAAC,CACM;IAG9B,qBAqBE;IAEF;;;;;;OAMG;IACH,qBAHU,CAAC,CAQV;IAGL;;;OAGG;IACH,0CAHW,QAAQ,CAAC,CAAC,QAQpB;IAED,sBAEC;IAED;;;;;OAKG;IACH,2BAHa,OAAO,oBAAoB,EAAE,OAAO,EAAE,CAMlD;IAED;;OAEG;IACH,+DAWC;IAED;;OAEG;IACH,4DAcC;IAED;;;;;OAKG;IACH,oGAEC;IAED;;;;;;OAMG;IACH,oDAHW,CAAC,MAAM,CAAC,CAAC,EAAE,QAqCrB;IAED;;;;OAIG;IACH,sDAiDC;IAED,wDAEC;IAED,uDAEC;IAED,uBAEC;IAED;;;OAGG;IACH,2BAEC;IAED;;OAEG;IACH,oCAEC;IAED;;OAEG;IACH,2BAEC;IAED,sEAeC;IAED;;;;;;OAMG;IAEH,6CANW,MAAM,kBACN,MAAM,iBACN,MAAM,EAAE,QA8UlB;IALG;;;;;;MAIC;IAGL;;;;;;OAMG;IACH,uCA6CC;IAED;;;;;;OAMG;IACH,+CAHW,MAAM,UACK,GAAG,KAAE,IAAI,CAe9B;IAED;;;;;;;;;;OAUG;IACH,mDAJW,MAAM,sFAEsB,GAAG,QA6BzC;IAED;;OAEG;IACH,2BAwBC;IAED;;;OAGG;IACH,6BAFW,GAAG,QAyCb;IAED,yBAAyB;IACzB,uDAEC;IAED,yBAAyB;IACzB,iCAEC;IAED,gCAEC;IAED,+BAEC;IAED,yCAEC;IAED;;OAEG;IACH,gCAgBC;IAED;;OAEG;IACH,4CAOC;IAED;;;;;;;;OAQG;IAEH,uBAJW,OAAO,uBAAuB,EAAE,sBAAsB,GACpD,CAAC,MAAM,IAAI,CAAC,EAAE,CAsF1B;IAED;;;;;;OAMG;IACH,qCAJW,oBAAoB,GAClB,OAAO,CAqCnB;IAED;;;;;;;OAOG;IACH,gBAJW,oBAAoB,SACP,IAAI,CAM3B;IAED
|
|
1
|
+
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../../src/marks/mark.js"],"names":[],"mappings":";AAoDA,0DAA2D;AAC3D,0DAA2D;AAE3D;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH;IAgBI;;OAEG;IACH,sBAFW,OAAO,qBAAqB,EAAE,OAAO,EAoG/C;IAjGG,gDAAwB;IAExB,8EAA8E;IAC9E,uGAAyB;IAIzB;;;OAGG;IACH,sBAHU,OAAO,SAAS,EAAE,UAAU,GAAG;QAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,CAG5C;IAE3B;;;;;;;OAOG;IACH,2BAHU,IAAI,MAAM,EAAE,MAAM,CAAC,CAGG;I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ED;;OAEG;IACH,4CAOC;IAED;;;;;;;;OAQG;IAEH,uBAJW,OAAO,uBAAuB,EAAE,sBAAsB,GACpD,CAAC,MAAM,IAAI,CAAC,EAAE,CAsF1B;IAED;;;;;;OAMG;IACH,qCAJW,oBAAoB,GAClB,OAAO,CAqCnB;IAED;;;;;;;OAOG;IACH,gBAJW,oBAAoB,SACP,IAAI,CAM3B;IAED;;;;OAIG;IACH,2BAJW,YAAY,WACZ,OAAO,WAAW,EAAE,oBAAoB,SAC3B,IAAI,CAmE3B;IAED;;;;;;OAMG;IACH,oBAJW,OAAO,6BAA6B,EAAE,OAAO,aAC7C,OAAO,6BAA6B,EAAE,OAAO,GAC3C,OAAO,CAuHnB;IAED;;;;;;;;;OASG;IACH,qBAJW,MAAM,KACN,OAAO,oBAAoB,EAAE,MAAM,GACjC,GAAG,CAIf;;CACJ;+BArxCY,OAAO,uBAAuB,EAAE,gBAAgB;;;;;;wBAEnD,OAAO;;mCAEJ,gBAAgB,GAAG,qBAAqB;oCAG1C,MAAM,SACN,MAAM;AA+wCjB;;;GAGG;AACH;IACI,cAEC;IAkBD;;;OAGG;IACH,2BAFW,IAAI,CAAC,EAAE,OAAO,yBAAyB,EAAE,UAAU,CAAC,QAiB9D;CACJ;0BA/0CyB,WAAW"}
|
package/dist/src/marks/mark.js
CHANGED
|
@@ -1148,13 +1148,16 @@ export default class Mark {
|
|
|
1148
1148
|
/**
|
|
1149
1149
|
* @param {DrawFunction} draw A function that draws a range of vertices
|
|
1150
1150
|
* @param {import("./mark.js").MarkRenderingOptions} options
|
|
1151
|
+
* @returns {function():void}
|
|
1151
1152
|
*/
|
|
1152
1153
|
createRenderCallback(draw, options) {
|
|
1153
1154
|
if (!this.bufferInfo) {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1155
|
+
// This happens if the layout is computed before the data flow has propagated.
|
|
1156
|
+
// However, it's not a big deal, because this will be called again at the end
|
|
1157
|
+
// of the initialization process.
|
|
1158
|
+
|
|
1159
|
+
// Return no operation
|
|
1160
|
+
return () => undefined;
|
|
1158
1161
|
}
|
|
1159
1162
|
|
|
1160
1163
|
// eslint-disable-next-line consistent-this
|
package/dist/src/spec/mark.d.ts
CHANGED
|
@@ -10,9 +10,24 @@ export interface MarkPropsBase {
|
|
|
10
10
|
|
|
11
11
|
// Channels.
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Position on the x axis.
|
|
15
|
+
*/
|
|
13
16
|
x?: number | ExprRef;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Position on the y axis.
|
|
20
|
+
*/
|
|
14
21
|
y?: number | ExprRef;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Color of the mark. Affects either `fill` or `stroke`, depending on the `filled` property.
|
|
25
|
+
*/
|
|
15
26
|
color?: string | ExprRef;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Opacity of the mark. Affects `fillOpacity` or `strokeOpacity`, depending on the `filled` property.
|
|
30
|
+
*/
|
|
16
31
|
opacity?: number | ExprRef;
|
|
17
32
|
|
|
18
33
|
/**
|
|
@@ -48,7 +63,9 @@ export interface MarkPropsBase {
|
|
|
48
63
|
minBufferSize?: number;
|
|
49
64
|
|
|
50
65
|
/**
|
|
51
|
-
* Tooltip handler. If `null`, no tooltip is shown.
|
|
66
|
+
* Tooltip handler. If `null`, no tooltip is shown. If string, specifies
|
|
67
|
+
* the [tooltip handler](https://genomespy.app/docs/api/#custom-tooltip-handlers)
|
|
68
|
+
* to use.
|
|
52
69
|
*/
|
|
53
70
|
tooltip?: Tooltip;
|
|
54
71
|
}
|
|
@@ -73,12 +90,12 @@ export interface FillAndStrokeProps {
|
|
|
73
90
|
filled?: boolean;
|
|
74
91
|
|
|
75
92
|
/**
|
|
76
|
-
* The fill color
|
|
93
|
+
* The fill color.
|
|
77
94
|
*/
|
|
78
95
|
fill?: string | ExprRef;
|
|
79
96
|
|
|
80
97
|
/**
|
|
81
|
-
* The fill opacity. Value between
|
|
98
|
+
* The fill opacity. Value between `0` and `1`.
|
|
82
99
|
*/
|
|
83
100
|
fillOpacity?: number | ExprRef;
|
|
84
101
|
|
|
@@ -88,13 +105,20 @@ export interface FillAndStrokeProps {
|
|
|
88
105
|
stroke?: string | ExprRef;
|
|
89
106
|
|
|
90
107
|
/**
|
|
91
|
-
* The stroke opacity. Value between
|
|
108
|
+
* The stroke opacity. Value between `0` and `1`.
|
|
92
109
|
*/
|
|
93
110
|
strokeOpacity?: number | ExprRef;
|
|
94
111
|
}
|
|
95
112
|
|
|
96
113
|
export interface SecondaryPositionProps {
|
|
114
|
+
/**
|
|
115
|
+
* The secondary position on the x axis.
|
|
116
|
+
*/
|
|
97
117
|
x2?: number | ExprRef;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The secondary position on the y axis.
|
|
121
|
+
*/
|
|
98
122
|
y2?: number | ExprRef;
|
|
99
123
|
}
|
|
100
124
|
|
|
@@ -385,11 +409,12 @@ export interface PointProps
|
|
|
385
409
|
|
|
386
410
|
/**
|
|
387
411
|
* One of `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
|
|
388
|
-
* `"triangle-down"`, `"triangle-right"`,
|
|
412
|
+
* `"triangle-down"`, `"triangle-right"`, `"triangle-left"`, `"tick-up"`,
|
|
413
|
+
* `"tick-down"`, `"tick-right"`, or `"tick-left"`
|
|
389
414
|
*
|
|
390
415
|
* **Default value:** `"circle"`
|
|
391
416
|
*/
|
|
392
|
-
shape?: string;
|
|
417
|
+
shape?: string | ExprRef;
|
|
393
418
|
|
|
394
419
|
/**
|
|
395
420
|
* Should the stroke only grow inwards, e.g, the diameter/outline is not affected by the stroke width.
|
|
@@ -402,7 +427,7 @@ export interface PointProps
|
|
|
402
427
|
|
|
403
428
|
/**
|
|
404
429
|
* Gradient strength controls the amount of the gradient eye-candy effect in the fill color.
|
|
405
|
-
* Valid values are between 0 and 1
|
|
430
|
+
* Valid values are between `0` and `1`.
|
|
406
431
|
*
|
|
407
432
|
* **Default value:** `0`
|
|
408
433
|
*/
|
|
@@ -432,7 +457,16 @@ export interface LinkProps
|
|
|
432
457
|
type: "link";
|
|
433
458
|
|
|
434
459
|
/**
|
|
435
|
-
* The shape of the link path.
|
|
460
|
+
* The shape of the link path.
|
|
461
|
+
*
|
|
462
|
+
* The `"arc"` shape draws a circular arc between the two points. The apex of the
|
|
463
|
+
* arc resides on the left side of the line that connects the two points.
|
|
464
|
+
* The `"dome"` shape draws a vertical or horizontal arc with a specific height.
|
|
465
|
+
* The primary positional channel determines the apex of the arc and the secondary
|
|
466
|
+
* determines the endpoint placement.
|
|
467
|
+
* The `"diagonal"` shape draws an "S"-shaped curve between the two points.
|
|
468
|
+
* The `"line"` shape draws a straight line between the two points. See an
|
|
469
|
+
* [example](#different-link-shapes-and-orientations) of the different shapes below.
|
|
436
470
|
*
|
|
437
471
|
* **Default value:** `"arc"`
|
|
438
472
|
*/
|
|
@@ -459,7 +493,7 @@ export interface LinkProps
|
|
|
459
493
|
* The number of segments in the bézier curve. Affects the rendering quality and performance.
|
|
460
494
|
* Use a higher value for a smoother curve.
|
|
461
495
|
*
|
|
462
|
-
* **Default value
|
|
496
|
+
* **Default value:** `101`
|
|
463
497
|
*/
|
|
464
498
|
segments?: number | ExprRef;
|
|
465
499
|
|
package/dist/src/spec/view.d.ts
CHANGED
|
@@ -13,10 +13,16 @@ import { SampleSpec } from "./sampleView.js";
|
|
|
13
13
|
import { Parameter } from "./parameter.js";
|
|
14
14
|
|
|
15
15
|
export interface SizeDef {
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Size in pixels
|
|
18
|
+
*/
|
|
17
19
|
px?: number;
|
|
18
20
|
|
|
19
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Share of the remaining space. See [child
|
|
23
|
+
* sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
24
|
+
* for details.
|
|
25
|
+
*/
|
|
20
26
|
grow?: number;
|
|
21
27
|
}
|
|
22
28
|
|
|
@@ -34,9 +40,15 @@ export interface FacetMapping {
|
|
|
34
40
|
*/
|
|
35
41
|
export interface DynamicOpacity {
|
|
36
42
|
channel?: PrimaryPositionalChannel;
|
|
37
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Stops expressed as units (base pairs, for example) per pixel.
|
|
46
|
+
*/
|
|
38
47
|
unitsPerPixel: number[];
|
|
39
|
-
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Opacity values that match the given stops.
|
|
51
|
+
*/
|
|
40
52
|
values: number[];
|
|
41
53
|
}
|
|
42
54
|
|
|
@@ -65,17 +77,25 @@ export type ViewBackground = Pick<
|
|
|
65
77
|
>;
|
|
66
78
|
|
|
67
79
|
export interface ViewSpecBase extends ResolveSpec {
|
|
80
|
+
/**
|
|
81
|
+
* An internal name that can be used for referring the view. For referencing
|
|
82
|
+
* purposes, the name should be unique within the view hierarchy.
|
|
83
|
+
*/
|
|
68
84
|
name?: string;
|
|
69
85
|
|
|
70
86
|
/**
|
|
71
87
|
* Height of the view. If a number, it is interpreted as pixels.
|
|
88
|
+
* Check [child sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
89
|
+
* for details.
|
|
72
90
|
*
|
|
73
|
-
* **Default:** `"container"`
|
|
91
|
+
* **Default value:** `"container"`
|
|
74
92
|
*/
|
|
75
93
|
height?: SizeDef | number | Step | "container";
|
|
76
94
|
|
|
77
95
|
/**
|
|
78
96
|
* Width of the view. If a number, it is interpreted as pixels.
|
|
97
|
+
* Check [child sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
98
|
+
* for details.
|
|
79
99
|
*
|
|
80
100
|
* **Default:** `"container"`
|
|
81
101
|
*/
|
|
@@ -83,7 +103,8 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
83
103
|
|
|
84
104
|
/**
|
|
85
105
|
* Optional viewport height of the view. If the view size exceeds the viewport height,
|
|
86
|
-
* it will be shown with scrollbars.
|
|
106
|
+
* it will be shown with [scrollbars](https://genomespy.app/docs/grammar/composition/concat/#scrollable-viewports).
|
|
107
|
+
* This property implicitly enables clipping.
|
|
87
108
|
*
|
|
88
109
|
* **Default:** `null` (same as `height`)
|
|
89
110
|
*/
|
|
@@ -91,85 +112,140 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
91
112
|
|
|
92
113
|
/**
|
|
93
114
|
* Optional viewport width of the view. If the view size exceeds the viewport width,
|
|
94
|
-
* it will be shown with scrollbars.
|
|
115
|
+
* it will be shown with [scrollbars](https://genomespy.app/docs/grammar/composition/concat/#scrollable-viewports).
|
|
116
|
+
* This property implicitly enables clipping.
|
|
95
117
|
*
|
|
96
118
|
* **Default:** `null` (same as `width`)
|
|
97
119
|
*/
|
|
98
120
|
viewportWidth?: SizeDef | number | "container";
|
|
99
121
|
|
|
100
122
|
/**
|
|
101
|
-
* Padding
|
|
123
|
+
* Padding applied to the view. Accepts either a number representing pixels or an
|
|
124
|
+
* object specifying separate paddings for each edge.
|
|
125
|
+
*
|
|
126
|
+
* Examples:
|
|
127
|
+
* - `padding: 10`
|
|
128
|
+
* - `padding: { top: 10, right: 20, bottom: 10, left: 20 }`
|
|
102
129
|
*
|
|
103
|
-
* **Default
|
|
130
|
+
* **Default value:** `0`
|
|
104
131
|
*/
|
|
105
132
|
padding?: PaddingConfig;
|
|
106
133
|
|
|
107
134
|
/**
|
|
108
|
-
* Dynamic variables that parameterize
|
|
135
|
+
* Dynamic variables that [parameterize](https://genomespy.app/docs/grammar/parameters/)
|
|
136
|
+
* a visualization.
|
|
109
137
|
*/
|
|
110
138
|
params?: Parameter[];
|
|
111
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Specifies a [data source](https://genomespy.app/docs/grammar/data/).
|
|
142
|
+
* If omitted, the data source is inherited from the parent view.
|
|
143
|
+
*/
|
|
112
144
|
data?: Data;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An array of [transformations](https://genomespy.app/docs/grammar/transform/)
|
|
148
|
+
* applied to the data before visual encoding.
|
|
149
|
+
*/
|
|
113
150
|
transform?: TransformParams[];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding)
|
|
154
|
+
* using the visual channels.
|
|
155
|
+
*/
|
|
114
156
|
encoding?: Encoding;
|
|
115
|
-
title?: string | Title;
|
|
116
157
|
|
|
117
158
|
/**
|
|
118
|
-
*
|
|
159
|
+
* View title.
|
|
160
|
+
* N.B.: Currently, GenomeSpy doesn't do bound calculation, and you need to
|
|
161
|
+
* manually specify proper padding for the view to ensure that the title is
|
|
162
|
+
* visible.
|
|
119
163
|
*/
|
|
120
|
-
|
|
164
|
+
title?: string | Title;
|
|
121
165
|
|
|
122
166
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
167
|
+
* A description of the view. Can be used for documentation. The description
|
|
168
|
+
* of the top-level view is shown in the toolbar of the [GenomeSpy
|
|
169
|
+
* App](https://genomespy.app/docs/sample-collections/).
|
|
126
170
|
*/
|
|
127
|
-
|
|
171
|
+
description?: string | string[];
|
|
128
172
|
|
|
129
173
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
174
|
+
* The base URL for relative URL data sources and URL
|
|
175
|
+
* [imports](https://genomespy.app/docs/grammar/import/#importing-from-a-url).
|
|
176
|
+
* The base URLs are inherited in the view hierarchy unless overridden with
|
|
177
|
+
* this property. By default, the top-level view's base URL equals to the
|
|
178
|
+
* visualization specification's base URL.
|
|
133
179
|
*/
|
|
134
|
-
|
|
135
|
-
opacity?: ViewOpacityDef;
|
|
180
|
+
baseUrl?: string;
|
|
136
181
|
|
|
137
182
|
/**
|
|
138
|
-
*
|
|
139
|
-
* and not rendered.
|
|
183
|
+
* The default visibility of the view. An invisible view is removed from the
|
|
184
|
+
* layout and not rendered. For context, see [toggleable view
|
|
185
|
+
* visibility](https://genomespy.app/docs/sample-collections/visualizing/#toggleable-view-visibility).
|
|
140
186
|
*
|
|
141
187
|
* **Default:** `true`
|
|
142
188
|
*/
|
|
143
|
-
// TODO: Detach invisible views from the data flow.
|
|
144
189
|
visible?: boolean;
|
|
145
190
|
|
|
146
191
|
/**
|
|
147
|
-
* Is the visibility configurable interactively from the
|
|
192
|
+
* Is the visibility configurable interactively from the [GenomeSpy
|
|
193
|
+
* App](https://genomespy.app/docs/sample-collections/).
|
|
148
194
|
* Configurability requires that the view has an explicitly specified name
|
|
149
|
-
* that is *unique* in within the view
|
|
195
|
+
* that is *unique* in within the view hierarchy.
|
|
150
196
|
*
|
|
151
197
|
* **Default:** `false` for children of `layer`, `true` for others.
|
|
152
198
|
*/
|
|
153
199
|
configurableVisibility?: boolean;
|
|
154
200
|
|
|
155
201
|
/**
|
|
156
|
-
* Templates
|
|
157
|
-
* them with the template key.
|
|
202
|
+
* [Templates](https://genomespy.app/docs/grammar/import/#repeating-with-named-templates)
|
|
203
|
+
* that can be reused within the view specification by importing them with the template key.
|
|
158
204
|
*/
|
|
159
205
|
templates?: Record<string, ViewSpec>;
|
|
160
206
|
}
|
|
161
207
|
|
|
162
|
-
export interface
|
|
208
|
+
export interface DynamicOpacitySpec {
|
|
209
|
+
/**
|
|
210
|
+
* Opacity of the view and all its children. Allows implementing semantic
|
|
211
|
+
* zooming where the layers are faded in and out as the user zooms in and out.
|
|
212
|
+
*
|
|
213
|
+
* TODO: Write proper documentation with examples.
|
|
214
|
+
*
|
|
215
|
+
* **Default:** `1.0`
|
|
216
|
+
*/
|
|
217
|
+
opacity?: ViewOpacityDef;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface UnitSpec
|
|
221
|
+
extends ViewSpecBase,
|
|
222
|
+
DynamicOpacitySpec,
|
|
223
|
+
AggregateSamplesSpec {
|
|
224
|
+
/**
|
|
225
|
+
* The background of the view, including fill, stroke, and stroke width.
|
|
226
|
+
*/
|
|
163
227
|
view?: ViewBackground;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The graphical mark presenting the data objects.
|
|
231
|
+
*/
|
|
164
232
|
mark: MarkType | MarkProps;
|
|
165
233
|
}
|
|
166
234
|
|
|
235
|
+
// TODO: Some fancy generic typing that would make Aggregating available only
|
|
236
|
+
// inside SampleSpec.
|
|
167
237
|
export interface AggregateSamplesSpec {
|
|
168
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Specifies views that [aggregate](https://genomespy.app/docs/sample-collections/visualizing/#aggregation)
|
|
240
|
+
* multiple samples within the GenomeSpy App.
|
|
241
|
+
*/
|
|
169
242
|
aggregateSamples?: (UnitSpec | LayerSpec)[];
|
|
170
243
|
}
|
|
171
244
|
|
|
172
|
-
export interface LayerSpec
|
|
245
|
+
export interface LayerSpec
|
|
246
|
+
extends ViewSpecBase,
|
|
247
|
+
DynamicOpacitySpec,
|
|
248
|
+
AggregateSamplesSpec {
|
|
173
249
|
view?: ViewBackground;
|
|
174
250
|
layer: (LayerSpec | UnitSpec | ImportSpec)[];
|
|
175
251
|
}
|
|
@@ -196,6 +272,11 @@ export type ResolutionBehavior =
|
|
|
196
272
|
| "forced";
|
|
197
273
|
|
|
198
274
|
export interface ResolveSpec {
|
|
275
|
+
/**
|
|
276
|
+
* Specifies how scales and axes are
|
|
277
|
+
* [resolved](https://genomespy.app/docs/grammar/composition/#scale-and-axis-resolution)
|
|
278
|
+
* in the view hierarchy.
|
|
279
|
+
*/
|
|
199
280
|
resolve?: Partial<
|
|
200
281
|
Record<
|
|
201
282
|
ResolutionTarget,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default css;
|
|
2
|
-
declare const css: "\n.genome-spy {\n font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n position: relative;\n display: flex;\n flex-direction: column;\n}\n.genome-spy .canvas-wrapper {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n}\n.genome-spy canvas {\n transform: scale(1, 1);\n opacity: 1;\n transition: transform 0.6s, opacity 0.6s;\n}\n.genome-spy .loading-message {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-message .message {\n color: #666;\n opacity: 0;\n transition: opacity 0.7s;\n}\n.genome-spy .loading > canvas {\n transform: scale(0.95, 0.95);\n opacity: 0;\n}\n.genome-spy .loading > .loading-message .message {\n opacity: 1;\n}\n.genome-spy .loading > .loading-message .message .ellipsis {\n animation: blinker 1s linear infinite;\n}\n@keyframes blinker {\n 50% {\n opacity: 0;\n }\n}\n.genome-spy .loading-indicators {\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n}\n.genome-spy .loading-indicators div {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-indicators div > div {\n font-size: 11px;\n transition: opacity 0.2s;\n background: white;\n padding: 2px 5px;\n display: flex;\n border-radius: 3px;\n gap: 0.5em;\n opacity: 0;\n}\n.genome-spy .loading-indicators div > div.loading {\n opacity: 0.5;\n}\n.genome-spy .loading-indicators div > div.error {\n opacity: 0.8;\n color: firebrick;\n}\n.genome-spy .loading-indicators div > div > * {\n display: block;\n}\n.genome-spy .loading-indicators div > div img {\n width: 1.5em;\n height: 1.5em;\n}\n.genome-spy .tooltip {\n position: absolute;\n max-width: 450px;\n overflow: hidden;\n background: #f6f6f6;\n padding: 10px;\n font-size: 13px;\n box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n pointer-events: none;\n z-index: 100;\n}\n.genome-spy .tooltip > :last-child {\n margin-bottom: 0;\n}\n.genome-spy .tooltip > .title {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px dashed #b6b6b6;\n}\n.genome-spy .tooltip .summary {\n font-size: 12px;\n}\n.genome-spy .tooltip table {\n border-collapse: collapse;\n}\n.genome-spy .tooltip table:first-child {\n margin-top: 0;\n}\n.genome-spy .tooltip table th,\n.genome-spy .tooltip table td {\n padding: 2px 0.4em;\n vertical-align: top;\n}\n.genome-spy .tooltip table th:first-child,\n.genome-spy .tooltip table td:first-child {\n padding-left: 0;\n}\n.genome-spy .tooltip table th {\n text-align: left;\n font-weight: bold;\n}\n.genome-spy .tooltip .color-legend {\n display: inline-block;\n width: 0.8em;\n height: 0.8em;\n margin-left: 0.4em;\n box-shadow: 0px 0px 3px 1px white;\n}\n.genome-spy .tooltip .attributes .hovered {\n background-color: #e0e0e0;\n}\n.genome-spy .tooltip .na {\n color: #aaa;\n font-style: italic;\n font-size: 80%;\n}\n.genome-spy .gene-track-tooltip .summary {\n font-size: 90%;\n}\n.genome-spy .message-box {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n}\n.genome-spy .message-box > div {\n border: 1px solid red;\n padding: 10px;\n background: #fff0f0;\n}\n\n.gs-input-binding {\n display: grid;\n grid-template-columns: max-content max-content;\n column-gap: 1em;\n row-gap: 0.3em;\n justify-items: start;\n}\n.gs-input-binding > select,\n.gs-input-binding > input:not([type=checkbox]) {\n width: 100%;\n}\n.gs-input-binding input[type=range] + span {\n display: inline-block;\n margin-left: 0.3em;\n min-width: 2.2em;\n font-variant-numeric: tabular-nums;\n}\n.gs-input-binding input[type=range],\n.gs-input-binding input[type=radio] {\n vertical-align: text-bottom;\n}\n.gs-input-binding .radio-group {\n display: flex;\n align-items: center;\n}\n.gs-input-binding .description {\n max-width: 26em;\n grid-column: 1/-1;\n color: #777;\n font-size: 90%;\n margin-top: -0.5em;\n}\n\n.gs-input-bindings {\n flex-basis: content;\n font-size: 14px;\n padding: 10px;\n}\n";
|
|
2
|
+
declare const css: "\n.genome-spy {\n font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n position: relative;\n display: flex;\n flex-direction: column;\n}\n.genome-spy .canvas-wrapper {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n}\n.genome-spy canvas {\n display: block;\n transform: scale(1, 1);\n opacity: 1;\n transition: transform 0.6s, opacity 0.6s;\n}\n.genome-spy .loading-message {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-message .message {\n color: #666;\n opacity: 0;\n transition: opacity 0.7s;\n}\n.genome-spy .loading > canvas {\n transform: scale(0.95, 0.95);\n opacity: 0;\n}\n.genome-spy .loading > .loading-message .message {\n opacity: 1;\n}\n.genome-spy .loading > .loading-message .message .ellipsis {\n animation: blinker 1s linear infinite;\n}\n@keyframes blinker {\n 50% {\n opacity: 0;\n }\n}\n.genome-spy .loading-indicators {\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n}\n.genome-spy .loading-indicators div {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-indicators div > div {\n font-size: 11px;\n transition: opacity 0.2s;\n background: white;\n padding: 2px 5px;\n display: flex;\n border-radius: 3px;\n gap: 0.5em;\n opacity: 0;\n}\n.genome-spy .loading-indicators div > div.loading {\n opacity: 0.5;\n}\n.genome-spy .loading-indicators div > div.error {\n opacity: 0.8;\n color: firebrick;\n}\n.genome-spy .loading-indicators div > div > * {\n display: block;\n}\n.genome-spy .loading-indicators div > div img {\n width: 1.5em;\n height: 1.5em;\n}\n.genome-spy .tooltip {\n position: absolute;\n max-width: 450px;\n overflow: hidden;\n background: #f6f6f6;\n padding: 10px;\n font-size: 13px;\n box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n pointer-events: none;\n z-index: 100;\n}\n.genome-spy .tooltip > :last-child {\n margin-bottom: 0;\n}\n.genome-spy .tooltip > .title {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px dashed #b6b6b6;\n}\n.genome-spy .tooltip .summary {\n font-size: 12px;\n}\n.genome-spy .tooltip table {\n border-collapse: collapse;\n}\n.genome-spy .tooltip table:first-child {\n margin-top: 0;\n}\n.genome-spy .tooltip table th,\n.genome-spy .tooltip table td {\n padding: 2px 0.4em;\n vertical-align: top;\n}\n.genome-spy .tooltip table th:first-child,\n.genome-spy .tooltip table td:first-child {\n padding-left: 0;\n}\n.genome-spy .tooltip table th {\n text-align: left;\n font-weight: bold;\n}\n.genome-spy .tooltip .color-legend {\n display: inline-block;\n width: 0.8em;\n height: 0.8em;\n margin-left: 0.4em;\n box-shadow: 0px 0px 3px 1px white;\n}\n.genome-spy .tooltip .attributes .hovered {\n background-color: #e0e0e0;\n}\n.genome-spy .tooltip .na {\n color: #aaa;\n font-style: italic;\n font-size: 80%;\n}\n.genome-spy .gene-track-tooltip .summary {\n font-size: 90%;\n}\n.genome-spy .message-box {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n}\n.genome-spy .message-box > div {\n border: 1px solid red;\n padding: 10px;\n background: #fff0f0;\n}\n\n.gs-input-binding {\n display: grid;\n grid-template-columns: max-content max-content;\n column-gap: 1em;\n row-gap: 0.3em;\n justify-items: start;\n}\n.gs-input-binding > select,\n.gs-input-binding > input:not([type=checkbox]) {\n width: 100%;\n}\n.gs-input-binding input[type=range] + span {\n display: inline-block;\n margin-left: 0.3em;\n min-width: 2.2em;\n font-variant-numeric: tabular-nums;\n}\n.gs-input-binding input[type=range],\n.gs-input-binding input[type=radio] {\n vertical-align: text-bottom;\n}\n.gs-input-binding .radio-group {\n display: flex;\n align-items: center;\n}\n.gs-input-binding .description {\n max-width: 26em;\n grid-column: 1/-1;\n color: #777;\n font-size: 90%;\n margin-top: -0.5em;\n}\n\n.gs-input-bindings {\n flex-basis: content;\n font-size: 14px;\n padding: 10px;\n}\n";
|
|
3
3
|
//# sourceMappingURL=genome-spy.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA,4pIAiME"}
|
|
@@ -123,6 +123,12 @@ export class FlexDimensions {
|
|
|
123
123
|
* @param {import("./padding.js").default} padding
|
|
124
124
|
*/
|
|
125
125
|
subtractPadding(padding: import("./padding.js").default): FlexDimensions;
|
|
126
|
+
/**
|
|
127
|
+
* Returns true if either of the dimensions is growing
|
|
128
|
+
*
|
|
129
|
+
* @returns {boolean}
|
|
130
|
+
*/
|
|
131
|
+
isGrowing(): boolean;
|
|
126
132
|
#private;
|
|
127
133
|
}
|
|
128
134
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flexLayout.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/flexLayout.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wCALW,OAAO,EAAE,iBACT,MAAM,mDACN,WAAW,GACT,OAAO,EAAE,CAqGrB;AAED;;;;;GAKG;AACH,sCAHW,SAAS,OAAO,CAAC,gBACjB,WAAW,UAQrB;AAED;;;GAGG;AACH,sCAHW,SAAS,OAAO,CAAC,GACf,OAAO,CAWnB;AAED;;;GAGG;AACH,oCAFW,OAAO,EAAE,WAInB;AAED;;;GAGG;AACH,sCAFW,OAAO,EAAE;;;EASnB;
|
|
1
|
+
{"version":3,"file":"flexLayout.d.ts","sourceRoot":"","sources":["../../../../src/view/layout/flexLayout.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wCALW,OAAO,EAAE,iBACT,MAAM,mDACN,WAAW,GACT,OAAO,EAAE,CAqGrB;AAED;;;;;GAKG;AACH,sCAHW,SAAS,OAAO,CAAC,gBACjB,WAAW,UAQrB;AAED;;;GAGG;AACH,sCAHW,SAAS,OAAO,CAAC,GACf,OAAO,CAWnB;AAED;;;GAGG;AACH,oCAFW,OAAO,EAAE,WAInB;AAED;;;GAGG;AACH,sCAFW,OAAO,EAAE;;;EASnB;AA4ED;;;;GAIG;AACH,uCAFW,OAAO,WAIjB;AAWD;;;;GAIG;AACH,sDAEC;AAED;;;;GAIG;AACH,mCAHW,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,oBAAoB,EAAE,IAAI,GAChE,OAAO,CAiBnB;AAID;;;;;;;GAOG;AACH,0CALW,OAAO,MACP,OAAO,eACI,MAAM,GACf,OAAO,CA4BnB;AAED;;;;;;GAMG;AACH,0CAJW,OAAO,UACP,MAAM,UAAc,MAAM,CAAA,GACxB,OAAO,CAanB;AAED;;;;;;GAMG;AACH,sCAJW,OAAO,UACP,MAAM,UAAc,MAAM,CAAA,GACxB,OAAO,CAanB;AAED;;;GAGG;AACH,yCAHW,OAAO,SACP,MAAM,WAIhB;AA/MD;IACI;;;;OAIG;IACH,mBAHW,OAAO,UACP,OAAO,EAQjB;IAJG,gBAAgB;IAChB,wBAAkB;IAClB,gBAAgB;IAChB,yBAAoB;IAGxB;;;;OAIG;IACH,oBAFW,OAAO,cAAc,EAAE,OAAO,kBAIxC;IAED;;;;OAIG;IACH,yBAFW,OAAO,cAAc,EAAE,OAAO,kBAIxC;IAmBD;;;;OAIG;IACH,aAFa,OAAO,CAInB;;CACJ;AAED;;;;GAIG;AACH,2BAFU,OAAO,CAKd;AAEH,iDAGE;;;;;;;;SAlPQ,MAAM;;;;WACN,MAAM;;;;;;cAGN,MAAM;UACN,MAAM;;;;;;;;;;;;;;cAGN,MAAM;;;;;uBACN,MAAM;;;;aAEN,MAAM;;;;cACN,OAAO"}
|
|
@@ -228,6 +228,15 @@ export class FlexDimensions {
|
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Returns true if either of the dimensions is growing
|
|
234
|
+
*
|
|
235
|
+
* @returns {boolean}
|
|
236
|
+
*/
|
|
237
|
+
isGrowing() {
|
|
238
|
+
return !!(this.width.grow || this.height.grow);
|
|
239
|
+
}
|
|
231
240
|
}
|
|
232
241
|
|
|
233
242
|
/**
|
package/dist/src/view/view.js
CHANGED
|
@@ -732,7 +732,7 @@ function isDynamicOpacity(opacity) {
|
|
|
732
732
|
* @returns {function(number):number}
|
|
733
733
|
*/
|
|
734
734
|
function createViewOpacityFunction(view) {
|
|
735
|
-
const opacityDef = view.spec.opacity;
|
|
735
|
+
const opacityDef = "opacity" in view.spec ? view.spec.opacity : undefined;
|
|
736
736
|
|
|
737
737
|
if (opacityDef !== undefined) {
|
|
738
738
|
if (isNumber(opacityDef)) {
|
|
@@ -74,10 +74,6 @@ export function findDescendantsByPath(root: View, name: string): View[];
|
|
|
74
74
|
* @param {View} root
|
|
75
75
|
*/
|
|
76
76
|
export function findUniqueViewNames(root: View): Set<string>;
|
|
77
|
-
/**
|
|
78
|
-
* @param {View} viewRoot
|
|
79
|
-
*/
|
|
80
|
-
export function calculateViewRootSize(viewRoot: View): import("./layout/flexLayout.js").FlexDimensions;
|
|
81
77
|
/**
|
|
82
78
|
* @param {import("./layout/flexLayout.js").FlexDimensions} viewRootSize
|
|
83
79
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewUtils.d.ts","sourceRoot":"","sources":["../../../src/view/viewUtils.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,qCAHW,OAAO,oBAAoB,EAAE,UAAU,GAAG,OAAO,iBAAiB,EAAE,YAAY,yBAK1F;AAED;;;;GAIG;AACH,oCAHW,OAAO,oBAAoB,EAAE,aAAa,GAAG,OAAO,iBAAiB,EAAE,YAAY,wBAQ7F;AAED;;;GAGG;AACH,+BAFW,IAAI,6EAMd;AAED;;;;GAIG;AACH,wCAFW,IAAI,UASd;AAED;;GAEG;AACH,kDAFW,IAAI,QAiBd;AAED;;;;;;;GAOG;AACH,4CAFW,IAAI,QAUd;AAED;;;;GAIG;AACH,qCAJW,IAAI,iBACJ,OAAO,qBAAqB,EAAE,OAAO,CAAC,IAAI,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,EAAE,UAAU,WACpC,MAAM,eACN,OAAO,yBAAyB,EAAE,OAAO,GACvC,QAAQ,OAAO,iBAAiB,EAAE,QAAQ,CAAC,CA6BvD;AAED;;GAEG;AACH,gDAFoB,IAAI,QAAE,IAAI,EAAE,KAAE,IAAI,+BAkBrC;AAED;;;;;;GAMG;AACH,4CAJW,IAAI,QACJ,MAAM,GACJ,IAAI,EAAE,CAalB;AAED;;;GAGG;AACH,0CAFW,IAAI,eAqBd;AAOD;;GAEG;AACH,kDAFW,OAAO,wBAAwB,EAAE,cAAc;;;EAczD;AAjBM,uCAFI,MAAM,WAE0D;iBA/O9B,WAAW;qBAFnC,eAAe"}
|
|
@@ -244,13 +244,6 @@ export function findUniqueViewNames(root) {
|
|
|
244
244
|
*/
|
|
245
245
|
export const isCustomViewName = (name) => !/^(layer|concat)\d+$/.test(name);
|
|
246
246
|
|
|
247
|
-
/**
|
|
248
|
-
* @param {View} viewRoot
|
|
249
|
-
*/
|
|
250
|
-
export function calculateViewRootSize(viewRoot) {
|
|
251
|
-
return viewRoot.getSize().addPadding(viewRoot.getOverhang());
|
|
252
|
-
}
|
|
253
|
-
|
|
254
247
|
/**
|
|
255
248
|
* @param {import("./layout/flexLayout.js").FlexDimensions} viewRootSize
|
|
256
249
|
*/
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"version": "0.50.
|
|
10
|
+
"version": "0.50.1",
|
|
11
11
|
"jsdelivr": "dist/bundle/index.js",
|
|
12
12
|
"unpkg": "dist/bundle/index.js",
|
|
13
13
|
"browser": "dist/bundle/index.js",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/long": "^4.0.1"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "f21b0f12e961366c12c1d514017c6270246801cc"
|
|
71
71
|
}
|