@genome-spy/app 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-8hMSlqAQ.js → agentApi-BclFF9zB.js} +7130 -7509
- package/dist/agentApi.es.js +4344 -4015
- package/dist/agentShared.es.js +431 -458
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-Bd8H8MMo.js → canvas2d-8MSf70d4.js} +78 -86
- package/dist/{canvas2d-D6VYooRf.js → canvas2d-BwGNI_Rx.js} +83 -91
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{containerView-aEVmYmkA.js → containerView-BItRtKqu.js} +5 -1
- package/dist/{containerView-CRJSc4bM.js → containerView-CWa6ZIJW.js} +5 -1
- package/dist/{debug-CQ0agCrd.js → debug-23s-jja_.js} +3 -2
- package/dist/{debug-DkIMiGdW.js → debug-CWRxvAss.js} +2 -3
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4756 -5528
- package/dist/index.js +707 -547
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/{markUtils-CvLDz744.js → markUtils-RaatLEa-.js} +9 -6
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/{order-BVvkjDRT.js → order-BnKzKjt4.js} +383 -347
- package/dist/{order-DmMoZsi1.js → order-BpJnq_nV.js} +375 -339
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-jeRVq6kY.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DxvowWjH.js → rasterExport-C_vx4Jwd.js} +3 -3
- package/dist/{rasterization-DFj3Cvx4.js → rasterization-QktH8Sn2.js} +1 -1
- package/dist/{rectangle-Dl4Dy0hS.js → rectangle-BAdoDPXu.js} +34 -31
- package/dist/{renderCanvas2D-Bfm1NHFu.js → renderCanvas2D-CsRO78Pq.js} +88 -87
- package/dist/{renderCanvas2D-DVjhp834.js → renderCanvas2D-Y7pkRzbC.js} +93 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DOYMJ-Md.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-DDC0YRGn.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-0aeqp_kz.js → scalePosition-CRXa0rCC.js} +1 -1
- package/dist/schema.json +3801 -816
- package/dist/{svg-Bm2zxBPu.js → svg-BBMtLgtM.js} +369 -285
- package/dist/{svg-CkfuhONt.js → svg-JjWL6U-T.js} +371 -287
- package/dist/{svgRasterizer-DoRQEqFA.js → svgRasterizer-6OcftuoI.js} +2 -2
- package/dist/{svgRasterizer-raDDhBF-.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/{viewError-BkJeVYXA.js → viewError-B0TMfOpB.js} +1 -1
- package/dist/{viewError-IYqyluc7.js → viewError-D9aO90cI.js} +1 -1
- package/dist/{viewSelectors-7LyasQN-.js → viewSelectors-DkFvo33d.js} +832 -734
- package/dist/{viewSelectors-CbmkSQRT.js → viewSelectors-lM93fHAq.js} +900 -802
- package/dist/{viewUtils-DuddMNNw.js → viewUtils-0SJOewM6.js} +1861 -2459
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-DElJ8dTZ.js +0 -3097
- package/dist/clipOptions-D_wBNhzs.js +0 -3087
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/vega-scale-BoGHANI7.js +0 -2446
- package/dist/vega-scale-o9TRyzYH.js +0 -2443
- package/dist/webgl-CQfvgnxo.js +0 -5633
- package/dist/webgl-DVYkXtiZ.js +0 -5632
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ln as e, mt as t, o as n, ot as r, s as i } from "./clipOptions-clBEbkjv.js";
|
|
2
|
+
import { s as a } from "./flowNode-BSjy0Wz3.js";
|
|
3
3
|
import { t as o } from "./warning-CpIIpk8e.js";
|
|
4
|
-
import {
|
|
4
|
+
import { t as s, u as c } from "./rectangle-BAdoDPXu.js";
|
|
5
5
|
import { n as l, r as u, t as d } from "./performanceProfiler-CPLEjApa.js";
|
|
6
|
-
import { n as f,
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { exportCanvas as
|
|
11
|
-
import { createCanvas2DSvgRasterizer as
|
|
6
|
+
import { n as f, r as p } from "./color-uTRRsy8i.js";
|
|
7
|
+
import { C as m, D as h, E as g, F as _, L as v, N as y, P as b, R as x, S, _ as C, c as w, d as T, f as E, g as D, i as O, j as k, l as ee, m as te, n as ne, p as re, u as ie, v as ae, w as A, x as j, y as M } from "./order-BpJnq_nV.js";
|
|
8
|
+
import { n as N, t as P } from "./renderCanvas2D-CsRO78Pq.js";
|
|
9
|
+
import { t as F } from "./canvasSizeHelper-foL2YvGL.js";
|
|
10
|
+
import { exportCanvas as I, exportRaster as L } from "./rasterExport-B-WrX1pa.js";
|
|
11
|
+
import { createCanvas2DSvgRasterizer as R } from "./svgRasterizer-DkNRaCPs.js";
|
|
12
12
|
//#region ../core/src/rendering/canvas2d/picking/softwarePickingRasterizer.js
|
|
13
|
-
var
|
|
13
|
+
var z = 12, B = .5, V = class {
|
|
14
14
|
#e = [];
|
|
15
15
|
#t = [];
|
|
16
16
|
#n = [
|
|
@@ -50,7 +50,7 @@ var B = 12, V = .5, H = class {
|
|
|
50
50
|
}
|
|
51
51
|
setClip(e, t, n, r) {
|
|
52
52
|
if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r)) throw RangeError("Software picking clip must be finite.");
|
|
53
|
-
this.#r =
|
|
53
|
+
this.#r = W(Math.floor(Math.min(e, n)), 0, this.buffer.width), this.#i = W(Math.floor(Math.min(t, r)), 0, this.buffer.height), this.#a = W(Math.ceil(Math.max(e, n)), this.#r, this.buffer.width), this.#o = W(Math.ceil(Math.max(t, r)), this.#i, this.buffer.height);
|
|
54
54
|
}
|
|
55
55
|
fillRect(e, t, n, r, i) {
|
|
56
56
|
this.#s++, this.#p(e, t, n, r, i);
|
|
@@ -95,24 +95,21 @@ var B = 12, V = .5, H = class {
|
|
|
95
95
|
if (!(a > 0) || !Number.isFinite(a)) return;
|
|
96
96
|
this.#u++;
|
|
97
97
|
let s = a / 2, c = this.#n;
|
|
98
|
-
if (!
|
|
98
|
+
if (!E(t, n, r, i, this.#r - s, this.#i - s, this.#a + s, this.#o + s, c)) return;
|
|
99
99
|
let l = c[2] - c[0], u = c[3] - c[1], d = Math.ceil(Math.max(Math.abs(l), Math.abs(u)));
|
|
100
|
-
if (d == 0)
|
|
101
|
-
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
for (let t = 0; t <= d; t++) {
|
|
100
|
+
if (d == 0) this.#h(e, c[0], c[1], s, o);
|
|
101
|
+
else for (let t = 0; t <= d; t++) {
|
|
105
102
|
let n = t / d;
|
|
106
103
|
this.#h(e, c[0] + l * n, c[1] + u * n, s, o);
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
|
-
strokeCubic(e, t, n, r, i, a, o, s, c, l, u =
|
|
106
|
+
strokeCubic(e, t, n, r, i, a, o, s, c, l, u = B, d) {
|
|
110
107
|
if (!(l > 0) || !Number.isFinite(l) || !(u > 0) || !Number.isFinite(u) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(s) || !Number.isFinite(c)) return;
|
|
111
108
|
this.#d++;
|
|
112
109
|
let f = this.#e;
|
|
113
110
|
for (f.length = 0, f.push(t, n, r, i, a, o, s, c, 0); f.length;) {
|
|
114
111
|
let t = f.pop(), n = f.pop(), r = f.pop(), i = f.pop(), a = f.pop(), o = f.pop(), s = f.pop(), c = f.pop(), p = f.pop();
|
|
115
|
-
if (t >=
|
|
112
|
+
if (t >= z || H(p, c, s, o, a, i, r, n, u)) {
|
|
116
113
|
this.strokeSegment(e, p, c, r, n, l, d);
|
|
117
114
|
continue;
|
|
118
115
|
}
|
|
@@ -138,38 +135,38 @@ var B = 12, V = .5, H = class {
|
|
|
138
135
|
}
|
|
139
136
|
}
|
|
140
137
|
};
|
|
141
|
-
function
|
|
138
|
+
function H(e, t, n, r, i, a, o, s, c) {
|
|
142
139
|
let l = o - e, u = s - t, d = l * l + u * u, f = c * c;
|
|
143
140
|
if (d == 0) {
|
|
144
|
-
let o =
|
|
141
|
+
let o = U(e, t, n, r), s = U(e, t, i, a);
|
|
145
142
|
return Math.max(o, s) <= f;
|
|
146
143
|
}
|
|
147
144
|
let p = u * (n - e) - l * (r - t), m = u * (i - e) - l * (a - t);
|
|
148
145
|
return Math.max(p * p, m * m) <= f * d;
|
|
149
146
|
}
|
|
150
|
-
function
|
|
147
|
+
function U(e, t, n, r) {
|
|
151
148
|
let i = n - e, a = r - t;
|
|
152
149
|
return i * i + a * a;
|
|
153
150
|
}
|
|
154
|
-
function
|
|
151
|
+
function W(e, t, n) {
|
|
155
152
|
return Math.max(t, Math.min(n, e));
|
|
156
153
|
}
|
|
157
154
|
//#endregion
|
|
158
155
|
//#region ../core/src/rendering/canvas2d/picking/renderers/index.js
|
|
159
|
-
var
|
|
160
|
-
function
|
|
156
|
+
var G = 1;
|
|
157
|
+
function K(e, t) {
|
|
161
158
|
let n = e.getType();
|
|
162
|
-
return n == "arrow" ?
|
|
159
|
+
return n == "arrow" ? J(e, t) : n == "rect" ? oe(e, t) : n == "point" ? se(e, t) : n == "rule" || n == "tick" ? ce(e, t) : n == "link" ? le(e, t) : n == "text" ? ue(e, t) : 0;
|
|
163
160
|
}
|
|
164
|
-
function
|
|
161
|
+
function q(e) {
|
|
165
162
|
let t = e.getType();
|
|
166
163
|
return t == "rect" || t == "arrow" || t == "point" || t == "rule" || t == "tick" || t == "link" || t == "text";
|
|
167
164
|
}
|
|
168
|
-
function
|
|
169
|
-
let n = e, r =
|
|
170
|
-
return
|
|
165
|
+
function J(e, t) {
|
|
166
|
+
let n = e, r = m(n), i = Array(8).fill(0);
|
|
167
|
+
return g(n, r, t, (e) => {
|
|
171
168
|
let a = Y(n, e.datum), o = e.strokeWidth / 2;
|
|
172
|
-
r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth),
|
|
169
|
+
r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth), A(e, (n, r, s, c) => {
|
|
173
170
|
let l = e.headHalfWidth + o, u = n + s.x * o, d = r + s.y * o, f = e.headRepeatFootprint + o, p = n - s.x * f, m = r - s.y * f;
|
|
174
171
|
de(i, u, d, p, m, c.x, c.y, l), t.rasterizer.fillConvexPolygon(a, i);
|
|
175
172
|
});
|
|
@@ -177,19 +174,22 @@ function ae(e, t) {
|
|
|
177
174
|
}
|
|
178
175
|
function oe(e, t) {
|
|
179
176
|
let n = e;
|
|
180
|
-
return
|
|
177
|
+
return te(n, re(n), t, (e) => t.rasterizer.fillRect(Y(n, e.datum), e.x, e.y, e.width, e.height));
|
|
181
178
|
}
|
|
182
179
|
function se(e, t) {
|
|
183
|
-
let n = e, r =
|
|
184
|
-
return
|
|
180
|
+
let n = e, r = k(n, n.properties.minPickingSize);
|
|
181
|
+
return C(n, D(n), t, (e) => t.rasterizer.fillSquare(Y(n, e.datum), e.x, e.y, Math.max(e.boundsRadius, r / 2)));
|
|
185
182
|
}
|
|
186
183
|
function ce(e, t) {
|
|
187
|
-
let n = e;
|
|
188
|
-
return
|
|
184
|
+
let n = e, r = ie(n);
|
|
185
|
+
return T(n, r, t, (e) => {
|
|
186
|
+
let i = e.x2 - e.x1, a = e.y2 - e.y1, o = r.strokeCap === "square" && e.strokeWidth > 0 ? (e.size / 2 + e.strokeWidth) / Math.hypot(i, a) : 0;
|
|
187
|
+
t.rasterizer.strokeSegment(Y(n, e.datum), e.x1 - i * o, e.y1 - a * o, e.x2 + i * o, e.y2 + a * o, Math.max(e.size + 2 * e.strokeWidth, G));
|
|
188
|
+
});
|
|
189
189
|
}
|
|
190
190
|
function le(e, t) {
|
|
191
|
-
let n = e, r =
|
|
192
|
-
return
|
|
191
|
+
let n = e, r = k(n, n.properties.minPickingSize), i = ae(n), a = S(n, i.shape);
|
|
192
|
+
return M(n, i, {
|
|
193
193
|
...t,
|
|
194
194
|
minPickingSize: r
|
|
195
195
|
}, (e) => {
|
|
@@ -206,13 +206,13 @@ function le(e, t) {
|
|
|
206
206
|
}
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
-
let [o, s, c, l] = i.points, u = a &&
|
|
209
|
+
let [o, s, c, l] = i.points, u = a && j(o, l, a);
|
|
210
210
|
t.rasterizer.strokeCubic(Y(n, e.datum), o[0], o[1], s[0], s[1], c[0], c[1], l[0], l[1], Math.max(e.strokeWidth, r), void 0, u ? (e, t) => Math.abs(u.normalX * e + u.normalY * t - u.offset) < u.end : void 0);
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
function ue(e, t) {
|
|
214
|
-
let n = e, r = t.textMetrics ?? n.unitView.context.textMetrics, i = r.requestFont(n.properties), a =
|
|
215
|
-
return
|
|
214
|
+
let n = e, r = t.textMetrics ?? n.unitView.context.textMetrics, i = r.requestFont(n.properties), a = O(r, n.properties);
|
|
215
|
+
return ee(n, w(n), {
|
|
216
216
|
...t,
|
|
217
217
|
fontMeasurement: i,
|
|
218
218
|
measureLogoInkBounds: a
|
|
@@ -224,11 +224,11 @@ function de(e, t, n, r, i, a, o, s) {
|
|
|
224
224
|
}
|
|
225
225
|
function Y(e, t) {
|
|
226
226
|
let n = e.encoders;
|
|
227
|
-
return
|
|
227
|
+
return h(n.uniqueId, t);
|
|
228
228
|
}
|
|
229
229
|
//#endregion
|
|
230
230
|
//#region ../core/src/rendering/canvas2d/picking/softwarePickingViewRenderingContext.js
|
|
231
|
-
var fe = class extends
|
|
231
|
+
var fe = class extends p {
|
|
232
232
|
#e = [];
|
|
233
233
|
#t = /* @__PURE__ */ new Set();
|
|
234
234
|
#n;
|
|
@@ -251,23 +251,23 @@ var fe = class extends f {
|
|
|
251
251
|
if (this.#e.pop()?.view !== e) throw Error("Unbalanced software picking view rendering context stack.");
|
|
252
252
|
}
|
|
253
253
|
renderMark(e, t) {
|
|
254
|
-
if (!e.isPickingParticipant() || !
|
|
255
|
-
let
|
|
256
|
-
if (
|
|
254
|
+
if (!e.isPickingParticipant() || !q(e)) return;
|
|
255
|
+
let r = t.sampleFacetRenderingOptions;
|
|
256
|
+
if (r && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !N(r))) {
|
|
257
257
|
this.#n?.addCount("canvasCulledSampleFacetOccurrences");
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
260
|
let a = e.unitView.getEffectiveOpacity();
|
|
261
261
|
if (a <= 0) return;
|
|
262
|
-
let s = this.currentCoords, c =
|
|
263
|
-
if (!
|
|
264
|
-
let d =
|
|
265
|
-
|
|
262
|
+
let s = this.currentCoords, c = n(t), l = i(c, e.properties.clip, s), u = b(this.width, this.height, l);
|
|
263
|
+
if (!_(u)) return;
|
|
264
|
+
let d = y(s, c, e.properties.cullByVisibleRange), f = this.#i?.prepare(e) ?? !1;
|
|
265
|
+
x(e, t, s, this.#r, (t, n) => {
|
|
266
266
|
if (n.length == 0) return;
|
|
267
267
|
let r = 0, i = n.length;
|
|
268
268
|
if (f && this.#i.query(n, this.#a) && (r = this.#a[0], i = this.#a[1], r === i)) return;
|
|
269
269
|
let o = this.getRasterizer();
|
|
270
|
-
o.setClip(u.x1, u.y1, u.x2, u.y2),
|
|
270
|
+
o.setClip(u.x1, u.y1, u.x2, u.y2), K(e, {
|
|
271
271
|
rasterizer: o,
|
|
272
272
|
coords: t,
|
|
273
273
|
data: n,
|
|
@@ -281,59 +281,51 @@ var fe = class extends f {
|
|
|
281
281
|
}, (t) => o(`Canvas2D picking could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
|
|
282
282
|
}
|
|
283
283
|
get currentCoords() {
|
|
284
|
-
let e =
|
|
284
|
+
let e = a(this.#e);
|
|
285
285
|
if (!e) throw Error("No current view in software picking rendering context.");
|
|
286
286
|
return e.coords;
|
|
287
287
|
}
|
|
288
288
|
}, X = 2 ** 31 - 1, pe = -(2 ** 31);
|
|
289
|
-
function me(e,
|
|
289
|
+
function me(e, t, n, i = n) {
|
|
290
290
|
let a = Array(e);
|
|
291
291
|
a.fill(X);
|
|
292
292
|
let o = pe, s = -Infinity, c = !1, l = Array(e);
|
|
293
293
|
l.fill(0);
|
|
294
|
-
let u =
|
|
295
|
-
let i = (
|
|
296
|
-
return
|
|
294
|
+
let u = t[0], d = (t[1] - t[0]) / e, f = (t, n) => {
|
|
295
|
+
let i = (t - u) / d, a = Math.floor(i);
|
|
296
|
+
return r(n && a == i ? a - 1 : a, 0, e - 1);
|
|
297
297
|
};
|
|
298
|
-
function p(e, t,
|
|
298
|
+
function p(e, t, r) {
|
|
299
299
|
if (c) return;
|
|
300
300
|
if (t > o) o = t;
|
|
301
301
|
else {
|
|
302
302
|
c = !0;
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
let i =
|
|
305
|
+
let i = n(e);
|
|
306
306
|
if (!Number.isFinite(i) || i < s) {
|
|
307
307
|
c = !0;
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
s = i;
|
|
311
311
|
let u = f(i, !1);
|
|
312
|
-
a[u] > t && (a[u] = t), l[u] <
|
|
312
|
+
a[u] > t && (a[u] = t), l[u] < r && (l[u] = r);
|
|
313
313
|
}
|
|
314
|
-
function m(e, t,
|
|
314
|
+
function m(e, t, r) {
|
|
315
315
|
if (c) return;
|
|
316
316
|
if (t > o) o = t;
|
|
317
317
|
else {
|
|
318
318
|
c = !0, console.debug("Items (vertices) are not ordered properly. Disabling binned index.");
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
let u =
|
|
322
|
-
if (!Number.isFinite(u) || !Number.isFinite(d)) {
|
|
323
|
-
c = !0;
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (u < s) {
|
|
327
|
-
c = !0;
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
if (d < u) {
|
|
321
|
+
let u = n(e), d = i(e);
|
|
322
|
+
if (!Number.isFinite(u) || !Number.isFinite(d) || u < s || d < u) {
|
|
331
323
|
c = !0;
|
|
332
324
|
return;
|
|
333
325
|
}
|
|
334
326
|
s = u;
|
|
335
327
|
let p = f(u, !1), m = u === d ? p : f(d, !0);
|
|
336
|
-
for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] <
|
|
328
|
+
for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] < r && (l[e] = r);
|
|
337
329
|
}
|
|
338
330
|
let h = (e, t, n = [0, 0]) => {
|
|
339
331
|
let r = f(e, !1), i = f(t, !0), o = a[r], s = Math.max(l[i], o);
|
|
@@ -345,7 +337,7 @@ function me(e, n, r, i = r) {
|
|
|
345
337
|
for (let t = a.length - 1; t > 0; t--) e && a[t] == X ? (a[t] = l[t], e = !1) : a[t - 1] > a[t] && (a[t - 1] = a[t]);
|
|
346
338
|
return h;
|
|
347
339
|
};
|
|
348
|
-
return p.getIndex = g, m.getIndex = g,
|
|
340
|
+
return p.getIndex = g, m.getIndex = g, n == i ? p : m;
|
|
349
341
|
}
|
|
350
342
|
//#endregion
|
|
351
343
|
//#region ../core/src/utils/forEachInBatch.js
|
|
@@ -369,22 +361,22 @@ function _e(e, t, n = 0) {
|
|
|
369
361
|
r(e, i, i + 1);
|
|
370
362
|
}), r.getIndex();
|
|
371
363
|
}
|
|
372
|
-
function ve(
|
|
373
|
-
let
|
|
374
|
-
if (!
|
|
375
|
-
let
|
|
376
|
-
if (
|
|
377
|
-
let o =
|
|
364
|
+
function ve(n) {
|
|
365
|
+
let r = n.encoders?.x, i = n.encoders?.x2;
|
|
366
|
+
if (!r?.channelDef || !("buildIndex" in r.channelDef) || !r.channelDef.buildIndex || !r.scale || !e(r.scale.type) && !["index", "locus"].includes(r.scale.type) || r.branches.length !== 1) return;
|
|
367
|
+
let a = n.getType();
|
|
368
|
+
if (a === "point" && c(n, "x") || a !== "point" && a !== "rect") return;
|
|
369
|
+
let o = t(r)?.asNumberAccessor();
|
|
378
370
|
if (!o) return;
|
|
379
|
-
let
|
|
380
|
-
if (
|
|
381
|
-
let l =
|
|
371
|
+
let s;
|
|
372
|
+
if (i && (i.scale !== r.scale || i.branches.length !== 1 || (s = t(i)?.asNumberAccessor(), !s))) return;
|
|
373
|
+
let l = n.unitView.getScaleResolution("x"), u = l?.zoomExtent;
|
|
382
374
|
if (!(!l || !u || !Number.isFinite(u[0]) || !Number.isFinite(u[1]) || u[1] <= u[0])) return {
|
|
383
375
|
xAccessor: o,
|
|
384
|
-
x2Accessor:
|
|
376
|
+
x2Accessor: s,
|
|
385
377
|
scaleResolution: l,
|
|
386
378
|
indexDomain: [u[0], u[1]],
|
|
387
|
-
domainStartOffset: ["index", "locus"].includes(
|
|
379
|
+
domainStartOffset: ["index", "locus"].includes(r.scale.type) ? -1 : 0
|
|
388
380
|
};
|
|
389
381
|
}
|
|
390
382
|
function Z(e, t) {
|
|
@@ -454,7 +446,7 @@ var ye = class {
|
|
|
454
446
|
let n = l();
|
|
455
447
|
n?.beginFrame("canvas");
|
|
456
448
|
try {
|
|
457
|
-
u("render", () =>
|
|
449
|
+
u("render", () => P({
|
|
458
450
|
layoutResult: e,
|
|
459
451
|
context: this.context,
|
|
460
452
|
width: t.width,
|
|
@@ -481,7 +473,7 @@ var ye = class {
|
|
|
481
473
|
height: t.height,
|
|
482
474
|
devicePixelRatio: this.surface.getDevicePixelRatio(),
|
|
483
475
|
textMetrics: this.textMetrics,
|
|
484
|
-
getRasterizer: () => (n || (n = new
|
|
476
|
+
getRasterizer: () => (n || (n = new V(this.surface.getPickingBuffer()), this.pickingRasterizer = n), r ||= (n.resetClip(), n.resetStatistics(), !0), n),
|
|
485
477
|
xIndexManager: this.xIndexManager
|
|
486
478
|
}), a = l();
|
|
487
479
|
a?.beginFrame("canvas", "picking");
|
|
@@ -496,7 +488,7 @@ var ye = class {
|
|
|
496
488
|
}
|
|
497
489
|
#e() {
|
|
498
490
|
let e = this.surface.getLogicalCanvasSize();
|
|
499
|
-
if (!(isNaN(e.width) || isNaN(e.height))) return
|
|
491
|
+
if (!(isNaN(e.width) || isNaN(e.height))) return f(this.viewRoot, s.create(0, 0, e.width, e.height), {
|
|
500
492
|
devicePixelRatio: this.surface.getDevicePixelRatio(),
|
|
501
493
|
renderingOptions: { firstFacet: !0 }
|
|
502
494
|
});
|
|
@@ -554,7 +546,7 @@ var Ce = class {
|
|
|
554
546
|
if (!n) throw Error("Unable to initialize a Canvas2D rendering context.");
|
|
555
547
|
this.canvas = t, this.context = n, e.container.appendChild(t);
|
|
556
548
|
try {
|
|
557
|
-
this.#e = new
|
|
549
|
+
this.#e = new F(e.container, t, e.sizeSource, () => {
|
|
558
550
|
this.#i() && e.onCanvasResize();
|
|
559
551
|
}), this.#i();
|
|
560
552
|
} catch (e) {
|
|
@@ -617,7 +609,7 @@ var Ce = class {
|
|
|
617
609
|
//#endregion
|
|
618
610
|
//#region ../core/src/rendering/canvas2d/index.js
|
|
619
611
|
function we(e) {
|
|
620
|
-
let t = new Ce(e), n =
|
|
612
|
+
let t = new Ce(e), n = ne(e.container.ownerDocument);
|
|
621
613
|
return {
|
|
622
614
|
surface: t,
|
|
623
615
|
textMetrics: n,
|
|
@@ -627,19 +619,19 @@ function we(e) {
|
|
|
627
619
|
context: t.context,
|
|
628
620
|
textMetrics: n
|
|
629
621
|
}),
|
|
630
|
-
exportCanvas: (e) =>
|
|
622
|
+
exportCanvas: (e) => I({
|
|
631
623
|
...e,
|
|
632
624
|
liveSize: t.getLogicalCanvasSize(),
|
|
633
625
|
liveDevicePixelRatio: t.getDevicePixelRatio(),
|
|
634
626
|
textMetrics: n
|
|
635
627
|
}),
|
|
636
|
-
exportRaster: (e) =>
|
|
628
|
+
exportRaster: (e) => L({
|
|
637
629
|
...e,
|
|
638
630
|
liveSize: t.getLogicalCanvasSize(),
|
|
639
631
|
liveDevicePixelRatio: t.getDevicePixelRatio(),
|
|
640
632
|
textMetrics: n
|
|
641
633
|
}),
|
|
642
|
-
rasterizeSvgRuns: (e) =>
|
|
634
|
+
rasterizeSvgRuns: (e) => R()(e),
|
|
643
635
|
readPickingId: (e, n) => t.readPickingId(e, n)
|
|
644
636
|
};
|
|
645
637
|
}
|