@genome-spy/app 0.86.0 → 0.87.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/{agentApi-DgopQbMV.js → agentApi-BZ1JCo1N.js} +6994 -6499
- package/dist/agentApi.es.js +3057 -3225
- package/dist/agentShared.es.js +7 -7
- package/dist/{canvas2d-8uxuN_vx.js → canvas2d-B_PnIof-.js} +108 -107
- package/dist/{canvas2d-BtQC7Xr8.js → canvas2d-Cafq5v-N.js} +128 -127
- package/dist/{clipOptions-taFzEljc.js → clipOptions-D6eh9T-_.js} +1508 -1166
- package/dist/{clipOptions-BQfNhxgP.js → clipOptions-H68pJyEZ.js} +1496 -1114
- package/dist/{debug-D_VtWQ6l.js → debug-BGzgZmyk.js} +2 -2
- package/dist/{debug-Bzc3SoRg.js → debug-UYKZLNh4.js} +2 -2
- package/dist/index.es.js +96 -106
- package/dist/index.js +399 -392
- package/dist/{indexer-qy_dq5l5.js → indexer-Di57GyxX.js} +1 -1
- package/dist/{indexer-qiFctgR3.js → indexer-o6Hpg4nN.js} +1 -1
- package/dist/nativeText-D9SoxpaD.js +934 -0
- package/dist/nativeText-DAjvkrzc.js +934 -0
- package/dist/{rasterExport-B8pVoOsj.js → rasterExport-DzldLv6E.js} +1 -1
- package/dist/{rasterExport-C4r4xjQT.js → rasterExport-IAbJwi8F.js} +1 -1
- package/dist/{renderCanvas2D-BQrRWp2Z.js → renderCanvas2D-BJ93Ptqj.js} +102 -96
- package/dist/{renderCanvas2D-CHVNfIUz.js → renderCanvas2D-yJ1IrDcX.js} +103 -97
- package/dist/schema.json +10169 -2852
- package/dist/{svg-C-Sw6E6G.js → svg-BRpl2Xub.js} +338 -384
- package/dist/{svg-CKHwwKRt.js → svg-DJuqHIyc.js} +353 -399
- package/dist/{svgRasterizer-BgD72AmG.js → svgRasterizer-CGZQ5njV.js} +1 -1
- package/dist/{svgRasterizer-BgSNqI3L.js → svgRasterizer-PAoqLn1j.js} +1 -1
- package/dist/{vega-scale-D46-iCaL.js → vega-scale-BGC53c22.js} +887 -1184
- package/dist/{vega-scale-CK0_al6O.js → vega-scale-DdW2NzQ3.js} +898 -1195
- package/dist/{viewIdentityRegistry-CDtVktJD.js → viewIdentityRegistry-D4p067HU.js} +1 -1
- package/dist/{viewIdentityRegistry-B-VGlez1.js → viewIdentityRegistry-Dc2hXYsO.js} +1 -1
- package/dist/{viewSelectors-CKfxF_LM.js → viewSelectors-DNXnGwEW.js} +519 -321
- package/dist/{viewSelectors-D_imtq5Z.js → viewSelectors-DYYlOt91.js} +584 -386
- package/dist/{viewUtils-nCJ7AoaI.js → viewUtils-EdhZTPrJ.js} +2930 -2264
- package/dist/{webgl-BaA3jSa2.js → webgl-C53DwzVT.js} +427 -428
- package/dist/{webgl-FP-4EsBL.js → webgl-CdgNFlJk.js} +639 -640
- package/package.json +5 -5
- package/dist/nativeText-DFV5XIx8.js +0 -860
- package/dist/nativeText-vT3AWE14.js +0 -860
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { n as a } from "./performanceProfiler-CPLEjApa.js";
|
|
1
|
+
import { Kt as e, a as t, o as n, s as r, u as i } from "./clipOptions-D6eh9T-_.js";
|
|
2
|
+
import { t as a } from "./warning-CpIIpk8e.js";
|
|
4
3
|
import { n as o } from "./layoutResult-D50MSHXR.js";
|
|
5
|
-
import {
|
|
4
|
+
import { n as s } from "./performanceProfiler-CPLEjApa.js";
|
|
5
|
+
import { D as c, E as l, M as u, O as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P } from "./nativeText-D9SoxpaD.js";
|
|
6
6
|
//#region ../core/src/rendering/canvas2d/renderers/arrow.js
|
|
7
|
-
function
|
|
8
|
-
let n = e, r = t.context, i = n.encoders, a =
|
|
7
|
+
function F(e, t) {
|
|
8
|
+
let n = e, r = t.context, i = n.encoders, a = P(n);
|
|
9
9
|
r.lineJoin = "miter";
|
|
10
|
-
let o,
|
|
11
|
-
return
|
|
10
|
+
let o, s;
|
|
11
|
+
return g(n, a, t, (e) => {
|
|
12
12
|
e.headShapeFallback && t.warn(`Canvas2D rendered unsupported arrow headShape "${a.headShape}" as a triangle.`), r.beginPath();
|
|
13
13
|
for (let t of e.boundaryLoops) {
|
|
14
14
|
let e = t[0];
|
|
@@ -16,72 +16,78 @@ function j(e, t) {
|
|
|
16
16
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
17
17
|
r.closePath();
|
|
18
18
|
}
|
|
19
|
-
let n =
|
|
20
|
-
n != "none" &&
|
|
21
|
-
let u =
|
|
22
|
-
u != "none" && d > 0 && e.strokeWidth > 0 && (
|
|
19
|
+
let n = l(i.fill(e.datum)), c = f(i.fillOpacity, e.datum) * t.viewOpacity;
|
|
20
|
+
n != "none" && c > 0 && (o != n && (r.fillStyle = n, o = n), r.globalAlpha = c, r.fill());
|
|
21
|
+
let u = l(i.stroke(e.datum)), d = f(i.strokeOpacity, e.datum) * t.viewOpacity;
|
|
22
|
+
u != "none" && d > 0 && e.strokeWidth > 0 && (s != u && (r.strokeStyle = u, s = u), r.globalAlpha = d, r.lineWidth = e.strokeWidth, r.stroke());
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region ../core/src/rendering/canvas2d/renderers/link.js
|
|
27
|
-
function
|
|
28
|
-
let
|
|
29
|
-
|
|
27
|
+
function I(t, n) {
|
|
28
|
+
let r = t, i = n.context, a = r.encoders, o = k(r), s = b(r, o.shape);
|
|
29
|
+
i.lineCap = "butt";
|
|
30
30
|
let c;
|
|
31
|
-
return
|
|
32
|
-
let
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
return E(r, o, n, (t) => {
|
|
32
|
+
let r = l(a.color(t.datum)), o = f(a.opacity, t.datum) * n.viewOpacity;
|
|
33
|
+
if (r == "none" || o <= 0 || t.strokeWidth <= 0) return;
|
|
34
|
+
let u = s(t.datum), d = u && m(t.points[0], t.points[3], u);
|
|
35
|
+
if (d) {
|
|
36
|
+
let { normalX: t, normalY: n, offset: a, start: o, end: s } = d, l = i.createLinearGradient(t * (a - s), n * (a - s), t * (a + s), n * (a + s)), u = e(r), f = u.opacity;
|
|
37
|
+
for (let e of x(o, s)) u.opacity = f * e.opacity, l.addColorStop(e.offset, u.formatRgb());
|
|
38
|
+
i.strokeStyle = l, c = void 0;
|
|
39
|
+
} else c != r && (i.strokeStyle = r, c = r);
|
|
40
|
+
i.globalAlpha = o, i.lineWidth = t.strokeWidth;
|
|
41
|
+
let [p, h, g, _] = t.points;
|
|
42
|
+
i.beginPath(), i.moveTo(p[0], p[1]), i.bezierCurveTo(h[0], h[1], g[0], g[1], _[0], _[1]), i.stroke();
|
|
37
43
|
});
|
|
38
44
|
}
|
|
39
45
|
//#endregion
|
|
40
46
|
//#region ../core/src/rendering/canvas2d/renderers/point.js
|
|
41
|
-
function
|
|
47
|
+
function L(e, t) {
|
|
42
48
|
let n = e;
|
|
43
|
-
|
|
44
|
-
let r =
|
|
45
|
-
return
|
|
46
|
-
let n = e.datum, r = e.lineShape,
|
|
47
|
-
r && (d == "none" ||
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
let
|
|
51
|
-
if (e.shape == "circle") i.arc(
|
|
49
|
+
p(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
|
|
50
|
+
let r = v(n), i = t.context, a = n.encoders, o, s;
|
|
51
|
+
return y(n, r, t, (e) => {
|
|
52
|
+
let n = e.datum, r = e.lineShape, c = l(a.fill(n)), u = f(a.fillOpacity, n) * t.viewOpacity, d = l(a.stroke(n)), p = f(a.strokeOpacity, n) * t.viewOpacity;
|
|
53
|
+
r && (d == "none" || p <= 0) && (d = c, p = u), i.beginPath();
|
|
54
|
+
let m = e.angle != 0 && e.shape != "circle";
|
|
55
|
+
m && (i.save(), i.translate(e.x, e.y), i.rotate(e.angle * Math.PI / 180));
|
|
56
|
+
let h = m ? 0 : e.x, g = m ? 0 : e.y, _ = !0;
|
|
57
|
+
if (e.shape == "circle") i.arc(h, g, e.geometryRadius, 0, Math.PI * 2);
|
|
52
58
|
else if (e.shape == "square") {
|
|
53
59
|
let t = e.geometryRadius * 2;
|
|
54
|
-
i.rect(
|
|
55
|
-
} else
|
|
56
|
-
|
|
60
|
+
i.rect(h - e.geometryRadius, g - e.geometryRadius, t, t);
|
|
61
|
+
} else _ = N(e.shape, h, g, e.geometryRadius, i);
|
|
62
|
+
m && i.restore(), _ || (t.warn(`Canvas2D rendered unsupported point shape "${e.shape}" as a circle.`), i.arc(e.x, e.y, e.geometryRadius, 0, Math.PI * 2)), !r && c != "none" && u > 0 && (o != c && (i.fillStyle = c, o = c), R(i, u), i.fill()), d != "none" && p > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), s != d && (i.strokeStyle = d, s = d), R(i, p), z(i, e.strokeWidth), i.stroke());
|
|
57
63
|
});
|
|
58
64
|
}
|
|
59
|
-
function
|
|
65
|
+
function R(e, t) {
|
|
60
66
|
e.globalAlpha != t && (e.globalAlpha = t);
|
|
61
67
|
}
|
|
62
|
-
function
|
|
68
|
+
function z(e, t) {
|
|
63
69
|
e.lineWidth != t && (e.lineWidth = t);
|
|
64
70
|
}
|
|
65
71
|
//#endregion
|
|
66
72
|
//#region ../core/src/rendering/canvas2d/renderers/rect.js
|
|
67
|
-
function
|
|
68
|
-
let n = e, r =
|
|
73
|
+
function B(e, t) {
|
|
74
|
+
let n = e, r = _(n);
|
|
69
75
|
r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch.");
|
|
70
76
|
let i = t.start ?? 0;
|
|
71
77
|
if (i === (t.end ?? t.data.length)) return 0;
|
|
72
|
-
let a = t.context, o = n.encoders,
|
|
78
|
+
let a = t.context, o = n.encoders, s, c, u = [
|
|
73
79
|
0,
|
|
74
80
|
0,
|
|
75
81
|
0,
|
|
76
82
|
0
|
|
77
|
-
], d = o.stroke.constant,
|
|
78
|
-
return
|
|
79
|
-
r.shadow.opacity > 0 &&
|
|
80
|
-
let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0,
|
|
81
|
-
|
|
83
|
+
], d = o.stroke.constant, p = o.strokeOpacity.constant, m = d ? l(o.stroke(t.data[i])) : "none", h = d && m == "none", g = !h && p ? f(o.strokeOpacity, t.data[i]) : 0;
|
|
84
|
+
return T(n, r, t, (e) => {
|
|
85
|
+
r.shadow.opacity > 0 && V(e, r.shadow, t, u);
|
|
86
|
+
let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, _ = d ? m : l(o.stroke(e.datum)), v = (p ? g : f(o.strokeOpacity, e.datum)) * t.viewOpacity * n, y = !h && _ != "none" && v > 0 && e.strokeWidth > 0, b = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
|
|
87
|
+
b && (i || y) && (u[0] = e.radii.topLeft, u[1] = e.radii.topRight, u[2] = e.radii.bottomRight, u[3] = e.radii.bottomLeft, a.beginPath(), a.roundRect(e.x, e.y, e.width, e.height, u)), i && (s != e.fill && (a.fillStyle = e.fill, s = e.fill), H(a, e.fillOpacity * n), b ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), y && (c != _ && (a.strokeStyle = _, c = _), H(a, v), U(a, e.strokeWidth), b ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
|
|
82
88
|
});
|
|
83
89
|
}
|
|
84
|
-
function
|
|
90
|
+
function V(e, t, n, r) {
|
|
85
91
|
let { context: i, devicePixelRatio: a, visibleBounds: o } = n, s = e.strokeWidth / 2, c = e.x - s, l = e.y - s, u = e.width + s * 2, d = e.height + s * 2;
|
|
86
92
|
r[0] = e.radii.topLeft + s, r[1] = e.radii.topRight + s, r[2] = e.radii.bottomRight + s, r[3] = e.radii.bottomLeft + s, i.save();
|
|
87
93
|
try {
|
|
@@ -90,71 +96,71 @@ function L(e, t, n, r) {
|
|
|
90
96
|
i.restore();
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
|
-
function
|
|
99
|
+
function H(e, t) {
|
|
94
100
|
e.globalAlpha != t && (e.globalAlpha = t);
|
|
95
101
|
}
|
|
96
|
-
function
|
|
102
|
+
function U(e, t) {
|
|
97
103
|
e.lineWidth != t && (e.lineWidth = t);
|
|
98
104
|
}
|
|
99
105
|
//#endregion
|
|
100
106
|
//#region ../core/src/rendering/canvas2d/renderers/rule.js
|
|
101
|
-
function
|
|
107
|
+
function W(e, t) {
|
|
102
108
|
let n = e, r = t.context, i = n.encoders;
|
|
103
|
-
r.lineCap =
|
|
109
|
+
r.lineCap = p(n, n.properties.strokeCap), r.setLineDash(p(n, n.properties.strokeDash) ?? []), r.lineDashOffset = p(n, n.properties.strokeDashOffset);
|
|
104
110
|
let a;
|
|
105
|
-
return
|
|
106
|
-
let n =
|
|
111
|
+
return j(n, O(n), t, (e) => {
|
|
112
|
+
let n = l(i.color(e.datum)), o = f(i.opacity, e.datum) * t.viewOpacity;
|
|
107
113
|
n == "none" || o <= 0 || e.strokeWidth <= 0 || (a != n && (r.strokeStyle = n, a = n), r.globalAlpha = o, r.lineWidth = e.strokeWidth, r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), r.stroke());
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
//#endregion
|
|
111
117
|
//#region ../core/src/rendering/canvas2d/renderers/text.js
|
|
112
|
-
function
|
|
113
|
-
let n = e, r = n.properties, i =
|
|
118
|
+
function G(e, t) {
|
|
119
|
+
let n = e, r = n.properties, i = S(n), a = t.context, o = n.encoders, s = M(r.font), c = `${r.fontStyle ?? "normal"} ${A(r.fontWeight ?? "normal")} `, u = i.baseline == "baseline" ? "alphabetic" : i.baseline;
|
|
114
120
|
[
|
|
115
121
|
r.viewportEdgeFadeWidthTop,
|
|
116
122
|
r.viewportEdgeFadeWidthRight,
|
|
117
123
|
r.viewportEdgeFadeWidthBottom,
|
|
118
124
|
r.viewportEdgeFadeWidthLeft
|
|
119
|
-
].some((e) =>
|
|
120
|
-
let
|
|
121
|
-
return i.logoLetters || (a.textAlign = i.align, a.textBaseline =
|
|
125
|
+
].some((e) => p(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
|
|
126
|
+
let d, m;
|
|
127
|
+
return i.logoLetters || (a.textAlign = i.align, a.textBaseline = u), h(n, i, t, (e) => {
|
|
122
128
|
e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
|
|
123
|
-
let n =
|
|
124
|
-
if (!(n == "none" || r <= 0)) if (
|
|
129
|
+
let n = l(o.color(e.datum)), r = f(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
|
|
130
|
+
if (!(n == "none" || r <= 0)) if (d != n && (a.fillStyle = n, d = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
|
|
125
131
|
a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.translate(e.dx, e.dy);
|
|
126
132
|
let t = a.measureText(e.text).width;
|
|
127
|
-
a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0,
|
|
133
|
+
a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, D("middle", 1)), a.restore();
|
|
128
134
|
} else e.angle ? (a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.fillText(e.text, e.dx, e.dy, e.width), a.restore()) : a.fillText(e.text, e.x + e.dx, e.y + e.dy, e.width);
|
|
129
135
|
});
|
|
130
136
|
}
|
|
131
137
|
//#endregion
|
|
132
138
|
//#region ../core/src/rendering/canvas2d/renderers/index.js
|
|
133
|
-
function
|
|
134
|
-
return e.getType() == "arrow" ?
|
|
139
|
+
function K(e, t) {
|
|
140
|
+
return e.getType() == "arrow" ? F(e, t) : e.getType() == "link" ? I(e, t) : e.getType() == "rect" ? B(e, t) : e.getType() == "point" ? L(e, t) : e.getType() == "rule" || e.getType() == "tick" ? W(e, t) : e.getType() == "text" ? G(e, t) : (t.warn(`Canvas2D rendering is not implemented for mark type "${e.getType()}".`), 0);
|
|
135
141
|
}
|
|
136
142
|
//#endregion
|
|
137
143
|
//#region ../core/src/rendering/sampleFacet.js
|
|
138
|
-
function
|
|
144
|
+
function q(e) {
|
|
139
145
|
let t = e.pixelToUnit, n = e.locSize.location * t, r = e.locSize.size * t;
|
|
140
146
|
return !(n > 1 || n + r < 0);
|
|
141
147
|
}
|
|
142
148
|
//#endregion
|
|
143
149
|
//#region ../core/src/rendering/canvas2d/canvas2DViewRenderingContext.js
|
|
144
|
-
var
|
|
150
|
+
var J = 8, Y = 16777216, X = class extends o {
|
|
145
151
|
#e = [];
|
|
146
152
|
#t = /* @__PURE__ */ new WeakSet();
|
|
147
153
|
#n = /* @__PURE__ */ new WeakMap();
|
|
148
154
|
#r;
|
|
149
155
|
#i;
|
|
150
|
-
#a = new
|
|
156
|
+
#a = new C();
|
|
151
157
|
#o;
|
|
152
158
|
#s = [0, 0];
|
|
153
159
|
#c;
|
|
154
160
|
#l;
|
|
155
161
|
#u = [];
|
|
156
162
|
constructor(e, t) {
|
|
157
|
-
if (super(e), this.context = t.context, this.width = t.width, this.height = t.height, this.devicePixelRatio = t.devicePixelRatio, this.paint = t.paint, this.#r = t.markPredicate ?? (() => !0), this.#i =
|
|
163
|
+
if (super(e), this.context = t.context, this.width = t.width, this.height = t.height, this.devicePixelRatio = t.devicePixelRatio, this.paint = t.paint, this.#r = t.markPredicate ?? (() => !0), this.#i = s(), this.#o = t.xIndexManager, this.#l = t.opacityLayers ?? [], this.#c = {
|
|
158
164
|
x: 0,
|
|
159
165
|
y: 0,
|
|
160
166
|
width: this.context.canvas.width,
|
|
@@ -171,7 +177,7 @@ var W = 8, G = 16777216, K = class extends o {
|
|
|
171
177
|
this.paint && !this.#t.has(e) && (e.onBeforeRender(), this.#t.add(e));
|
|
172
178
|
let r = e.getOpacity();
|
|
173
179
|
if (this.paint && r > 0 && r !== 1) {
|
|
174
|
-
let r = t(e), i =
|
|
180
|
+
let r = t(e), i = Z(n, this.devicePixelRatio, this.#c, r), a = Q(this.#l, this.#u.length, i.width, i.height);
|
|
175
181
|
a.setTransform(this.devicePixelRatio, 0, 0, this.devicePixelRatio, -i.x, -i.y), this.#u.push({
|
|
176
182
|
context: this.context,
|
|
177
183
|
bounds: this.#c
|
|
@@ -200,49 +206,49 @@ var W = 8, G = 16777216, K = class extends o {
|
|
|
200
206
|
}
|
|
201
207
|
renderMark(e, t) {
|
|
202
208
|
if (!this.paint || !this.#r(e)) return;
|
|
203
|
-
let
|
|
204
|
-
if (
|
|
205
|
-
e.initializeRenderingRevisions(
|
|
209
|
+
let i = this.#n.get(e.unitView);
|
|
210
|
+
if (i === void 0 && (i = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, i)), i <= 0) return;
|
|
211
|
+
e.initializeRenderingRevisions(Object.keys(e.properties));
|
|
206
212
|
let o = t.sampleFacetRenderingOptions;
|
|
207
|
-
if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !
|
|
213
|
+
if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !q(o))) {
|
|
208
214
|
this.#i?.addCount("canvasCulledSampleFacetOccurrences");
|
|
209
215
|
return;
|
|
210
216
|
}
|
|
211
|
-
let s = this.currentCoords, l = n(t),
|
|
212
|
-
if (!
|
|
213
|
-
let
|
|
214
|
-
if (
|
|
215
|
-
let e =
|
|
216
|
-
|
|
217
|
+
let s = this.currentCoords, l = n(t), f = r(l, e.properties.clip, s), p = d(this.width, this.height, f);
|
|
218
|
+
if (!w(p)) return;
|
|
219
|
+
let m = c(s, l, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, g = this.context;
|
|
220
|
+
if (g.save(), f) {
|
|
221
|
+
let e = f.rect.flatten(), t = f.clipX ? e.x : 0, n = f.clipY ? e.y : 0, r = f.clipX ? e.width : this.width, i = f.clipY ? e.height : this.height;
|
|
222
|
+
g.beginPath(), g.rect(t, n, r, i), g.clip();
|
|
217
223
|
}
|
|
218
224
|
try {
|
|
219
|
-
|
|
220
|
-
let r = 0,
|
|
221
|
-
return
|
|
222
|
-
context:
|
|
225
|
+
u(e, t, s, this.#a, (t, n) => {
|
|
226
|
+
let r = 0, i = n.length;
|
|
227
|
+
return h && this.#o.query(n, this.#s) && (r = this.#s[0], i = this.#s[1]), K(e, {
|
|
228
|
+
context: g,
|
|
223
229
|
devicePixelRatio: this.devicePixelRatio,
|
|
224
230
|
coords: t,
|
|
225
231
|
data: n,
|
|
226
232
|
start: r,
|
|
227
|
-
end:
|
|
228
|
-
visibleBounds:
|
|
229
|
-
anchorCullBounds:
|
|
233
|
+
end: i,
|
|
234
|
+
visibleBounds: p,
|
|
235
|
+
anchorCullBounds: m,
|
|
230
236
|
viewOpacity: 1,
|
|
231
|
-
warn: (t) =>
|
|
237
|
+
warn: (t) => a(`${t} View: ${e.unitView.getPathString()}`)
|
|
232
238
|
});
|
|
233
|
-
}, (t) =>
|
|
239
|
+
}, (t) => a(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
|
|
234
240
|
} finally {
|
|
235
|
-
|
|
241
|
+
g.restore();
|
|
236
242
|
}
|
|
237
243
|
}
|
|
238
244
|
get currentCoords() {
|
|
239
|
-
let
|
|
240
|
-
if (!
|
|
241
|
-
return
|
|
245
|
+
let e = i(this.#e);
|
|
246
|
+
if (!e) throw Error("No current view in Canvas2D rendering context.");
|
|
247
|
+
return e.coords;
|
|
242
248
|
}
|
|
243
249
|
};
|
|
244
|
-
function
|
|
245
|
-
let i = n.x + n.width, a = n.y + n.height, o = r.clipX ?
|
|
250
|
+
function Z(e, t, n, r) {
|
|
251
|
+
let i = n.x + n.width, a = n.y + n.height, o = r.clipX ? $(Math.floor(e.x * t), n.x, i) : n.x, s = r.clipY ? $(Math.floor(e.y * t), n.y, a) : n.y, c = r.clipX ? $(Math.ceil((e.x + e.width) * t), o, i) : i, l = r.clipY ? $(Math.ceil((e.y + e.height) * t), s, a) : a;
|
|
246
252
|
return {
|
|
247
253
|
x: o,
|
|
248
254
|
y: s,
|
|
@@ -250,22 +256,22 @@ function q(e, t, n, r) {
|
|
|
250
256
|
height: l - s
|
|
251
257
|
};
|
|
252
258
|
}
|
|
253
|
-
function
|
|
254
|
-
let i = n * r, a = e[t], o = e.reduce((e, n, r) => r === t ? e : e + n.canvas.width * n.canvas.height, 0), s = t <
|
|
259
|
+
function Q(e, t, n, r) {
|
|
260
|
+
let i = n * r, a = e[t], o = e.reduce((e, n, r) => r === t ? e : e + n.canvas.width * n.canvas.height, 0), s = t < J && o + i <= Y;
|
|
255
261
|
if (!a || !s) {
|
|
256
262
|
if (a = document.createElement("canvas").getContext("2d"), !a) throw Error("Unable to create a Canvas2D view group.");
|
|
257
263
|
s && (e[t] = a);
|
|
258
264
|
}
|
|
259
265
|
return a.canvas.width != n || a.canvas.height != r ? (a.canvas.width = n, a.canvas.height = r) : (a.resetTransform(), a.clearRect(0, 0, n, r)), a.globalAlpha = 1, a.globalCompositeOperation = "source-over", a;
|
|
260
266
|
}
|
|
261
|
-
function
|
|
267
|
+
function $(e, t, n) {
|
|
262
268
|
return Math.min(n, Math.max(t, e));
|
|
263
269
|
}
|
|
264
270
|
//#endregion
|
|
265
271
|
//#region ../core/src/rendering/canvas2d/renderCanvas2D.js
|
|
266
|
-
function
|
|
267
|
-
let t = new
|
|
272
|
+
function ee(e) {
|
|
273
|
+
let t = new X({ picking: !1 }, e);
|
|
268
274
|
e.layoutResult.collectRenderCommands(t);
|
|
269
275
|
}
|
|
270
276
|
//#endregion
|
|
271
|
-
export {
|
|
277
|
+
export { q as n, ee as t };
|