@genome-spy/core 0.77.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{esm-CscjKVDc.js → esm-DAnOffpD.js} +1 -1
- package/dist/bundle/{esm-0dYHNV_D.js → esm-DNtC3H80.js} +1 -1
- package/dist/bundle/{esm-CRMf_I9V.js → esm-DVOHLB1e.js} +1 -1
- package/dist/bundle/esm-NIYEaYkc.js +1221 -0
- package/dist/bundle/index.es.js +2816 -2703
- package/dist/bundle/index.js +57 -54
- package/dist/schema.json +825 -112
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
- package/dist/src/genomeSpy/headlessBootstrap.js +2 -0
- package/dist/src/genomeSpy/interactionController.d.ts +4 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +57 -13
- package/dist/src/genomeSpyBase.d.ts.map +1 -1
- package/dist/src/genomeSpyBase.js +5 -1
- package/dist/src/scales/domainExpressions.d.ts +21 -0
- package/dist/src/scales/domainExpressions.d.ts.map +1 -0
- package/dist/src/scales/domainExpressions.js +43 -0
- package/dist/src/scales/domainPlanner.d.ts +12 -1
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +55 -36
- package/dist/src/scales/scaleInstanceManager.d.ts +1 -0
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +5 -0
- package/dist/src/scales/scalePropsResolver.d.ts +6 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +35 -10
- package/dist/src/scales/scaleResolution.d.ts +16 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +136 -16
- package/dist/src/scales/scaleRules.d.ts +10 -0
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +38 -1
- package/dist/src/scales/viewLevelScaleConfig.d.ts +45 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelScaleConfig.js +138 -0
- package/dist/src/spec/scale.d.ts +19 -6
- package/dist/src/spec/view.d.ts +11 -0
- package/dist/src/styles/genome-spy.css +4 -1
- 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 +4 -1
- package/dist/src/utils/ui/tooltip.d.ts +4 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +35 -10
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +11 -3
- package/package.json +2 -2
- package/dist/bundle/esm-C49STiCR.js +0 -1248
package/dist/src/spec/view.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Data } from "./data.js";
|
|
|
2
2
|
import { TransformParams } from "./transform.js";
|
|
3
3
|
import {
|
|
4
4
|
Channel,
|
|
5
|
+
ChannelWithScale,
|
|
5
6
|
Encoding,
|
|
6
7
|
FacetFieldDef,
|
|
7
8
|
PrimaryPositionalChannel,
|
|
@@ -12,6 +13,7 @@ import { Title } from "./title.js";
|
|
|
12
13
|
import { Parameter } from "./parameter.js";
|
|
13
14
|
import { GenomeSpyConfig } from "./config.js";
|
|
14
15
|
import { ViewBackgroundProps, ZIndexProps } from "./decoration.js";
|
|
16
|
+
import { Scale } from "./scale.js";
|
|
15
17
|
|
|
16
18
|
export interface SizeDef {
|
|
17
19
|
/**
|
|
@@ -211,6 +213,15 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
211
213
|
*/
|
|
212
214
|
config?: GenomeSpyConfig;
|
|
213
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Configures scale resolutions used by this view subtree.
|
|
218
|
+
*
|
|
219
|
+
* Use this when a composed view shares a scale across child views and the
|
|
220
|
+
* scale settings, such as the visible domain, belong to the composed view
|
|
221
|
+
* rather than an individual encoding.
|
|
222
|
+
*/
|
|
223
|
+
scales?: Partial<Record<ChannelWithScale, Scale>>;
|
|
224
|
+
|
|
214
225
|
/**
|
|
215
226
|
* Specifies a [data source](https://genomespy.app/docs/grammar/data/).
|
|
216
227
|
* If omitted, the data source is inherited from the parent view.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default css;
|
|
2
|
-
declare const css: "\n@scope {\n:scope {\n--genome-spy-basic-spacing: 10px;\n--genome-spy-font-family:\nsystem-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif,\n\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n\nfont-family: var(--genome-spy-font-family);\n\nposition: relative;\n\ndisplay: flex;\nflex-direction: column;\n}\n\n.canvas-wrapper {\nposition: relative;\nflex-grow: 1;\noverflow: hidden;\n}\n\ncanvas {\ndisplay: block;\ntouch-action: none;\ntransform: scale(1, 1);\nopacity: 1;\ntransition:\ntransform 0.6s,\nopacity 0.6s;\n\n&:focus,\n&:focus-visible {\noutline: none;\n}\n}\n\n.loading {\n> canvas {\ntransform: scale(0.95, 0.95);\nopacity: 0;\n}\n}\n\n.loading-indicators {\nposition: absolute;\ninset: 0;\n\nuser-select: none;\npointer-events: none;\n\ndiv {\nposition: absolute;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\n\n> div {\nfont-size: 11px;\ntransition: opacity 0.2s;\nbackground: white;\npadding: 2px 5px;\ndisplay: flex;\nborder-radius: 3px;\ngap: 0.5em;\nopacity: 0;\n\n&.loading {\nopacity: 0.5;\n}\n\n&.error {\nopacity: 0.8;\ncolor: firebrick;\n}\n\n> * {\ndisplay: block;\n}\n\nimg {\nwidth: 1.5em;\nheight: 1.5em;\n}\n}\n}\n}\n\n.tooltip {\nposition:
|
|
2
|
+
declare const css: "\n@scope {\n:scope {\n--genome-spy-basic-spacing: 10px;\n--genome-spy-font-family:\nsystem-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif,\n\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n\nfont-family: var(--genome-spy-font-family);\n\nposition: relative;\n\ndisplay: flex;\nflex-direction: column;\n}\n\n.canvas-wrapper {\nposition: relative;\nflex-grow: 1;\noverflow: hidden;\n}\n\ncanvas {\ndisplay: block;\ntouch-action: none;\ntransform: scale(1, 1);\nopacity: 1;\ntransition:\ntransform 0.6s,\nopacity 0.6s;\n\n&:focus,\n&:focus-visible {\noutline: none;\n}\n}\n\n.loading {\n> canvas {\ntransform: scale(0.95, 0.95);\nopacity: 0;\n}\n}\n\n.loading-indicators {\nposition: absolute;\ninset: 0;\n\nuser-select: none;\npointer-events: none;\n\ndiv {\nposition: absolute;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\n\n> div {\nfont-size: 11px;\ntransition: opacity 0.2s;\nbackground: white;\npadding: 2px 5px;\ndisplay: flex;\nborder-radius: 3px;\ngap: 0.5em;\nopacity: 0;\n\n&.loading {\nopacity: 0.5;\n}\n\n&.error {\nopacity: 0.8;\ncolor: firebrick;\n}\n\n> * {\ndisplay: block;\n}\n\nimg {\nwidth: 1.5em;\nheight: 1.5em;\n}\n}\n}\n}\n\n.tooltip {\nposition: fixed;\ninset: auto;\nmargin: 0;\nborder: 0;\n\nmax-width: 450px;\noverflow: hidden;\n\n--background-color: #f6f6f6;\nbackground: var(--background-color);\npadding: var(--genome-spy-basic-spacing);\n\n--font-size: 12px;\nfont-size: var(--font-size);\n\nbox-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n\n&:not(.sticky) {\npointer-events: none;\n}\n\ntransition:\noutline-color 0.3s ease-in-out,\nbox-shadow 0.3s ease-in-out;\n\noutline: 0px solid transparent;\n&.sticky {\noutline: 2px solid black;\nbox-shadow: 0px 3px 18px 0px rgba(0, 0, 0, 0.3);\n}\n\nz-index: 100;\n\n> :last-child {\nmargin-bottom: 0;\n}\n\n> .title {\npadding-bottom: calc(var(--genome-spy-basic-spacing) / 2);\nmargin-bottom: calc(var(--genome-spy-basic-spacing) / 2);\nborder-bottom: 1px dashed var(--background-color);\nborder-bottom: 1px dashed\ncolor-mix(in srgb, black 25%, var(--background-color));\n}\n\n.summary {\nfont-size: 12px;\n}\n\ntable {\n&:first-child {\nmargin-top: 0;\n}\n\nborder-collapse: collapse;\n\nth,\ntd {\npadding: 2px 0.4em;\nvertical-align: top;\nfont-size: var(--font-size);\n\n&:first-child {\npadding-left: 0;\n}\n}\n\nth {\ntext-align: left;\nfont-weight: bold;\n}\n}\n\n.color-legend {\ndisplay: inline-block;\nwidth: 0.8em;\nheight: 0.8em;\nmargin-left: 0.4em;\nbox-shadow: 0px 0px 3px 1px white;\n}\n\n.color-legend-unmapped {\nbackground-color: transparent;\nborder: 1px solid black;\nbox-sizing: border-box;\nbox-shadow: none;\n}\n\n.attributes {\n.hovered {\nbackground-color: #e0e0e0;\n}\n}\n\n.autoscroll-container {\nmax-height: min(40em, 50vh);\noverflow-x: hidden;\noverflow-y: auto;\npadding-right: var(--genome-spy-basic-spacing);\nmargin-right: calc(-1 * var(--genome-spy-basic-spacing));\n}\n\n.na {\ncolor: #aaa;\nfont-style: italic;\nfont-size: 80%;\n}\n}\n\n.gene-track-tooltip {\n.summary {\nfont-size: 90%;\n}\n}\n\n.gs-input-binding {\ndisplay: grid;\ngrid-template-columns: max-content max-content;\ncolumn-gap: 1em;\nrow-gap: 0.3em;\njustify-items: start;\n\n> select,\n> input:not([type=\"checkbox\"]) {\nwidth: 100%;\n}\n\ninput[type=\"range\"] + span {\ndisplay: inline-block;\nmargin-left: 0.3em;\nmin-width: 2.2em;\nfont-variant-numeric: tabular-nums;\n}\n\ninput[type=\"range\"],\ninput[type=\"radio\"] {\nvertical-align: text-bottom;\n}\n\n.radio-group {\ndisplay: flex;\nalign-items: center;\n}\n\n.description {\nmax-width: 26em;\ngrid-column: 1 / -1;\ncolor: #777;\nfont-size: 90%;\nmargin-top: -0.5em;\n}\n}\n\n.gs-input-bindings {\nflex-basis: content;\nfont-size: 14px;\npadding: var(--genome-spy-basic-spacing);\n}\n\n.message-box {\ndisplay: flex;\nalign-items: center;\njustify-content: center;\nposition: absolute;\ntop: 0;\nheight: 100%;\nwidth: 100%;\n\n> div {\nborder: 1px solid red;\npadding: 10px;\nbackground: #fff0f0;\n}\n}\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,o7HAwQE"}
|
|
@@ -16,6 +16,10 @@ export default class Tooltip {
|
|
|
16
16
|
set visible(visible: boolean);
|
|
17
17
|
get visible(): boolean;
|
|
18
18
|
get enabled(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @param {Event} event
|
|
21
|
+
*/
|
|
22
|
+
containsEvent(event: Event): boolean;
|
|
19
23
|
/**
|
|
20
24
|
* @param {boolean} enabled True if tooltip is enabled (allowed to be shown)
|
|
21
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/utils/ui/tooltip.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/utils/ui/tooltip.js"],"names":[],"mappings":"AAGA,0CAA2C,qBAAqB,CAAC;AACjE,4CAA6C,uBAAuB,CAAC;AAErE;IAqBI;;OAEG;IACH,uBAFW,WAAW,EASrB;IAED;;OAEG;IACH,mBAFW,OAAO,EAQjB;IAED,cAVW,OAAO,CAYjB;IAED;;OAEG;IACH,qBAFW,OAAO,EAQjB;IAED,eAVW,OAAO,CAYjB;IAED,uBAEC;IAED;;OAEG;IACH,qBAFW,KAAK,WAIf;IAED;;OAEG;IACH,0BAFW,OAAO,QAOjB;IAED,wBAEC;IAED;;OAEG;IACH,4BAFW,UAAU,QAyCpB;IAlCG,8BAGE;IAiCN,wBAiBC;IAED;;OAEG;IACH,oBAFW,MAAM,GAAG,OAAO,KAAK,EAAE,cAAc,GAAG,WAAW,QAwB7D;IAED,cAGC;IAED;;;;;;;OAOG;IACH,gBAFa,CAAC,SAFH,CAAC,cACD,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,CAAC,MAAM,GAAG,WAAW,GAAG,OAAO,KAAK,EAAE,cAAc,CAAC,QAyBlF;IAED,sBAEC;;CAkBJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import clientPoint from "../point.js";
|
|
2
1
|
import { html, render } from "lit";
|
|
3
2
|
import { peek } from "../arrayUtils.js";
|
|
4
3
|
|
|
@@ -22,8 +21,7 @@ export default class Tooltip {
|
|
|
22
21
|
/** @type {HTMLDivElement} */
|
|
23
22
|
#element;
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
#container;
|
|
24
|
+
#popoverOpen = false;
|
|
27
25
|
|
|
28
26
|
#enabledStack = [true];
|
|
29
27
|
|
|
@@ -31,11 +29,10 @@ export default class Tooltip {
|
|
|
31
29
|
* @param {HTMLElement} container
|
|
32
30
|
*/
|
|
33
31
|
constructor(container) {
|
|
34
|
-
this.#container = container;
|
|
35
|
-
|
|
36
32
|
this.#element = document.createElement("div");
|
|
37
33
|
this.#element.className = "tooltip";
|
|
38
|
-
this.#
|
|
34
|
+
this.#element.setAttribute("popover", "manual");
|
|
35
|
+
container.appendChild(this.#element);
|
|
39
36
|
|
|
40
37
|
this.clear();
|
|
41
38
|
}
|
|
@@ -61,6 +58,7 @@ export default class Tooltip {
|
|
|
61
58
|
set visible(visible) {
|
|
62
59
|
if (visible != this.#visible) {
|
|
63
60
|
this.#element.style.display = visible ? null : "none";
|
|
61
|
+
this.#setPopoverOpen(visible);
|
|
64
62
|
this.#visible = visible;
|
|
65
63
|
}
|
|
66
64
|
}
|
|
@@ -73,6 +71,13 @@ export default class Tooltip {
|
|
|
73
71
|
return peek(this.#enabledStack) ?? true;
|
|
74
72
|
}
|
|
75
73
|
|
|
74
|
+
/**
|
|
75
|
+
* @param {Event} event
|
|
76
|
+
*/
|
|
77
|
+
containsEvent(event) {
|
|
78
|
+
return event.composedPath().includes(this.#element);
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
/**
|
|
77
82
|
* @param {boolean} enabled True if tooltip is enabled (allowed to be shown)
|
|
78
83
|
*/
|
|
@@ -95,7 +100,10 @@ export default class Tooltip {
|
|
|
95
100
|
return;
|
|
96
101
|
}
|
|
97
102
|
|
|
98
|
-
this.mouseCoords =
|
|
103
|
+
this.mouseCoords = /** @type {[number, number]} */ ([
|
|
104
|
+
mouseEvent.clientX,
|
|
105
|
+
mouseEvent.clientY,
|
|
106
|
+
]);
|
|
99
107
|
|
|
100
108
|
const now = performance.now();
|
|
101
109
|
|
|
@@ -130,12 +138,12 @@ export default class Tooltip {
|
|
|
130
138
|
|
|
131
139
|
updatePlacement() {
|
|
132
140
|
/** Space between pointer and tooltip box */
|
|
133
|
-
const spacing =
|
|
141
|
+
const spacing = 10;
|
|
134
142
|
|
|
135
143
|
const [mouseX, mouseY] = this.mouseCoords;
|
|
136
144
|
|
|
137
145
|
let x = mouseX + spacing;
|
|
138
|
-
if (x >
|
|
146
|
+
if (x > window.innerWidth - spacing - this.#element.offsetWidth) {
|
|
139
147
|
x = mouseX - spacing - this.#element.offsetWidth;
|
|
140
148
|
}
|
|
141
149
|
this.#element.style.left = x + "px";
|
|
@@ -143,7 +151,7 @@ export default class Tooltip {
|
|
|
143
151
|
this.#element.style.top =
|
|
144
152
|
Math.min(
|
|
145
153
|
mouseY + spacing,
|
|
146
|
-
|
|
154
|
+
window.innerHeight - spacing - this.#element.offsetHeight
|
|
147
155
|
) + "px";
|
|
148
156
|
}
|
|
149
157
|
|
|
@@ -214,6 +222,23 @@ export default class Tooltip {
|
|
|
214
222
|
_isPenalty() {
|
|
215
223
|
return this.#penaltyUntil && this.#penaltyUntil > performance.now();
|
|
216
224
|
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {boolean} open
|
|
228
|
+
*/
|
|
229
|
+
#setPopoverOpen(open) {
|
|
230
|
+
if (open == this.#popoverOpen) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (open && this.#element.showPopover) {
|
|
235
|
+
this.#element.showPopover();
|
|
236
|
+
} else if (!open && this.#element.hidePopover) {
|
|
237
|
+
this.#element.hidePopover();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
this.#popoverOpen = open;
|
|
241
|
+
}
|
|
217
242
|
}
|
|
218
243
|
|
|
219
244
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerMutationHelper.d.ts","sourceRoot":"","sources":["../../../src/view/containerMutationHelper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"containerMutationHelper.d.ts","sourceRoot":"","sources":["../../../src/view/containerMutationHelper.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IACI;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;OAWG;IAEH;;;OAGG;IACH,uBAHW,OAAO,oBAAoB,EAAE,OAAO;uBAZ3B;mBARR,CAAC,yEAAqB,CAAC,EAAE;sBACtB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yEAAqB,KAAK,IAAI;sBACpD,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;SAMF;oBACnB,CAAC,IAAI,iEAAM,EAAE,KAAK,EAAE,MAAM,KAAK,GAAG;oBAClC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;sBACrB,CAAC,IAAI,iEAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC;sBAClE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;sBAChC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yEAAqB,KAAK,MAAM;4BAChD,OAAO,yBAAyB,EAAE,iBAAiB;wBACvD,OAAO;OAW3B;IAFG,yFAA0B;IAC1B;uBAjBgB;mBARR,CAAC,yEAAqB,CAAC,EAAE;sBACtB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yEAAqB,KAAK,IAAI;sBACpD,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;SAMF;oBACnB,CAAC,IAAI,iEAAM,EAAE,KAAK,EAAE,MAAM,KAAK,GAAG;oBAClC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;sBACrB,CAAC,IAAI,iEAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC;sBAClE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;sBAChC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yEAAqB,KAAK,MAAM;4BAChD,OAAO,yBAAyB,EAAE,iBAAiB;wBACvD,OAAO;MAUF;IAG1B;;;;;;OAMG;IACH,wBAJW,OAAO,iBAAiB,EAAE,QAAQ,GAAG,OAAO,iBAAiB,EAAE,UAAU,UACzE,MAAM,GACJ,OAAO,iEAAM,CAyDzB;IAED;;;;OAIG;IACH,qBAFW,MAAM,iBAiBhB;CACJ"}
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
} from "../data/flowInit.js";
|
|
5
5
|
import { configureViewOpacity } from "../genomeSpy/viewHierarchyConfig.js";
|
|
6
6
|
import { ensureAssembliesForView } from "../genome/assemblyPreflight.js";
|
|
7
|
+
import {
|
|
8
|
+
attachViewLevelScaleConfigs,
|
|
9
|
+
clearViewLevelScaleConfigs,
|
|
10
|
+
} from "../scales/viewLevelScaleConfig.js";
|
|
7
11
|
import { finalizeSubtreeGraphics } from "./viewUtils.js";
|
|
8
12
|
|
|
9
13
|
/**
|
|
@@ -68,6 +72,11 @@ export default class ContainerMutationHelper {
|
|
|
68
72
|
this.options.createViewOptions
|
|
69
73
|
);
|
|
70
74
|
|
|
75
|
+
insertAt(insertIndex, childSpec);
|
|
76
|
+
const insertionResult = this.options.insertView(childView, insertIndex);
|
|
77
|
+
|
|
78
|
+
attachViewLevelScaleConfigs(this.container);
|
|
79
|
+
|
|
71
80
|
// Reminder: ensure assemblies from the real child hierarchy before any
|
|
72
81
|
// downstream work that may initialize scales (axis prep / encoders).
|
|
73
82
|
await ensureAssembliesForView(
|
|
@@ -75,9 +84,6 @@ export default class ContainerMutationHelper {
|
|
|
75
84
|
this.container.context.genomeStore
|
|
76
85
|
);
|
|
77
86
|
|
|
78
|
-
insertAt(insertIndex, childSpec);
|
|
79
|
-
const insertionResult = this.options.insertView(childView, insertIndex);
|
|
80
|
-
|
|
81
87
|
if (this.options.prepareView) {
|
|
82
88
|
await this.options.prepareView(
|
|
83
89
|
childView,
|
|
@@ -114,12 +120,14 @@ export default class ContainerMutationHelper {
|
|
|
114
120
|
*/
|
|
115
121
|
async removeChildAt(index) {
|
|
116
122
|
const { removeAt } = this.options.getChildSpecs();
|
|
123
|
+
clearViewLevelScaleConfigs(this.container);
|
|
117
124
|
this.options.removeView(index);
|
|
118
125
|
removeAt(index);
|
|
119
126
|
|
|
120
127
|
if (this.options.afterRemove) {
|
|
121
128
|
await this.options.afterRemove(index);
|
|
122
129
|
}
|
|
130
|
+
attachViewLevelScaleConfigs(this.container);
|
|
123
131
|
|
|
124
132
|
if (this.options.requestLayout !== false) {
|
|
125
133
|
this.container.invalidateSizeCache();
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.78.0",
|
|
11
11
|
"jsdelivr": "dist/bundle/index.js",
|
|
12
12
|
"unpkg": "dist/bundle/index.js",
|
|
13
13
|
"browser": "dist/bundle/index.js",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/long": "^4.0.1"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "54041db3a590ae8df78fa43aa755b9e07fe3503c"
|
|
82
82
|
}
|