@visactor/vtable 0.25.1-alpha.4 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.js +2 -1
- package/cjs/core/row-series-number-helper.js +1 -2
- package/cjs/event/listener/container-dom.js +7 -7
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/render/layout/index.d.ts +1 -0
- package/cjs/render/layout/index.js +2 -1
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/render/layout/line.d.ts +1 -32
- package/cjs/render/layout/line.js +6 -79
- package/cjs/render/layout/line.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +2 -1
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +11 -6
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +1 -1
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +160 -178
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.js +2 -1
- package/es/core/row-series-number-helper.js +1 -2
- package/es/event/listener/container-dom.js +7 -7
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/render/layout/index.d.ts +1 -0
- package/es/render/layout/index.js +2 -0
- package/es/render/layout/index.js.map +1 -1
- package/es/render/layout/line.d.ts +1 -32
- package/es/render/layout/line.js +1 -79
- package/es/render/layout/line.js.map +1 -1
- package/es/scenegraph/component/custom.js +2 -1
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +12 -5
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +1 -1
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -3924,7 +3924,7 @@
|
|
|
3924
3924
|
controlX = 0,
|
|
3925
3925
|
controlY = 0;
|
|
3926
3926
|
for (let i = 0, len = commandStrList.length; i < len; ++i) {
|
|
3927
|
-
switch (current = commandStrList[i], 1 === sX && 1 === sY || (current = scale$
|
|
3927
|
+
switch (current = commandStrList[i], 1 === sX && 1 === sY || (current = scale$2(current, sX, sY)), current[0]) {
|
|
3928
3928
|
case "l":
|
|
3929
3929
|
x += current[1], y += current[2], this.lineTo(x + l, y + t);
|
|
3930
3930
|
break;
|
|
@@ -4068,7 +4068,7 @@
|
|
|
4068
4068
|
}
|
|
4069
4069
|
}
|
|
4070
4070
|
const temp = ["l", 0, 0, 0, 0, 0, 0, 0];
|
|
4071
|
-
function scale$
|
|
4071
|
+
function scale$2(current, sX, sY) {
|
|
4072
4072
|
const c = temp[0] = current[0];
|
|
4073
4073
|
if ("a" === c || "A" === c) temp[1] = sX * current[1], temp[2] = sY * current[2], temp[3] = current[3], temp[4] = current[4], temp[5] = current[5], temp[6] = sX * current[6], temp[7] = sY * current[7];else if ("h" === c || "H" === c) temp[1] = sX * current[1];else if ("v" === c || "V" === c) temp[1] = sY * current[1];else for (let i = 1, n = current.length; i < n; ++i) temp[i] = (i % 2 == 1 ? sX : sY) * current[i];
|
|
4074
4074
|
return temp;
|
|
@@ -8145,7 +8145,7 @@
|
|
|
8145
8145
|
const SYMBOL_NUMBER_TYPE = genNumberType();
|
|
8146
8146
|
const TEXT_NUMBER_TYPE = genNumberType();
|
|
8147
8147
|
const GraphicService = Symbol.for("GraphicService");
|
|
8148
|
-
const GraphicCreator$
|
|
8148
|
+
const GraphicCreator$1 = Symbol.for("GraphicCreator");
|
|
8149
8149
|
const SVG_PARSE_ATTRIBUTE_MAP = {
|
|
8150
8150
|
"stroke-linecap": "lineCap",
|
|
8151
8151
|
"stroke-linejoin": "lineJoin",
|
|
@@ -11871,7 +11871,7 @@
|
|
|
11871
11871
|
function mat3Tomat4(out, b) {
|
|
11872
11872
|
out[0] = b.a, out[1] = b.b, out[2] = 0, out[3] = 0, out[4] = b.c, out[5] = b.d, out[6] = 0, out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = b.e, out[13] = b.f, out[14] = 0, out[15] = 1;
|
|
11873
11873
|
}
|
|
11874
|
-
function scale$
|
|
11874
|
+
function scale$1(out, a, v) {
|
|
11875
11875
|
const x = v[0],
|
|
11876
11876
|
y = v[1],
|
|
11877
11877
|
z = v[2];
|
|
@@ -11932,7 +11932,7 @@
|
|
|
11932
11932
|
} else _anchor[1] = anchor3d[1];
|
|
11933
11933
|
_anchor[2] = null !== (_a = anchor3d[2]) && void 0 !== _a ? _a : 0;
|
|
11934
11934
|
}
|
|
11935
|
-
if (identity$2(out), translate(out, out, [x + dx, y + dy, z + dz]), translate(out, out, [_anchor[0], _anchor[1], _anchor[2]]), rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [-_anchor[0], -_anchor[1], _anchor[2]]), scale$
|
|
11935
|
+
if (identity$2(out), translate(out, out, [x + dx, y + dy, z + dz]), translate(out, out, [_anchor[0], _anchor[1], _anchor[2]]), rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [-_anchor[0], -_anchor[1], _anchor[2]]), scale$1(out, out, [scaleX, scaleY, scaleZ]), angle) {
|
|
11936
11936
|
const m = mat4Allocate.allocate(),
|
|
11937
11937
|
_anchor = [0, 0];
|
|
11938
11938
|
if (anchor) {
|
|
@@ -12401,9 +12401,9 @@
|
|
|
12401
12401
|
return !!visible || (aabbBounds.clear(), !1);
|
|
12402
12402
|
}
|
|
12403
12403
|
};
|
|
12404
|
-
DefaultGraphicService = __decorate$19([injectable(), __param$F(0, inject(GraphicCreator$
|
|
12404
|
+
DefaultGraphicService = __decorate$19([injectable(), __param$F(0, inject(GraphicCreator$1)), __metadata$S("design:paramtypes", [Object])], DefaultGraphicService);
|
|
12405
12405
|
|
|
12406
|
-
|
|
12406
|
+
class GraphicCreator {
|
|
12407
12407
|
constructor() {
|
|
12408
12408
|
this.store = new Map();
|
|
12409
12409
|
}
|
|
@@ -12414,12 +12414,12 @@
|
|
|
12414
12414
|
const cb = this.store.get(name);
|
|
12415
12415
|
return cb ? cb(params) : null;
|
|
12416
12416
|
}
|
|
12417
|
-
}
|
|
12418
|
-
const graphicCreator
|
|
12417
|
+
}
|
|
12418
|
+
const graphicCreator = new GraphicCreator();
|
|
12419
12419
|
|
|
12420
|
-
let text
|
|
12421
|
-
function getTextBounds
|
|
12422
|
-
return text
|
|
12420
|
+
let text;
|
|
12421
|
+
function getTextBounds(params) {
|
|
12422
|
+
return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
|
|
12423
12423
|
}
|
|
12424
12424
|
|
|
12425
12425
|
const result = {
|
|
@@ -14654,7 +14654,7 @@
|
|
|
14654
14654
|
h = b.height();
|
|
14655
14655
|
b.set((null !== (_h = background.x) && void 0 !== _h ? _h : 0) + (null !== (_j = background.dx) && void 0 !== _j ? _j : 0), (null !== (_k = background.y) && void 0 !== _k ? _k : 0) + (null !== (_l = background.dy) && void 0 !== _l ? _l : 0), w, h);
|
|
14656
14656
|
}
|
|
14657
|
-
} else b = graphic.AABBBounds, onlyTranslate || (b = getTextBounds
|
|
14657
|
+
} else b = graphic.AABBBounds, onlyTranslate || (b = getTextBounds(Object.assign(Object.assign({}, graphic.attribute), {
|
|
14658
14658
|
angle: 0,
|
|
14659
14659
|
scaleX: 1,
|
|
14660
14660
|
scaleY: 1,
|
|
@@ -15189,7 +15189,7 @@
|
|
|
15189
15189
|
getShadowRoot(interactiveLayer) {
|
|
15190
15190
|
var _a;
|
|
15191
15191
|
let group = interactiveLayer.getElementById("_interactive_group");
|
|
15192
|
-
return group || (group = graphicCreator
|
|
15192
|
+
return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
|
|
15193
15193
|
}
|
|
15194
15194
|
}
|
|
15195
15195
|
class Canvas3DDrawItemInterceptor {
|
|
@@ -15442,7 +15442,7 @@
|
|
|
15442
15442
|
});
|
|
15443
15443
|
|
|
15444
15444
|
var graphicModule = new ContainerModule(bind => {
|
|
15445
|
-
bind(GraphicService).to(DefaultGraphicService).inSingletonScope(), bind(GraphicCreator$
|
|
15445
|
+
bind(GraphicService).to(DefaultGraphicService).inSingletonScope(), bind(GraphicCreator$1).toConstantValue(graphicCreator);
|
|
15446
15446
|
});
|
|
15447
15447
|
|
|
15448
15448
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
@@ -18428,75 +18428,75 @@
|
|
|
18428
18428
|
});
|
|
18429
18429
|
|
|
18430
18430
|
function registerArcGraphic() {
|
|
18431
|
-
graphicCreator
|
|
18431
|
+
graphicCreator.RegisterGraphicCreator("arc", createArc);
|
|
18432
18432
|
}
|
|
18433
18433
|
|
|
18434
18434
|
function registerArc3dGraphic() {
|
|
18435
|
-
graphicCreator
|
|
18435
|
+
graphicCreator.RegisterGraphicCreator("arc3d", createArc3d);
|
|
18436
18436
|
}
|
|
18437
18437
|
|
|
18438
18438
|
function registerAreaGraphic() {
|
|
18439
|
-
graphicCreator
|
|
18439
|
+
graphicCreator.RegisterGraphicCreator("area", createArea);
|
|
18440
18440
|
}
|
|
18441
18441
|
|
|
18442
18442
|
function registerCircleGraphic() {
|
|
18443
|
-
graphicCreator
|
|
18443
|
+
graphicCreator.RegisterGraphicCreator("circle", createCircle);
|
|
18444
18444
|
}
|
|
18445
18445
|
|
|
18446
18446
|
function registerGlyphGraphic() {
|
|
18447
|
-
graphicCreator
|
|
18447
|
+
graphicCreator.RegisterGraphicCreator("glyph", createGlyph);
|
|
18448
18448
|
}
|
|
18449
18449
|
|
|
18450
18450
|
function registerGroupGraphic() {
|
|
18451
|
-
graphicCreator
|
|
18451
|
+
graphicCreator.RegisterGraphicCreator("group", createGroup);
|
|
18452
18452
|
}
|
|
18453
18453
|
|
|
18454
18454
|
function registerImageGraphic() {
|
|
18455
|
-
graphicCreator
|
|
18455
|
+
graphicCreator.RegisterGraphicCreator("image", createImage);
|
|
18456
18456
|
}
|
|
18457
18457
|
|
|
18458
18458
|
function registerLineGraphic() {
|
|
18459
|
-
graphicCreator
|
|
18459
|
+
graphicCreator.RegisterGraphicCreator("line", createLine);
|
|
18460
18460
|
}
|
|
18461
18461
|
|
|
18462
18462
|
function registerPathGraphic() {
|
|
18463
|
-
graphicCreator
|
|
18463
|
+
graphicCreator.RegisterGraphicCreator("path", createPath);
|
|
18464
18464
|
}
|
|
18465
18465
|
|
|
18466
18466
|
function registerPolygonGraphic() {
|
|
18467
|
-
graphicCreator
|
|
18467
|
+
graphicCreator.RegisterGraphicCreator("polygon", createPolygon);
|
|
18468
18468
|
}
|
|
18469
18469
|
|
|
18470
18470
|
function registerPyramid3dGraphic() {
|
|
18471
|
-
graphicCreator
|
|
18471
|
+
graphicCreator.RegisterGraphicCreator("pyramid3d", createPyramid3d);
|
|
18472
18472
|
}
|
|
18473
18473
|
|
|
18474
18474
|
function registerRectGraphic() {
|
|
18475
|
-
graphicCreator
|
|
18475
|
+
graphicCreator.RegisterGraphicCreator("rect", createRect);
|
|
18476
18476
|
}
|
|
18477
18477
|
|
|
18478
18478
|
function registerRect3dGraphic() {
|
|
18479
|
-
graphicCreator
|
|
18479
|
+
graphicCreator.RegisterGraphicCreator("rect3d", createRect3d);
|
|
18480
18480
|
}
|
|
18481
18481
|
|
|
18482
18482
|
function registerRichtextGraphic() {
|
|
18483
|
-
graphicCreator
|
|
18483
|
+
graphicCreator.RegisterGraphicCreator("richtext", createRichText);
|
|
18484
18484
|
}
|
|
18485
18485
|
|
|
18486
18486
|
function registerSymbolGraphic() {
|
|
18487
|
-
graphicCreator
|
|
18487
|
+
graphicCreator.RegisterGraphicCreator("symbol", createSymbol);
|
|
18488
18488
|
}
|
|
18489
18489
|
|
|
18490
18490
|
function registerTextGraphic() {
|
|
18491
|
-
graphicCreator
|
|
18491
|
+
graphicCreator.RegisterGraphicCreator("text", createText);
|
|
18492
18492
|
}
|
|
18493
18493
|
|
|
18494
18494
|
function registerShadowRootGraphic() {
|
|
18495
|
-
graphicCreator
|
|
18495
|
+
graphicCreator.RegisterGraphicCreator("shadowRoot", createShadowRoot);
|
|
18496
18496
|
}
|
|
18497
18497
|
|
|
18498
18498
|
function registerWrapTextGraphic() {
|
|
18499
|
-
graphicCreator
|
|
18499
|
+
graphicCreator.RegisterGraphicCreator("wrapText", createWrapText);
|
|
18500
18500
|
}
|
|
18501
18501
|
|
|
18502
18502
|
const REACT_TO_CANOPUS_EVENTS = {
|
|
@@ -18547,40 +18547,40 @@
|
|
|
18547
18547
|
onDblClick: "dblclick"
|
|
18548
18548
|
};
|
|
18549
18549
|
function VArc(params) {
|
|
18550
|
-
return graphicCreator
|
|
18550
|
+
return graphicCreator.arc(params ? params.attribute : {});
|
|
18551
18551
|
}
|
|
18552
18552
|
function VArea(params) {
|
|
18553
|
-
return graphicCreator
|
|
18553
|
+
return graphicCreator.area(params ? params.attribute : {});
|
|
18554
18554
|
}
|
|
18555
18555
|
function VCircle(params) {
|
|
18556
|
-
return graphicCreator
|
|
18556
|
+
return graphicCreator.circle(params ? params.attribute : {});
|
|
18557
18557
|
}
|
|
18558
18558
|
function VGroup(params) {
|
|
18559
|
-
return graphicCreator
|
|
18559
|
+
return graphicCreator.group(params ? params.attribute : {});
|
|
18560
18560
|
}
|
|
18561
18561
|
function VGlyph(params) {
|
|
18562
|
-
return graphicCreator
|
|
18562
|
+
return graphicCreator.glyph(params ? params.attribute : {});
|
|
18563
18563
|
}
|
|
18564
18564
|
function VImage(params) {
|
|
18565
|
-
return graphicCreator
|
|
18565
|
+
return graphicCreator.image(params ? params.attribute : {});
|
|
18566
18566
|
}
|
|
18567
18567
|
function VLine(params) {
|
|
18568
|
-
return graphicCreator
|
|
18568
|
+
return graphicCreator.line(params ? params.attribute : {});
|
|
18569
18569
|
}
|
|
18570
18570
|
function VPath(params) {
|
|
18571
|
-
return graphicCreator
|
|
18571
|
+
return graphicCreator.path(params ? params.attribute : {});
|
|
18572
18572
|
}
|
|
18573
18573
|
function VPolygon(params) {
|
|
18574
|
-
return graphicCreator
|
|
18574
|
+
return graphicCreator.polygon(params ? params.attribute : {});
|
|
18575
18575
|
}
|
|
18576
18576
|
function VRect(params) {
|
|
18577
|
-
return graphicCreator
|
|
18577
|
+
return graphicCreator.rect(params ? params.attribute : {});
|
|
18578
18578
|
}
|
|
18579
18579
|
function VSymbol(params) {
|
|
18580
|
-
return graphicCreator
|
|
18580
|
+
return graphicCreator.symbol(params ? params.attribute : {});
|
|
18581
18581
|
}
|
|
18582
18582
|
function VText(params) {
|
|
18583
|
-
return graphicCreator
|
|
18583
|
+
return graphicCreator.text(params ? params.attribute : {});
|
|
18584
18584
|
}
|
|
18585
18585
|
|
|
18586
18586
|
var __rest$4 = undefined && undefined.__rest || function (s, e) {
|
|
@@ -18607,7 +18607,7 @@
|
|
|
18607
18607
|
} = _a,
|
|
18608
18608
|
props = __rest$4(_a, ["key", "name", "id", "attribute", "stateProxy"]);
|
|
18609
18609
|
let c = type;
|
|
18610
|
-
isString$2(type) && (c = graphicCreator
|
|
18610
|
+
isString$2(type) && (c = graphicCreator[type]);
|
|
18611
18611
|
const childrenList = [];
|
|
18612
18612
|
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
18613
18613
|
children[_key - 2] = arguments[_key];
|
|
@@ -25428,9 +25428,13 @@
|
|
|
25428
25428
|
});
|
|
25429
25429
|
}
|
|
25430
25430
|
|
|
25431
|
-
function scale
|
|
25431
|
+
function scale(vector, scale) {
|
|
25432
25432
|
return [vector[0] * scale, vector[1] * scale];
|
|
25433
25433
|
}
|
|
25434
|
+
function length(vector) {
|
|
25435
|
+
const [x, y] = vector;
|
|
25436
|
+
return Math.sqrt(x * x + y * y);
|
|
25437
|
+
}
|
|
25434
25438
|
function normalize$2(vector) {
|
|
25435
25439
|
const [x, y] = vector;
|
|
25436
25440
|
let len = x * x + y * y;
|
|
@@ -25458,7 +25462,7 @@
|
|
|
25458
25462
|
width: 0,
|
|
25459
25463
|
height: 0
|
|
25460
25464
|
};
|
|
25461
|
-
const bounds = getTextBounds
|
|
25465
|
+
const bounds = getTextBounds({
|
|
25462
25466
|
text: text,
|
|
25463
25467
|
fontFamily: textSpec.fontFamily || defaultTextTheme.fontFamily || DEFAULT_TEXT_FONT_FAMILY$1,
|
|
25464
25468
|
fontSize: textSpec.fontSize || defaultTextTheme.fontSize || 12,
|
|
@@ -26102,7 +26106,7 @@
|
|
|
26102
26106
|
}
|
|
26103
26107
|
points.forEach((point, index) => {
|
|
26104
26108
|
var _a, _b;
|
|
26105
|
-
const line = graphicCreator
|
|
26109
|
+
const line = graphicCreator.line(Object.assign(Object.assign({
|
|
26106
26110
|
points: point
|
|
26107
26111
|
}, isArray$3(lineStyle) ? null !== (_a = lineStyle[index]) && void 0 !== _a ? _a : lineStyle[lineStyle.length - 1] : lineStyle), {
|
|
26108
26112
|
fill: !1
|
|
@@ -26110,8 +26114,8 @@
|
|
|
26110
26114
|
line.name = `${this.name}-line`, line.id = this._getNodeId("line" + index), isEmpty(null == state ? void 0 : state.line) || (line.states = isArray$3(state.line) ? null !== (_b = state.line[index]) && void 0 !== _b ? _b : state.line[state.line.length - 1] : state.line), this.add(line);
|
|
26111
26115
|
});
|
|
26112
26116
|
} else {
|
|
26113
|
-
let lineCreator = graphicCreator
|
|
26114
|
-
array$1(lineStyle)[0].cornerRadius && (lineCreator = graphicCreator
|
|
26117
|
+
let lineCreator = graphicCreator.line;
|
|
26118
|
+
array$1(lineStyle)[0].cornerRadius && (lineCreator = graphicCreator.polygon);
|
|
26115
26119
|
const line = lineCreator(Object.assign(Object.assign({
|
|
26116
26120
|
points: this._clipPoints(this.attribute.points)
|
|
26117
26121
|
}, array$1(lineStyle)[0]), {
|
|
@@ -26151,7 +26155,7 @@
|
|
|
26151
26155
|
}, rotate = startAngle + Math.PI / 2) : (position = {
|
|
26152
26156
|
x: end.x + (isValidNumber$1(endAngle) ? refX * Math.cos(endAngle) + refY * Math.cos(endAngle - Math.PI / 2) : 0),
|
|
26153
26157
|
y: end.y + (isValidNumber$1(endAngle) ? refX * Math.sin(endAngle) + refY * Math.sin(endAngle - Math.PI / 2) : 0)
|
|
26154
|
-
}, rotate = endAngle + Math.PI / 2), symbol = graphicCreator
|
|
26158
|
+
}, rotate = endAngle + Math.PI / 2), symbol = graphicCreator.symbol(Object.assign(Object.assign(Object.assign({}, position), {
|
|
26155
26159
|
symbolType: symbolType,
|
|
26156
26160
|
size: size,
|
|
26157
26161
|
angle: autoRotate ? rotate + refAngle : 0,
|
|
@@ -26314,18 +26318,54 @@
|
|
|
26314
26318
|
}
|
|
26315
26319
|
};
|
|
26316
26320
|
|
|
26321
|
+
const clampRadian = function () {
|
|
26322
|
+
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
26323
|
+
if (angle < 0) for (; angle < 0;) angle += tau;else if (angle > 0) for (; angle > tau;) angle -= tau;
|
|
26324
|
+
return angle;
|
|
26325
|
+
};
|
|
26326
|
+
function isInRange(a, min, max) {
|
|
26327
|
+
return !isLess(a, min, 0, 1e-6) && !isGreater(a, max, 0, 1e-6);
|
|
26328
|
+
}
|
|
26329
|
+
function getCircleLabelPosition(tickPosition, tickVector, text, style) {
|
|
26330
|
+
const labelBounds = getTextBounds(Object.assign({
|
|
26331
|
+
text: text
|
|
26332
|
+
}, style)),
|
|
26333
|
+
width = labelBounds.width(),
|
|
26334
|
+
height = labelBounds.height(),
|
|
26335
|
+
angle = clampRadian(Math.atan2(tickVector[1], tickVector[0])) - Math.PI,
|
|
26336
|
+
PI_3_4 = 3 * Math.PI / 4,
|
|
26337
|
+
PI_1_4 = Math.PI / 4,
|
|
26338
|
+
PI_1_2 = Math.PI / 2,
|
|
26339
|
+
baseX = tickPosition.x;
|
|
26340
|
+
let dx = 0;
|
|
26341
|
+
dx = isInRange(angle, -PI_3_4, -PI_1_4) ? ((angle + PI_3_4) / PI_1_2 - .5) * width : isInRange(angle, PI_1_4, PI_3_4) ? (.5 - (angle - PI_1_4) / PI_1_2) * width : Math.cos(angle) >= 0 ? .5 * width : .5 * -width;
|
|
26342
|
+
const x = baseX - dx,
|
|
26343
|
+
baseY = tickPosition.y;
|
|
26344
|
+
let dy = 0;
|
|
26345
|
+
dy = isInRange(angle, -PI_3_4, -PI_1_4) ? .5 * -height : isInRange(angle, PI_1_4, PI_3_4) ? .5 * height : Math.cos(angle) >= 0 ? (.5 - (PI_1_4 - angle) / PI_1_2) * height : (.5 - clampRadian(angle - PI_3_4) / PI_1_2) * height;
|
|
26346
|
+
return {
|
|
26347
|
+
x: x,
|
|
26348
|
+
y: baseY - dy
|
|
26349
|
+
};
|
|
26350
|
+
}
|
|
26317
26351
|
function getElMap(g) {
|
|
26318
26352
|
const elMap = {};
|
|
26319
26353
|
return traverseGroup(g, el => {
|
|
26320
26354
|
"group" !== el.type && el.id && (elMap[el.id] = el);
|
|
26321
26355
|
}), elMap;
|
|
26322
26356
|
}
|
|
26323
|
-
function getVerticalCoord
|
|
26357
|
+
function getVerticalCoord(point, vector) {
|
|
26324
26358
|
return {
|
|
26325
26359
|
x: point.x + vector[0],
|
|
26326
26360
|
y: point.y + vector[1]
|
|
26327
26361
|
};
|
|
26328
26362
|
}
|
|
26363
|
+
function getCircleVerticalVector(offset, point, center) {
|
|
26364
|
+
let inside = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
26365
|
+
let axisInside = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
26366
|
+
const vector = [point.x - center.x, point.y - center.y];
|
|
26367
|
+
return scale(vector, (inside ? -1 : 1) * (axisInside ? -1 : 1) * offset / length(vector));
|
|
26368
|
+
}
|
|
26329
26369
|
|
|
26330
26370
|
class AxisBase extends AbstractComponent {
|
|
26331
26371
|
constructor() {
|
|
@@ -26357,14 +26397,14 @@
|
|
|
26357
26397
|
getBoundsWithoutRender(attributes) {
|
|
26358
26398
|
const currentAttribute = cloneDeep(this.attribute);
|
|
26359
26399
|
merge(this.attribute, attributes);
|
|
26360
|
-
const offscreenGroup = graphicCreator
|
|
26400
|
+
const offscreenGroup = graphicCreator.group({
|
|
26361
26401
|
x: this.attribute.x,
|
|
26362
26402
|
y: this.attribute.y
|
|
26363
26403
|
});
|
|
26364
26404
|
return this.add(offscreenGroup), this._renderInner(offscreenGroup), this.removeChild(offscreenGroup), this.attribute = currentAttribute, offscreenGroup.AABBBounds;
|
|
26365
26405
|
}
|
|
26366
26406
|
render() {
|
|
26367
|
-
this._prevInnerView = this._innerView && getElMap(this._innerView), this.removeAllChild(!0), this._innerView = graphicCreator
|
|
26407
|
+
this._prevInnerView = this._innerView && getElMap(this._innerView), this.removeAllChild(!0), this._innerView = graphicCreator.group({
|
|
26368
26408
|
x: 0,
|
|
26369
26409
|
y: 0,
|
|
26370
26410
|
pickable: !1
|
|
@@ -26386,13 +26426,13 @@
|
|
|
26386
26426
|
line: line,
|
|
26387
26427
|
items: items
|
|
26388
26428
|
} = this.attribute,
|
|
26389
|
-
axisContainer = graphicCreator
|
|
26429
|
+
axisContainer = graphicCreator.group({
|
|
26390
26430
|
x: 0,
|
|
26391
26431
|
y: 0,
|
|
26392
26432
|
zIndex: 1
|
|
26393
26433
|
});
|
|
26394
26434
|
if (axisContainer.name = AXIS_ELEMENT_NAME.axisContainer, axisContainer.id = this._getNodeId("container"), axisContainer.setMode(this.mode), this.axisContainer = axisContainer, container.add(axisContainer), line && line.visible && this.renderLine(axisContainer), items && items.length && (this.data = this._transformItems(items[0]), tick && tick.visible && this.renderTicks(axisContainer), label && label.visible)) {
|
|
26395
|
-
const labelGroup = graphicCreator
|
|
26435
|
+
const labelGroup = graphicCreator.group({
|
|
26396
26436
|
x: 0,
|
|
26397
26437
|
y: 0,
|
|
26398
26438
|
pickable: !1
|
|
@@ -26425,14 +26465,14 @@
|
|
|
26425
26465
|
}
|
|
26426
26466
|
renderTicks(container) {
|
|
26427
26467
|
const tickLineItems = this.getTickLineItems(),
|
|
26428
|
-
tickLineGroup = graphicCreator
|
|
26468
|
+
tickLineGroup = graphicCreator.group({
|
|
26429
26469
|
x: 0,
|
|
26430
26470
|
y: 0,
|
|
26431
26471
|
pickable: !1
|
|
26432
26472
|
});
|
|
26433
26473
|
tickLineGroup.name = AXIS_ELEMENT_NAME.tickContainer, tickLineGroup.id = this._getNodeId("tick-container"), container.add(tickLineGroup), tickLineItems.forEach((item, index) => {
|
|
26434
26474
|
var _a;
|
|
26435
|
-
const line = graphicCreator
|
|
26475
|
+
const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("tick", item, index, tickLineItems)));
|
|
26436
26476
|
if (line.name = AXIS_ELEMENT_NAME.tick, line.id = this._getNodeId(item.id), isEmpty(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.state)) line.states = DEFAULT_STATES$2;else {
|
|
26437
26477
|
const data = this.data[index],
|
|
26438
26478
|
tickLineState = merge({}, DEFAULT_STATES$2, this.attribute.tick.state);
|
|
@@ -26448,7 +26488,7 @@
|
|
|
26448
26488
|
if (subTick && subTick.visible) {
|
|
26449
26489
|
const subTickLineItems = this.getSubTickLineItems();
|
|
26450
26490
|
subTickLineItems.length && subTickLineItems.forEach((item, index) => {
|
|
26451
|
-
const line = graphicCreator
|
|
26491
|
+
const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("subTick", item, index, tickLineItems)));
|
|
26452
26492
|
if (line.name = AXIS_ELEMENT_NAME.subTick, line.id = this._getNodeId(`${index}`), isEmpty(subTick.state)) line.states = DEFAULT_STATES$2;else {
|
|
26453
26493
|
const subTickLineState = merge({}, DEFAULT_STATES$2, subTick.state);
|
|
26454
26494
|
Object.keys(subTickLineState).forEach(key => {
|
|
@@ -26465,7 +26505,7 @@
|
|
|
26465
26505
|
} = this.attribute.label;
|
|
26466
26506
|
dataFilter && isFunction$1(dataFilter) && (items = dataFilter(items, layer));
|
|
26467
26507
|
const data = this._transformItems(items),
|
|
26468
|
-
labelGroup = graphicCreator
|
|
26508
|
+
labelGroup = graphicCreator.group({
|
|
26469
26509
|
x: 0,
|
|
26470
26510
|
y: 0,
|
|
26471
26511
|
pickable: !1
|
|
@@ -26474,7 +26514,7 @@
|
|
|
26474
26514
|
var _a;
|
|
26475
26515
|
const labelStyle = this._getLabelAttribute(item, index, data, layer);
|
|
26476
26516
|
let text;
|
|
26477
|
-
if (text = isRichText(labelStyle) ? graphicCreator
|
|
26517
|
+
if (text = isRichText(labelStyle) ? graphicCreator.richtext(richTextAttributeTransform(labelStyle)) : graphicCreator.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.state)) text.states = DEFAULT_STATES$2;else {
|
|
26478
26518
|
const labelState = merge({}, DEFAULT_STATES$2, this.attribute.label.state);
|
|
26479
26519
|
Object.keys(labelState).forEach(key => {
|
|
26480
26520
|
isFunction$1(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
|
|
@@ -26489,7 +26529,7 @@
|
|
|
26489
26529
|
axisTitle.name = AXIS_ELEMENT_NAME.title, axisTitle.id = this._getNodeId("title"), container.add(axisTitle);
|
|
26490
26530
|
}
|
|
26491
26531
|
getVerticalCoord(point, offset, inside) {
|
|
26492
|
-
return getVerticalCoord
|
|
26532
|
+
return getVerticalCoord(point, this.getVerticalVector(offset, inside, point));
|
|
26493
26533
|
}
|
|
26494
26534
|
getTextAlign(vector) {
|
|
26495
26535
|
let align = "center";
|
|
@@ -26922,7 +26962,7 @@
|
|
|
26922
26962
|
axisVector = this.getRelativeVector(),
|
|
26923
26963
|
normalizedAxisVector = normalize$2(axisVector),
|
|
26924
26964
|
verticalVector = [normalizedAxisVector[1], -1 * normalizedAxisVector[0]];
|
|
26925
|
-
return scale
|
|
26965
|
+
return scale(verticalVector, offset * (inside ? 1 : -1) * verticalFactor);
|
|
26926
26966
|
}
|
|
26927
26967
|
}
|
|
26928
26968
|
|
|
@@ -26956,7 +26996,7 @@
|
|
|
26956
26996
|
if (panel && panel.visible) {
|
|
26957
26997
|
const axisContainer = this.axisContainer,
|
|
26958
26998
|
axisContainerBounds = axisContainer.AABBBounds,
|
|
26959
|
-
bgRect = graphicCreator
|
|
26999
|
+
bgRect = graphicCreator.rect(Object.assign({
|
|
26960
27000
|
x: axisContainerBounds.x1,
|
|
26961
27001
|
y: axisContainerBounds.y1,
|
|
26962
27002
|
width: axisContainerBounds.width(),
|
|
@@ -27238,7 +27278,7 @@
|
|
|
27238
27278
|
const minSize = this._getAxisLabelLimitLength(verticalMinSize, layerCount);
|
|
27239
27279
|
let x, y;
|
|
27240
27280
|
axisLabelContainerSize = Math.max(axisLabelContainerSize, minSize), "left" === orient ? (x = axisLabelContainerBounds.x2 - axisLabelContainerSize, y = axisLabelContainerBounds.y1) : "right" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1) : "top" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y2 - axisLabelContainerSize) : "bottom" === orient && (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1);
|
|
27241
|
-
const bgRect = graphicCreator
|
|
27281
|
+
const bgRect = graphicCreator.rect({
|
|
27242
27282
|
x: x,
|
|
27243
27283
|
y: y,
|
|
27244
27284
|
width: isHorizontal ? axisLabelContainerBounds.width() : axisLabelContainerSize,
|
|
@@ -27343,7 +27383,7 @@
|
|
|
27343
27383
|
this._current = defaultCurrent;
|
|
27344
27384
|
const parsedPadding = normalizePadding(padding),
|
|
27345
27385
|
isHorizontal = "horizontal" === layout,
|
|
27346
|
-
container = graphicCreator
|
|
27386
|
+
container = graphicCreator.group({
|
|
27347
27387
|
x: 0,
|
|
27348
27388
|
y: 0
|
|
27349
27389
|
}),
|
|
@@ -27356,7 +27396,7 @@
|
|
|
27356
27396
|
nextShape: nextShape
|
|
27357
27397
|
} = handler;
|
|
27358
27398
|
preShape || (preShape = isHorizontal ? "triangleLeft" : "triangleUp"), nextShape || (nextShape = isHorizontal ? "triangleRight" : "triangleDown");
|
|
27359
|
-
const preHandler = graphicCreator
|
|
27399
|
+
const preHandler = graphicCreator.symbol(Object.assign(Object.assign({
|
|
27360
27400
|
strokeBoundsBuffer: 0,
|
|
27361
27401
|
pickMode: "imprecise"
|
|
27362
27402
|
}, handlerStyle), {
|
|
@@ -27375,7 +27415,7 @@
|
|
|
27375
27415
|
}, textStyle), null === (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme()) || void 0 === _c ? void 0 : _c.text),
|
|
27376
27416
|
handlerSizeX = isNumber$4(handlerSize) ? handlerSize : handlerSize[0],
|
|
27377
27417
|
handlerSizeY = isNumber$4(handlerSize) ? handlerSize : handlerSize[1],
|
|
27378
|
-
text = graphicCreator
|
|
27418
|
+
text = graphicCreator.text(Object.assign({
|
|
27379
27419
|
x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
|
|
27380
27420
|
y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
|
|
27381
27421
|
text: this._getPageText(defaultCurrent),
|
|
@@ -27384,7 +27424,7 @@
|
|
|
27384
27424
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize
|
|
27385
27425
|
}, textStyle));
|
|
27386
27426
|
this.text = text, container.add(text);
|
|
27387
|
-
const nextHandler = graphicCreator
|
|
27427
|
+
const nextHandler = graphicCreator.symbol(Object.assign(Object.assign({
|
|
27388
27428
|
strokeBoundsBuffer: 0,
|
|
27389
27429
|
pickMode: "imprecise"
|
|
27390
27430
|
}, handlerStyle), {
|
|
@@ -27459,7 +27499,7 @@
|
|
|
27459
27499
|
padding = 0
|
|
27460
27500
|
} = this.attribute,
|
|
27461
27501
|
parsedPadding = normalizePadding(padding),
|
|
27462
|
-
innerView = graphicCreator
|
|
27502
|
+
innerView = graphicCreator.group({
|
|
27463
27503
|
x: parsedPadding[3],
|
|
27464
27504
|
y: parsedPadding[0],
|
|
27465
27505
|
pickable: interactive,
|
|
@@ -27653,7 +27693,7 @@
|
|
|
27653
27693
|
if (!1 === item.visible || isEmpty(items)) return;
|
|
27654
27694
|
let legendItems = items;
|
|
27655
27695
|
reversed && (legendItems = null == items ? void 0 : items.reverse());
|
|
27656
|
-
const itemsContainer = graphicCreator
|
|
27696
|
+
const itemsContainer = graphicCreator.group({
|
|
27657
27697
|
x: 0,
|
|
27658
27698
|
y: 0
|
|
27659
27699
|
});
|
|
@@ -27737,15 +27777,15 @@
|
|
|
27737
27777
|
backgroundStyle = this._handleStyle(background, item, isSelected, index, items),
|
|
27738
27778
|
parsedPadding = normalizePadding(padding);
|
|
27739
27779
|
let itemGroup;
|
|
27740
|
-
!1 === background.visible ? (itemGroup = graphicCreator
|
|
27780
|
+
!1 === background.visible ? (itemGroup = graphicCreator.group({
|
|
27741
27781
|
x: 0,
|
|
27742
27782
|
y: 0,
|
|
27743
27783
|
cursor: null === (_a = backgroundStyle.style) || void 0 === _a ? void 0 : _a.cursor
|
|
27744
|
-
}), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup)) : (itemGroup = graphicCreator
|
|
27784
|
+
}), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup)) : (itemGroup = graphicCreator.group(Object.assign({
|
|
27745
27785
|
x: 0,
|
|
27746
27786
|
y: 0
|
|
27747
27787
|
}, backgroundStyle.style)), this._appendDataToShape(itemGroup, LEGEND_ELEMENT_NAME.item, item, itemGroup, backgroundStyle.state)), itemGroup.id = `${null != id ? id : label}-${index}`, itemGroup.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected);
|
|
27748
|
-
const innerGroup = graphicCreator
|
|
27788
|
+
const innerGroup = graphicCreator.group({
|
|
27749
27789
|
x: 0,
|
|
27750
27790
|
y: 0,
|
|
27751
27791
|
pickable: !1
|
|
@@ -27758,7 +27798,7 @@
|
|
|
27758
27798
|
if (shapeAttr && !1 !== shapeAttr.visible) {
|
|
27759
27799
|
const s = get$5(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE);
|
|
27760
27800
|
shapeSize = isArray$3(s) ? s[0] || 0 : s, shapeSpace = get$5(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
|
|
27761
|
-
const itemShape = graphicCreator
|
|
27801
|
+
const itemShape = graphicCreator.symbol(Object.assign(Object.assign({
|
|
27762
27802
|
x: 0,
|
|
27763
27803
|
y: 0,
|
|
27764
27804
|
symbolType: "circle",
|
|
@@ -27773,7 +27813,7 @@
|
|
|
27773
27813
|
focusSpace = 0;
|
|
27774
27814
|
if (focus) {
|
|
27775
27815
|
const focusSize = get$5(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
|
|
27776
|
-
focusShape = graphicCreator
|
|
27816
|
+
focusShape = graphicCreator.symbol(Object.assign(Object.assign({
|
|
27777
27817
|
x: 0,
|
|
27778
27818
|
y: -focusSize / 2 - 1,
|
|
27779
27819
|
strokeBoundsBuffer: 0
|
|
@@ -27793,7 +27833,7 @@
|
|
|
27793
27833
|
}, labelStyle.style), {
|
|
27794
27834
|
text: text
|
|
27795
27835
|
});
|
|
27796
|
-
labelShape = isRichText(labelAttributes) ? graphicCreator
|
|
27836
|
+
labelShape = isRichText(labelAttributes) ? graphicCreator.richtext(richTextAttributeTransform(labelAttributes)) : graphicCreator.text(labelAttributes), this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
|
|
27797
27837
|
const labelSpace = get$5(labelAttr, "space", DEFAULT_LABEL_SPACE);
|
|
27798
27838
|
if (isValid$3(value)) {
|
|
27799
27839
|
const valueSpace = get$5(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
|
|
@@ -27808,7 +27848,7 @@
|
|
|
27808
27848
|
text: valueText
|
|
27809
27849
|
});
|
|
27810
27850
|
let valueShape;
|
|
27811
|
-
if (valueShape = isRichText(valueAttributes) ? graphicCreator
|
|
27851
|
+
if (valueShape = isRichText(valueAttributes) ? graphicCreator.richtext(richTextAttributeTransform(valueAttributes)) : graphicCreator.text(valueAttributes), this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state), valueShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), this._itemWidthByUser) {
|
|
27812
27852
|
const layoutWidth = this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - labelSpace - focusSpace - valueSpace;
|
|
27813
27853
|
this._autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape), valueAttr.alignRight ? valueShape.setAttributes({
|
|
27814
27854
|
textAlign: "right",
|
|
@@ -28006,7 +28046,7 @@
|
|
|
28006
28046
|
this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
|
|
28007
28047
|
}
|
|
28008
28048
|
defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (compHeight + spaceRow)) : itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (compWidth + spaceCol)));
|
|
28009
|
-
const clipGroup = graphicCreator
|
|
28049
|
+
const clipGroup = graphicCreator.group({
|
|
28010
28050
|
x: 0,
|
|
28011
28051
|
y: renderStartY,
|
|
28012
28052
|
width: isHorizontal ? contentWidth : compWidth,
|
|
@@ -28053,7 +28093,7 @@
|
|
|
28053
28093
|
}), this._itemContext.totalPage = pages, this._itemContext.pages = pages, this._updatePositionOfScrollbar(contentWidth, contentHeight, renderStartY);
|
|
28054
28094
|
}
|
|
28055
28095
|
defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (contentWidth + spaceCol)) : itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (contentHeight + spaceRow)));
|
|
28056
|
-
const clipGroup = graphicCreator
|
|
28096
|
+
const clipGroup = graphicCreator.group({
|
|
28057
28097
|
x: 0,
|
|
28058
28098
|
y: renderStartY,
|
|
28059
28099
|
width: contentWidth,
|
|
@@ -29372,7 +29412,7 @@
|
|
|
29372
29412
|
};
|
|
29373
29413
|
const isHorizontal = "horizontal" === layout;
|
|
29374
29414
|
this._isHorizontal = isHorizontal;
|
|
29375
|
-
const innerView = graphicCreator
|
|
29415
|
+
const innerView = graphicCreator.group({
|
|
29376
29416
|
x: 0,
|
|
29377
29417
|
y: 0
|
|
29378
29418
|
});
|
|
@@ -29380,7 +29420,7 @@
|
|
|
29380
29420
|
let startTextShape,
|
|
29381
29421
|
startLen = 0;
|
|
29382
29422
|
if (startText && startText.visible) {
|
|
29383
|
-
startTextShape = graphicCreator
|
|
29423
|
+
startTextShape = graphicCreator.text(Object.assign({
|
|
29384
29424
|
x: isHorizontal ? 0 : railWidth / 2,
|
|
29385
29425
|
y: isHorizontal ? railHeight / 2 : 0,
|
|
29386
29426
|
textAlign: isHorizontal ? "start" : "center",
|
|
@@ -29391,19 +29431,19 @@
|
|
|
29391
29431
|
const space = isValid$3(startText.space) ? startText.space : 0;
|
|
29392
29432
|
startLen += (isHorizontal ? startTextShape.AABBBounds.width() : startTextShape.AABBBounds.height()) + space;
|
|
29393
29433
|
}
|
|
29394
|
-
const mainContainer = graphicCreator
|
|
29434
|
+
const mainContainer = graphicCreator.group({
|
|
29395
29435
|
x: isHorizontal ? startLen : 0,
|
|
29396
29436
|
y: isHorizontal ? 0 : startLen
|
|
29397
29437
|
});
|
|
29398
29438
|
innerView.add(mainContainer);
|
|
29399
|
-
const railContainer = graphicCreator
|
|
29439
|
+
const railContainer = graphicCreator.group({
|
|
29400
29440
|
x: 0,
|
|
29401
29441
|
y: 0
|
|
29402
29442
|
});
|
|
29403
29443
|
let endTextShape;
|
|
29404
29444
|
if (railContainer.name = SLIDER_ELEMENT_NAME.railContainer, this._railContainer = railContainer, mainContainer.add(railContainer), this._mainContainer = mainContainer, this._renderRail(railContainer), startLen += isHorizontal ? railWidth : railHeight, endText && endText.visible) {
|
|
29405
29445
|
const space = isValid$3(endText.space) ? endText.space : 0;
|
|
29406
|
-
endTextShape = graphicCreator
|
|
29446
|
+
endTextShape = graphicCreator.text(Object.assign({
|
|
29407
29447
|
x: isHorizontal ? startLen + space : railWidth / 2,
|
|
29408
29448
|
y: isHorizontal ? railHeight / 2 : startLen + space,
|
|
29409
29449
|
textAlign: isHorizontal ? "start" : "center",
|
|
@@ -29423,7 +29463,7 @@
|
|
|
29423
29463
|
} = this.attribute;
|
|
29424
29464
|
let cursor = "default";
|
|
29425
29465
|
!1 !== slidable && (cursor = "pointer");
|
|
29426
|
-
const railShape = graphicCreator
|
|
29466
|
+
const railShape = graphicCreator.rect(Object.assign({
|
|
29427
29467
|
x: 0,
|
|
29428
29468
|
y: 0,
|
|
29429
29469
|
width: railWidth,
|
|
@@ -29497,7 +29537,7 @@
|
|
|
29497
29537
|
} else startValue = min, endValue = clamp$3(value, min, max);
|
|
29498
29538
|
const isHorizontal = this._isHorizontal;
|
|
29499
29539
|
range || (startValue = min);
|
|
29500
|
-
const trackContainer = graphicCreator
|
|
29540
|
+
const trackContainer = graphicCreator.group({
|
|
29501
29541
|
x: 0,
|
|
29502
29542
|
y: 0,
|
|
29503
29543
|
width: railWidth,
|
|
@@ -29512,7 +29552,7 @@
|
|
|
29512
29552
|
cursor = !1 === slidable ? "default" : !1 === range || !1 === draggableTrack ? "pointer" : getDefaultCursor(isHorizontal);
|
|
29513
29553
|
const startPos = this.calculatePosByValue(startValue, "start"),
|
|
29514
29554
|
endPos = this.calculatePosByValue(endValue, range ? "end" : "start"),
|
|
29515
|
-
track = graphicCreator
|
|
29555
|
+
track = graphicCreator.rect(Object.assign({
|
|
29516
29556
|
x: isHorizontal ? Math.min(startPos, endPos) : 0,
|
|
29517
29557
|
y: isHorizontal ? 0 : Math.min(startPos, endPos),
|
|
29518
29558
|
width: isHorizontal ? Math.abs(endPos - startPos) : railWidth,
|
|
@@ -29522,7 +29562,7 @@
|
|
|
29522
29562
|
track.name = SLIDER_ELEMENT_NAME.track, this._track = track, trackContainer.add(track), container.add(trackContainer);
|
|
29523
29563
|
}
|
|
29524
29564
|
_renderHandler(style) {
|
|
29525
|
-
return graphicCreator
|
|
29565
|
+
return graphicCreator.symbol(style);
|
|
29526
29566
|
}
|
|
29527
29567
|
_renderHandlerText(value, position) {
|
|
29528
29568
|
var _a, _b, _c;
|
|
@@ -29543,7 +29583,7 @@
|
|
|
29543
29583
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
29544
29584
|
};
|
|
29545
29585
|
isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
|
|
29546
|
-
return graphicCreator
|
|
29586
|
+
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
29547
29587
|
}
|
|
29548
29588
|
_renderTooltip() {
|
|
29549
29589
|
var _a;
|
|
@@ -29560,7 +29600,7 @@
|
|
|
29560
29600
|
const cx = this._isHorizontal ? 0 : railWidth / 2,
|
|
29561
29601
|
cy = this._isHorizontal ? railHeight / 2 : 0;
|
|
29562
29602
|
if (tooltip && tooltip.shape) {
|
|
29563
|
-
const shape = graphicCreator
|
|
29603
|
+
const shape = graphicCreator.symbol(Object.assign({
|
|
29564
29604
|
pickable: !1,
|
|
29565
29605
|
visible: !!this._tooltipState,
|
|
29566
29606
|
x: cx,
|
|
@@ -29577,7 +29617,7 @@
|
|
|
29577
29617
|
text: ""
|
|
29578
29618
|
};
|
|
29579
29619
|
this._isHorizontal ? (textStyle.x = cx, textStyle.y = "top" === align ? cy - railHeight / 2 - space : cy + railHeight / 2 + space, textStyle.textAlign = "center", textStyle.textBaseline = "top" === align ? "bottom" : "top") : (textStyle.y = cy, textStyle.x = "left" === align ? cx - railWidth / 2 - space : cy + railWidth / 2 + space, textStyle.textAlign = "left" === align ? "end" : "start", textStyle.textBaseline = "middle");
|
|
29580
|
-
const text = graphicCreator
|
|
29620
|
+
const text = graphicCreator.text(Object.assign(Object.assign({}, textStyle), textConfig.style));
|
|
29581
29621
|
this._mainContainer.add(text), this._tooltipText = text, this._tooltipState && this._updateTooltip();
|
|
29582
29622
|
}
|
|
29583
29623
|
_updateTooltip() {
|
|
@@ -30007,7 +30047,7 @@
|
|
|
30007
30047
|
disableTriggerEvent: disableTriggerEvent,
|
|
30008
30048
|
inverse: inverse
|
|
30009
30049
|
} = this.attribute,
|
|
30010
|
-
mainContainer = graphicCreator
|
|
30050
|
+
mainContainer = graphicCreator.group({
|
|
30011
30051
|
x: 0,
|
|
30012
30052
|
y: 0
|
|
30013
30053
|
});
|
|
@@ -30046,7 +30086,7 @@
|
|
|
30046
30086
|
let path,
|
|
30047
30087
|
start = 0;
|
|
30048
30088
|
"horizontal" === layout ? "top" === align ? (path = `M0,0L${railWidth},0L${inverse ? 0 : railWidth},12Z`, start = railHeight) : (path = `M0,12L${railWidth},12L${inverse ? 0 : railWidth},0Z`, slider.setAttribute("y", 12)) : "left" === align ? path = `M${railWidth},0L${railWidth + 12},${inverse ? 0 : railHeight}L${railWidth},${railHeight}Z` : (path = `M0,${inverse ? 0 : railHeight}L12,${railHeight}L12,0Z`, slider.setAttribute("x", 12));
|
|
30049
|
-
const background = graphicCreator
|
|
30089
|
+
const background = graphicCreator.path(Object.assign(Object.assign({
|
|
30050
30090
|
x: 0,
|
|
30051
30091
|
y: start,
|
|
30052
30092
|
path: path
|
|
@@ -32049,25 +32089,6 @@
|
|
|
32049
32089
|
|
|
32050
32090
|
const DEFAULT_CONTINUOUS_TICK_COUNT$1 = 5;
|
|
32051
32091
|
|
|
32052
|
-
class GraphicCreator {
|
|
32053
|
-
constructor() {
|
|
32054
|
-
this.store = new Map();
|
|
32055
|
-
}
|
|
32056
|
-
RegisterGraphicCreator(name, cb) {
|
|
32057
|
-
this.store.set(name, cb), this[name] = cb;
|
|
32058
|
-
}
|
|
32059
|
-
CreateGraphic(name, params) {
|
|
32060
|
-
const cb = this.store.get(name);
|
|
32061
|
-
return cb ? cb(params) : null;
|
|
32062
|
-
}
|
|
32063
|
-
}
|
|
32064
|
-
const graphicCreator = new GraphicCreator();
|
|
32065
|
-
|
|
32066
|
-
let text;
|
|
32067
|
-
function getTextBounds(params) {
|
|
32068
|
-
return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
|
|
32069
|
-
}
|
|
32070
|
-
|
|
32071
32092
|
const initTextMeasure$1 = (textSpec, option, useNaiveCanvas, defaultFontParams) => new TextMeasure(Object.assign({
|
|
32072
32093
|
defaultFontParams: Object.assign({
|
|
32073
32094
|
fontFamily: "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
|
|
@@ -32077,57 +32098,6 @@
|
|
|
32077
32098
|
specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
|
|
32078
32099
|
}, null != option ? option : {}), textSpec);
|
|
32079
32100
|
|
|
32080
|
-
function scale(vector, scale) {
|
|
32081
|
-
return [vector[0] * scale, vector[1] * scale];
|
|
32082
|
-
}
|
|
32083
|
-
function length(vector) {
|
|
32084
|
-
const [x, y] = vector;
|
|
32085
|
-
return Math.sqrt(x * x + y * y);
|
|
32086
|
-
}
|
|
32087
|
-
|
|
32088
|
-
const clampRadian = function () {
|
|
32089
|
-
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
32090
|
-
if (angle < 0) for (; angle < 0;) angle += tau;else if (angle > 0) for (; angle > tau;) angle -= tau;
|
|
32091
|
-
return angle;
|
|
32092
|
-
};
|
|
32093
|
-
function isInRange(a, min, max) {
|
|
32094
|
-
return !isLess(a, min, 0, 1e-6) && !isGreater(a, max, 0, 1e-6);
|
|
32095
|
-
}
|
|
32096
|
-
function getCircleLabelPosition(tickPosition, tickVector, text, style) {
|
|
32097
|
-
const labelBounds = getTextBounds(Object.assign({
|
|
32098
|
-
text: text
|
|
32099
|
-
}, style)),
|
|
32100
|
-
width = labelBounds.width(),
|
|
32101
|
-
height = labelBounds.height(),
|
|
32102
|
-
angle = clampRadian(Math.atan2(tickVector[1], tickVector[0])) - Math.PI,
|
|
32103
|
-
PI_3_4 = 3 * Math.PI / 4,
|
|
32104
|
-
PI_1_4 = Math.PI / 4,
|
|
32105
|
-
PI_1_2 = Math.PI / 2,
|
|
32106
|
-
baseX = tickPosition.x;
|
|
32107
|
-
let dx = 0;
|
|
32108
|
-
dx = isInRange(angle, -PI_3_4, -PI_1_4) ? ((angle + PI_3_4) / PI_1_2 - .5) * width : isInRange(angle, PI_1_4, PI_3_4) ? (.5 - (angle - PI_1_4) / PI_1_2) * width : Math.cos(angle) >= 0 ? .5 * width : .5 * -width;
|
|
32109
|
-
const x = baseX - dx,
|
|
32110
|
-
baseY = tickPosition.y;
|
|
32111
|
-
let dy = 0;
|
|
32112
|
-
dy = isInRange(angle, -PI_3_4, -PI_1_4) ? .5 * -height : isInRange(angle, PI_1_4, PI_3_4) ? .5 * height : Math.cos(angle) >= 0 ? (.5 - (PI_1_4 - angle) / PI_1_2) * height : (.5 - clampRadian(angle - PI_3_4) / PI_1_2) * height;
|
|
32113
|
-
return {
|
|
32114
|
-
x: x,
|
|
32115
|
-
y: baseY - dy
|
|
32116
|
-
};
|
|
32117
|
-
}
|
|
32118
|
-
function getVerticalCoord(point, vector) {
|
|
32119
|
-
return {
|
|
32120
|
-
x: point.x + vector[0],
|
|
32121
|
-
y: point.y + vector[1]
|
|
32122
|
-
};
|
|
32123
|
-
}
|
|
32124
|
-
function getCircleVerticalVector(offset, point, center) {
|
|
32125
|
-
let inside = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
32126
|
-
let axisInside = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
32127
|
-
const vector = [point.x - center.x, point.y - center.y];
|
|
32128
|
-
return scale(vector, (inside ? -1 : 1) * (axisInside ? -1 : 1) * offset / length(vector));
|
|
32129
|
-
}
|
|
32130
|
-
|
|
32131
32101
|
function getLabelPosition(angle, center, radius, labelOffset, inside, text, style) {
|
|
32132
32102
|
const point = polarToCartesian({
|
|
32133
32103
|
x: 0,
|
|
@@ -35714,6 +35684,7 @@
|
|
|
35714
35684
|
case 'line':
|
|
35715
35685
|
const line = createLine({
|
|
35716
35686
|
points: element.points,
|
|
35687
|
+
lineWidth: element.lineWidth ?? 1,
|
|
35717
35688
|
stroke: element.stroke,
|
|
35718
35689
|
pickable: !!element.pickable,
|
|
35719
35690
|
cursor: element.cursor
|
|
@@ -40585,7 +40556,7 @@
|
|
|
40585
40556
|
fontFamily: DefaultTextStyle.fontFamily,
|
|
40586
40557
|
fontSize: DefaultTextStyle.fontSize
|
|
40587
40558
|
},
|
|
40588
|
-
getTextBounds: useNaiveCanvas ? undefined : getTextBounds
|
|
40559
|
+
getTextBounds: useNaiveCanvas ? undefined : getTextBounds,
|
|
40589
40560
|
specialCharSet: `{}()//&-/: .,@%'"~…=${TextMeasure.ALPHABET_CHAR_SET}${TextMeasure.ALPHABET_CHAR_SET.toUpperCase()}0123456789${customAlphabetCharSet}`,
|
|
40590
40561
|
...(option ?? {})
|
|
40591
40562
|
}, textSpec);
|
|
@@ -43913,6 +43884,7 @@
|
|
|
43913
43884
|
Array.isArray(strokeArrayWidth)) {
|
|
43914
43885
|
return;
|
|
43915
43886
|
}
|
|
43887
|
+
const splitLineDash = isArray$3(lineDash[0]) ? getQuadLineDash(lineDash) : [lineDash, lineDash, lineDash, lineDash];
|
|
43916
43888
|
let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;
|
|
43917
43889
|
width = Math.ceil(width);
|
|
43918
43890
|
height = Math.ceil(height);
|
|
@@ -43957,25 +43929,25 @@
|
|
|
43957
43929
|
context.moveTo(x, y);
|
|
43958
43930
|
context.lineTo(x + widthForStroke, y);
|
|
43959
43931
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43960
|
-
context.setLineDash(
|
|
43932
|
+
context.setLineDash(splitLineDash[0] ?? []);
|
|
43961
43933
|
context.stroke();
|
|
43962
43934
|
context.beginPath();
|
|
43963
43935
|
context.moveTo(x + widthForStroke, y);
|
|
43964
43936
|
context.lineTo(x + widthForStroke, y + heightForStroke);
|
|
43965
43937
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43966
|
-
context.setLineDash(
|
|
43938
|
+
context.setLineDash(splitLineDash[1] ?? []);
|
|
43967
43939
|
context.stroke();
|
|
43968
43940
|
context.beginPath();
|
|
43969
43941
|
context.moveTo(x, y + heightForStroke);
|
|
43970
43942
|
context.lineTo(x + widthForStroke, y + heightForStroke);
|
|
43971
43943
|
context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;
|
|
43972
|
-
context.setLineDash(
|
|
43944
|
+
context.setLineDash(splitLineDash[2] ?? []);
|
|
43973
43945
|
context.stroke();
|
|
43974
43946
|
context.beginPath();
|
|
43975
43947
|
context.moveTo(x, y);
|
|
43976
43948
|
context.lineTo(x, y + heightForStroke);
|
|
43977
43949
|
context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;
|
|
43978
|
-
context.setLineDash(
|
|
43950
|
+
context.setLineDash(splitLineDash[3] ?? []);
|
|
43979
43951
|
context.stroke();
|
|
43980
43952
|
context.lineDashOffset = 0;
|
|
43981
43953
|
context.setLineDash([]);
|
|
@@ -44229,6 +44201,15 @@
|
|
|
44229
44201
|
}
|
|
44230
44202
|
return { width, height };
|
|
44231
44203
|
}
|
|
44204
|
+
function getQuadLineDash(lineDash) {
|
|
44205
|
+
if (lineDash.length === 1) {
|
|
44206
|
+
return [lineDash[0], lineDash[0], lineDash[0], lineDash[0]];
|
|
44207
|
+
}
|
|
44208
|
+
else if (lineDash.length === 2) {
|
|
44209
|
+
return [lineDash[0], lineDash[1], lineDash[0], lineDash[1]];
|
|
44210
|
+
}
|
|
44211
|
+
return lineDash;
|
|
44212
|
+
}
|
|
44232
44213
|
|
|
44233
44214
|
let SplitRectBeforeRenderContribution = class SplitRectBeforeRenderContribution {
|
|
44234
44215
|
time = BaseRenderContributionTime.beforeFillStroke;
|
|
@@ -46031,7 +46012,7 @@
|
|
|
46031
46012
|
if (cellTop < minTop || cellBottom > maxTop) {
|
|
46032
46013
|
const visibleCellTop = Math.max(cellTop, minTop);
|
|
46033
46014
|
const visibleCellBottom = Math.min(cellBottom, maxTop);
|
|
46034
|
-
const delta = graphic.globalTransMatrix.f - (visibleCellBottom + visibleCellTop) / 2;
|
|
46015
|
+
const delta = graphic.globalTransMatrix.f - (visibleCellBottom + visibleCellTop) / 2 + graphic.AABBBounds.height() / 2;
|
|
46035
46016
|
!changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&
|
|
46036
46017
|
changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {
|
|
46037
46018
|
col: cellGroup.col,
|
|
@@ -53772,7 +53753,7 @@
|
|
|
53772
53753
|
table.selectCell(targetCol, targetRow);
|
|
53773
53754
|
if ((table.options.keyboardOptions?.moveEditCellOnArrowKeys ?? false) &&
|
|
53774
53755
|
table.editorManager.editingEditor) {
|
|
53775
|
-
table.editorManager.completeEdit(
|
|
53756
|
+
table.editorManager.completeEdit();
|
|
53776
53757
|
table.getElement().focus();
|
|
53777
53758
|
if (table.getEditor(targetCol, targetRow)) {
|
|
53778
53759
|
table.editorManager.startEditCell(targetCol, targetRow);
|
|
@@ -53784,7 +53765,7 @@
|
|
|
53784
53765
|
}
|
|
53785
53766
|
else if (e.key === 'Enter') {
|
|
53786
53767
|
if (table.editorManager.editingEditor) {
|
|
53787
|
-
table.editorManager.completeEdit(
|
|
53768
|
+
table.editorManager.completeEdit();
|
|
53788
53769
|
table.getElement().focus();
|
|
53789
53770
|
}
|
|
53790
53771
|
else {
|
|
@@ -53822,7 +53803,7 @@
|
|
|
53822
53803
|
}
|
|
53823
53804
|
table.selectCell(targetCol, targetRow);
|
|
53824
53805
|
if (table.editorManager.editingEditor) {
|
|
53825
|
-
table.editorManager.completeEdit(
|
|
53806
|
+
table.editorManager.completeEdit();
|
|
53826
53807
|
table.getElement().focus();
|
|
53827
53808
|
if (table.getEditor(targetCol, targetRow)) {
|
|
53828
53809
|
table.editorManager.startEditCell(targetCol, targetRow);
|
|
@@ -53862,7 +53843,7 @@
|
|
|
53862
53843
|
}
|
|
53863
53844
|
cells.forEach(function (cell, cellIndex) {
|
|
53864
53845
|
const parsedCellData = !cell
|
|
53865
|
-
? ''
|
|
53846
|
+
? ' '
|
|
53866
53847
|
: cell
|
|
53867
53848
|
.toString()
|
|
53868
53849
|
.replace(/&/g, '&')
|
|
@@ -53878,7 +53859,7 @@
|
|
|
53878
53859
|
rowValues.push(`<td>${parsedCellData}</td>`);
|
|
53879
53860
|
});
|
|
53880
53861
|
result.push('<tr>', ...rowValues, '</tr>');
|
|
53881
|
-
if (rowIndex ===
|
|
53862
|
+
if (rowIndex === rows.length - 1) {
|
|
53882
53863
|
result.push('</tbody>');
|
|
53883
53864
|
}
|
|
53884
53865
|
});
|
|
@@ -58090,7 +58071,7 @@
|
|
|
58090
58071
|
return TABLE_EVENT_TYPE;
|
|
58091
58072
|
}
|
|
58092
58073
|
options;
|
|
58093
|
-
version = "0.25.
|
|
58074
|
+
version = "0.25.2";
|
|
58094
58075
|
pagination;
|
|
58095
58076
|
id = `VTable${Date.now()}`;
|
|
58096
58077
|
headerStyleCache;
|
|
@@ -70489,6 +70470,7 @@
|
|
|
70489
70470
|
GroupElement: GroupElement,
|
|
70490
70471
|
Icon: Icon,
|
|
70491
70472
|
Image: Image$1,
|
|
70473
|
+
Line: Line$1,
|
|
70492
70474
|
Radio: Radio,
|
|
70493
70475
|
Rect: Rect,
|
|
70494
70476
|
Tag: Tag,
|
|
@@ -70752,7 +70734,7 @@
|
|
|
70752
70734
|
}
|
|
70753
70735
|
|
|
70754
70736
|
registerForVrender();
|
|
70755
|
-
const version = "0.25.
|
|
70737
|
+
const version = "0.25.2";
|
|
70756
70738
|
function getIcons() {
|
|
70757
70739
|
return get$2();
|
|
70758
70740
|
}
|