@visactor/vtable 0.18.4 → 0.18.5-alpha.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/cjs/core/BaseTable.js +4 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/icons.js +10 -0
- package/cjs/icons.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/scenegraph/graphic/contributions/draw-interceptor.d.ts +13 -0
- package/cjs/scenegraph/graphic/contributions/draw-interceptor.js +90 -0
- package/cjs/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/index.js +4 -2
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +38 -18
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +5 -5
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/keep-aspect-ratio.js +5 -4
- package/cjs/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/cjs/state/select/update-position.js +10 -1
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +526 -305
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +5 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/icons.js +10 -0
- package/es/icons.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/scenegraph/graphic/contributions/draw-interceptor.d.ts +13 -0
- package/es/scenegraph/graphic/contributions/draw-interceptor.js +64 -0
- package/es/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -0
- package/es/scenegraph/graphic/contributions/index.js +5 -2
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +35 -17
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +5 -5
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/keep-aspect-ratio.js +5 -4
- package/es/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/es/state/select/update-position.js +10 -1
- package/es/state/select/update-position.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -1329,14 +1329,14 @@
|
|
|
1329
1329
|
const isDate = value => isType$1(value, "Date");
|
|
1330
1330
|
var isDate$1 = isDate;
|
|
1331
1331
|
|
|
1332
|
-
const isNumber$
|
|
1332
|
+
const isNumber$1 = function (value) {
|
|
1333
1333
|
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
1334
1334
|
const type = typeof value;
|
|
1335
1335
|
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
1336
1336
|
};
|
|
1337
|
-
var isNumber$
|
|
1337
|
+
var isNumber$2 = isNumber$1;
|
|
1338
1338
|
|
|
1339
|
-
const isValidNumber = value => isNumber$
|
|
1339
|
+
const isValidNumber = value => isNumber$2(value) && Number.isFinite(value);
|
|
1340
1340
|
var isValidNumber$1 = isValidNumber;
|
|
1341
1341
|
|
|
1342
1342
|
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
@@ -1382,7 +1382,7 @@
|
|
|
1382
1382
|
if (!isValid$1(value) || "object" != typeof value) return value;
|
|
1383
1383
|
const isArr = isArray$1(value),
|
|
1384
1384
|
length = value.length;
|
|
1385
|
-
result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$
|
|
1385
|
+
result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$2(value) || isString$2(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
|
|
1386
1386
|
const props = isArr ? void 0 : Object.keys(Object(value));
|
|
1387
1387
|
let index = -1;
|
|
1388
1388
|
if (result) for (; ++index < (props || value).length;) {
|
|
@@ -1767,10 +1767,10 @@
|
|
|
1767
1767
|
return this.x = x, this.y = y, this;
|
|
1768
1768
|
}
|
|
1769
1769
|
add(point) {
|
|
1770
|
-
return isNumber$
|
|
1770
|
+
return isNumber$2(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
1771
1771
|
}
|
|
1772
1772
|
sub(point) {
|
|
1773
|
-
return isNumber$
|
|
1773
|
+
return isNumber$2(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
1774
1774
|
}
|
|
1775
1775
|
multi(point) {
|
|
1776
1776
|
throw new Error("暂不支持");
|
|
@@ -2357,10 +2357,10 @@
|
|
|
2357
2357
|
return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
|
|
2358
2358
|
}
|
|
2359
2359
|
function rgb(value) {
|
|
2360
|
-
return isNumber$
|
|
2360
|
+
return isNumber$2(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
|
|
2361
2361
|
}
|
|
2362
2362
|
function rgba(value) {
|
|
2363
|
-
return isNumber$
|
|
2363
|
+
return isNumber$2(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
|
|
2364
2364
|
}
|
|
2365
2365
|
function SRGBToLinear(c) {
|
|
2366
2366
|
return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
|
|
@@ -2929,7 +2929,7 @@
|
|
|
2929
2929
|
}(LoggerLevel || (LoggerLevel = {}));
|
|
2930
2930
|
class Logger {
|
|
2931
2931
|
static getInstance(level, method) {
|
|
2932
|
-
return Logger._instance && isNumber$
|
|
2932
|
+
return Logger._instance && isNumber$2(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
|
|
2933
2933
|
}
|
|
2934
2934
|
static setInstance(logger) {
|
|
2935
2935
|
return Logger._instance = logger;
|
|
@@ -4726,9 +4726,6 @@
|
|
|
4726
4726
|
function wrapCanvas(params) {
|
|
4727
4727
|
return container.getNamed(CanvasFactory, application.global.env)(params);
|
|
4728
4728
|
}
|
|
4729
|
-
function isNumber$1(data) {
|
|
4730
|
-
return "number" == typeof data && Number.isFinite(data);
|
|
4731
|
-
}
|
|
4732
4729
|
|
|
4733
4730
|
class DefaultCanvasAllocate {
|
|
4734
4731
|
constructor() {
|
|
@@ -5154,7 +5151,7 @@
|
|
|
5154
5151
|
}
|
|
5155
5152
|
const globalTheme = new Theme();
|
|
5156
5153
|
function getTheme(graphic, theme) {
|
|
5157
|
-
return graphic.glyphHost ? getTheme(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || globalTheme.getTheme();
|
|
5154
|
+
return graphic.glyphHost ? getTheme(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || graphic.attachedThemeGraphic && getTheme(graphic.attachedThemeGraphic) || globalTheme.getTheme();
|
|
5158
5155
|
}
|
|
5159
5156
|
function getThemeFromGroup(graphic) {
|
|
5160
5157
|
let g;
|
|
@@ -5324,7 +5321,7 @@
|
|
|
5324
5321
|
let child = this._firstChild;
|
|
5325
5322
|
for (; child;) {
|
|
5326
5323
|
const next = child._next;
|
|
5327
|
-
child.parent = null, child._prev = null, child._next = null, child = next;
|
|
5324
|
+
child.parent = null, child._prev = null, child._next = null, child = child._next, child = next;
|
|
5328
5325
|
}
|
|
5329
5326
|
this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
|
|
5330
5327
|
}
|
|
@@ -7236,7 +7233,7 @@
|
|
|
7236
7233
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
7237
7234
|
application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
7238
7235
|
const bounds = this.doUpdateAABBBounds(full);
|
|
7239
|
-
return
|
|
7236
|
+
return application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), bounds;
|
|
7240
7237
|
}
|
|
7241
7238
|
combindShadowAABBBounds(bounds) {
|
|
7242
7239
|
if (this.shadowRoot) {
|
|
@@ -9534,7 +9531,7 @@
|
|
|
9534
9531
|
|
|
9535
9532
|
class BaseSymbol {
|
|
9536
9533
|
bounds(size, bounds) {
|
|
9537
|
-
if (isNumber$
|
|
9534
|
+
if (isNumber$2(size)) {
|
|
9538
9535
|
const halfS = size / 2;
|
|
9539
9536
|
bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
|
|
9540
9537
|
} else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
|
|
@@ -9965,10 +9962,10 @@
|
|
|
9965
9962
|
super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
|
|
9966
9963
|
}
|
|
9967
9964
|
draw(ctx, size, x, y) {
|
|
9968
|
-
return isNumber$
|
|
9965
|
+
return isNumber$2(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
|
|
9969
9966
|
}
|
|
9970
9967
|
drawOffset(ctx, size, x, y, offset) {
|
|
9971
|
-
return isNumber$
|
|
9968
|
+
return isNumber$2(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
|
|
9972
9969
|
}
|
|
9973
9970
|
}
|
|
9974
9971
|
var rect = new RectSymbol();
|
|
@@ -10446,16 +10443,7 @@
|
|
|
10446
10443
|
deltaY = -height;
|
|
10447
10444
|
}
|
|
10448
10445
|
let deltaX = 0;
|
|
10449
|
-
|
|
10450
|
-
case "left":
|
|
10451
|
-
deltaX = 0;
|
|
10452
|
-
break;
|
|
10453
|
-
case "center":
|
|
10454
|
-
deltaX = -width / 2;
|
|
10455
|
-
break;
|
|
10456
|
-
case "right":
|
|
10457
|
-
deltaX = -width;
|
|
10458
|
-
}
|
|
10446
|
+
"right" === this.globalAlign || "end" === this.globalAlign ? deltaX = -width : "center" === this.globalAlign && (deltaX = -width / 2);
|
|
10459
10447
|
let frameHeight = this[this.directionKey.height];
|
|
10460
10448
|
this.singleLine && (frameHeight = this.lines[0].height + 1);
|
|
10461
10449
|
let lastLineTag = !1;
|
|
@@ -10604,9 +10592,9 @@
|
|
|
10604
10592
|
let direction = this.direction;
|
|
10605
10593
|
if (this.verticalEllipsis) text = "...", direction = "vertical", baseline -= this.ellipsisWidth / 2;else {
|
|
10606
10594
|
if ("hide" === this.ellipsis) return;
|
|
10607
|
-
if ("add" === this.ellipsis) text += "...", "right"
|
|
10595
|
+
if ("add" === this.ellipsis) text += "...", "right" !== textAlign && "end" !== textAlign || (left -= this.ellipsisWidth);else if ("replace" === this.ellipsis) {
|
|
10608
10596
|
const index = getStrByWithCanvas(text, ("vertical" === direction ? this.height : this.width) - this.ellipsisWidth + this.ellipsisOtherParagraphWidth, this.character, text.length - 1);
|
|
10609
|
-
if (text = text.slice(0, index), text += "...", "right" === textAlign) {
|
|
10597
|
+
if (text = text.slice(0, index), text += "...", "right" === textAlign || "end" === textAlign) {
|
|
10610
10598
|
const {
|
|
10611
10599
|
width: width
|
|
10612
10600
|
} = measureTextCanvas(this.text.slice(index), this.character);
|
|
@@ -10797,17 +10785,7 @@
|
|
|
10797
10785
|
maxHeight = this.height;
|
|
10798
10786
|
let x = this.left,
|
|
10799
10787
|
spacing = 0;
|
|
10800
|
-
|
|
10801
|
-
case "right":
|
|
10802
|
-
x = width - this.actualWidth;
|
|
10803
|
-
break;
|
|
10804
|
-
case "center":
|
|
10805
|
-
x = (width - this.actualWidth) / 2;
|
|
10806
|
-
break;
|
|
10807
|
-
case "justify":
|
|
10808
|
-
this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1);
|
|
10809
|
-
}
|
|
10810
|
-
this.paragraphs.map(function (paragraph) {
|
|
10788
|
+
this.actualWidth < width && !isWidthMax && ("right" === this.textAlign || "end" === this.textAlign ? x = width - this.actualWidth : "center" === this.textAlign ? x = (width - this.actualWidth) / 2 : "justify" === this.textAlign && (this.paragraphs.length < 2 ? x = (width - this.actualWidth) / 2 : spacing = (width - this.actualWidth) / (this.paragraphs.length - 1))), this.paragraphs.map(function (paragraph) {
|
|
10811
10789
|
paragraph instanceof RichTextIcon ? (paragraph["_" + directionKey.x] = x, x += paragraph[directionKey.width] + spacing, paragraph["_" + directionKey.y] = "top" === paragraph.attribute.textBaseline ? 0 : "bottom" === paragraph.attribute.textBaseline ? maxHeight - paragraph.height : (maxHeight - paragraph.height) / 2) : (paragraph[directionKey.left] = x, x += paragraph[directionKey.width] + spacing);
|
|
10812
10790
|
});
|
|
10813
10791
|
}
|
|
@@ -11031,10 +11009,10 @@
|
|
|
11031
11009
|
}
|
|
11032
11010
|
} else {
|
|
11033
11011
|
const richTextConfig = textConfig[i];
|
|
11034
|
-
if (isNumber$
|
|
11012
|
+
if (isNumber$2(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
|
|
11035
11013
|
const textParts = richTextConfig.text.split("\n");
|
|
11036
11014
|
for (let j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
|
|
11037
|
-
} else paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
|
|
11015
|
+
} else richTextConfig.text && paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
|
|
11038
11016
|
}
|
|
11039
11017
|
const maxWidthFinite = "number" == typeof maxWidth && Number.isFinite(maxWidth) && maxWidth > 0,
|
|
11040
11018
|
maxHeightFinite = "number" == typeof maxHeight && Number.isFinite(maxHeight) && maxHeight > 0,
|
|
@@ -11279,7 +11257,7 @@
|
|
|
11279
11257
|
} = this.attribute;
|
|
11280
11258
|
if (0 === cornerRadius || "0%" === cornerRadius) return 0;
|
|
11281
11259
|
const deltaRadius = Math.abs(outerRadius - innerRadius);
|
|
11282
|
-
return Math.min(isNumber$
|
|
11260
|
+
return Math.min(isNumber$2(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
|
|
11283
11261
|
}
|
|
11284
11262
|
getParsedAngle() {
|
|
11285
11263
|
const arcTheme = getTheme(this).arc;
|
|
@@ -13120,7 +13098,7 @@
|
|
|
13120
13098
|
const halfPi = pi / 2;
|
|
13121
13099
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
13122
13100
|
let cornerRadius;
|
|
13123
|
-
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$
|
|
13101
|
+
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$2(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
13124
13102
|
const cornerRadiusArr = rectCornerRadius;
|
|
13125
13103
|
let cr0, cr1;
|
|
13126
13104
|
switch (cornerRadiusArr.length) {
|
|
@@ -13228,7 +13206,7 @@
|
|
|
13228
13206
|
y = bounds.y1,
|
|
13229
13207
|
width = bounds.width(),
|
|
13230
13208
|
height = bounds.height();
|
|
13231
|
-
return isNumber$
|
|
13209
|
+
return isNumber$2(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
|
|
13232
13210
|
x: x,
|
|
13233
13211
|
y: y,
|
|
13234
13212
|
width: width,
|
|
@@ -15741,20 +15719,26 @@
|
|
|
15741
15719
|
height: height
|
|
15742
15720
|
} = drawContext;
|
|
15743
15721
|
if (!context) return;
|
|
15722
|
+
if (drawContext.keepMatrix) {
|
|
15723
|
+
if (context.nativeContext && context.nativeContext.getTransform) {
|
|
15724
|
+
const t = context.nativeContext.getTransform();
|
|
15725
|
+
context.setTransformFromMatrix(t, !0, 1);
|
|
15726
|
+
}
|
|
15727
|
+
} else context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
|
|
15744
15728
|
const dirtyBounds = this.dirtyBounds.setValue(0, 0, width, height);
|
|
15745
15729
|
if (stage.dirtyBounds && !stage.dirtyBounds.empty()) {
|
|
15746
15730
|
const b = getRectIntersect(dirtyBounds, stage.dirtyBounds, !1);
|
|
15747
15731
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
15748
15732
|
}
|
|
15749
15733
|
const d = context.dpr % 1;
|
|
15750
|
-
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds)
|
|
15734
|
+
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds);
|
|
15751
15735
|
const drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
|
|
15752
|
-
context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.
|
|
15736
|
+
context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort((a, b) => {
|
|
15753
15737
|
var _a, _b;
|
|
15754
15738
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
15755
15739
|
}).forEach(group => {
|
|
15756
15740
|
group.isContainer ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : this.renderItem(group, drawContext);
|
|
15757
|
-
}), context.restore(), context.restore(), context.draw(), context.inuse = !1;
|
|
15741
|
+
}), context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1);
|
|
15758
15742
|
}
|
|
15759
15743
|
doRegister() {
|
|
15760
15744
|
throw new Error("暂不支持");
|
|
@@ -15807,7 +15791,7 @@
|
|
|
15807
15791
|
}, subLayers.set(group._uid, incrementalLayer));
|
|
15808
15792
|
const incrementalContext = incrementalLayer.layer.getNativeHandler().getContext(),
|
|
15809
15793
|
idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);
|
|
15810
|
-
idc.dirtyBounds.
|
|
15794
|
+
idc.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), idc.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), idc.draw(this.currentRenderService, Object.assign(Object.assign({}, drawContext), {
|
|
15811
15795
|
drawContribution: idc,
|
|
15812
15796
|
clear: "transparent",
|
|
15813
15797
|
layer: incrementalLayer.layer,
|
|
@@ -16155,14 +16139,22 @@
|
|
|
16155
16139
|
x = 0,
|
|
16156
16140
|
y = 0
|
|
16157
16141
|
} = drawContext;
|
|
16158
|
-
|
|
16159
|
-
|
|
16160
|
-
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
|
|
16142
|
+
if (context) {
|
|
16143
|
+
if (drawContext.keepMatrix) {
|
|
16144
|
+
if (context.nativeContext && context.nativeContext.getTransform) {
|
|
16145
|
+
const t = context.nativeContext.getTransform();
|
|
16146
|
+
context.setTransformFromMatrix(t, !0, 1);
|
|
16147
|
+
}
|
|
16148
|
+
} else context.inuse = !0, context.clearMatrix();
|
|
16149
|
+
context.setTransformForCurrent(!0), context.save(), drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext), context.translate(x, y, !0), context.save(), renderService.renderTreeRoots.sort((a, b) => {
|
|
16150
|
+
var _a, _b;
|
|
16151
|
+
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
16152
|
+
}).forEach(group => {
|
|
16153
|
+
this.renderGroup(group, drawContext);
|
|
16154
|
+
}), this.hooks.completeDraw.tap("top-draw", () => {
|
|
16155
|
+
context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1), this.rendering = !1;
|
|
16156
|
+
});
|
|
16157
|
+
}
|
|
16166
16158
|
});
|
|
16167
16159
|
}
|
|
16168
16160
|
_increaseRender(group, drawContext) {
|
|
@@ -16463,34 +16455,48 @@
|
|
|
16463
16455
|
constructor() {
|
|
16464
16456
|
this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
|
|
16465
16457
|
}
|
|
16458
|
+
pauseLayout(p) {
|
|
16459
|
+
this.pause = p;
|
|
16460
|
+
}
|
|
16461
|
+
tryLayoutChildren(graphic) {
|
|
16462
|
+
graphic.firstChild && this.tryLayout(graphic.firstChild);
|
|
16463
|
+
}
|
|
16466
16464
|
tryLayout(graphic) {
|
|
16467
|
-
|
|
16468
|
-
this.
|
|
16465
|
+
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
16466
|
+
if (this.pause) return;
|
|
16469
16467
|
const p = graphic.parent;
|
|
16470
|
-
if (!
|
|
16468
|
+
if (!(force || p && graphic.needUpdateLayout())) return;
|
|
16471
16469
|
const theme = getTheme(p).group,
|
|
16472
16470
|
{
|
|
16473
16471
|
display = theme.display
|
|
16474
16472
|
} = p.attribute;
|
|
16475
16473
|
if ("flex" !== display) return;
|
|
16476
16474
|
const {
|
|
16477
|
-
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
|
|
16475
|
+
flexDirection = theme.flexDirection,
|
|
16476
|
+
flexWrap = theme.flexWrap,
|
|
16477
|
+
alignItems = theme.alignItems,
|
|
16478
|
+
clip = theme.clip
|
|
16479
|
+
} = p.attribute,
|
|
16480
|
+
{
|
|
16481
|
+
alignContent = null != alignItems ? alignItems : theme.alignContent
|
|
16482
|
+
} = p.attribute;
|
|
16483
|
+
let {
|
|
16484
|
+
width: width,
|
|
16485
|
+
height: height,
|
|
16486
|
+
justifyContent = theme.justifyContent
|
|
16483
16487
|
} = p.attribute;
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
|
|
16493
|
-
|
|
16488
|
+
const children = p.getChildren();
|
|
16489
|
+
if (null == width || null == height) {
|
|
16490
|
+
let childrenWidth = 0,
|
|
16491
|
+
childrenHeight = 0,
|
|
16492
|
+
boundsLegal = 0;
|
|
16493
|
+
if (children.forEach(child => {
|
|
16494
|
+
const bounds = this.getAABBBounds(child);
|
|
16495
|
+
bounds.empty() || ("column" === flexDirection || "column-reverse" === flexDirection ? (childrenHeight += bounds.height(), childrenWidth = Math.max(childrenWidth, bounds.width())) : (childrenWidth += bounds.width(), childrenHeight = Math.max(childrenHeight, bounds.height())), boundsLegal += bounds.x1, boundsLegal += bounds.y1, boundsLegal += bounds.x2, boundsLegal += bounds.y2);
|
|
16496
|
+
}), !isFinite(boundsLegal)) return;
|
|
16497
|
+
width = childrenWidth, height = childrenHeight;
|
|
16498
|
+
}
|
|
16499
|
+
p.attribute.width = width, p.attribute.height = height, this.tempBounds.copy(p._AABBBounds);
|
|
16494
16500
|
const result = {
|
|
16495
16501
|
main: {
|
|
16496
16502
|
len: width,
|
|
@@ -16499,18 +16505,18 @@
|
|
|
16499
16505
|
cross: {
|
|
16500
16506
|
len: height,
|
|
16501
16507
|
field: "y"
|
|
16502
|
-
}
|
|
16503
|
-
dir: 1
|
|
16508
|
+
}
|
|
16504
16509
|
},
|
|
16505
16510
|
main = result.main,
|
|
16506
16511
|
cross = result.cross;
|
|
16507
|
-
"
|
|
16512
|
+
"column" !== flexDirection && "column-reverse" !== flexDirection || (main.len = height, cross.len = width, main.field = "y", cross.field = "x"), "row-reverse" !== flexDirection && "column-reverse" !== flexDirection || ("flex-start" === justifyContent ? justifyContent = "flex-end" : "flex-end" === justifyContent ? justifyContent = "flex-start" : children.reverse());
|
|
16508
16513
|
let mainLen = 0,
|
|
16509
16514
|
crossLen = 0;
|
|
16510
16515
|
const mianLenArray = [];
|
|
16511
|
-
|
|
16512
|
-
const b = c
|
|
16513
|
-
|
|
16516
|
+
children.forEach(c => {
|
|
16517
|
+
const b = this.getAABBBounds(c);
|
|
16518
|
+
if (b.empty()) return;
|
|
16519
|
+
const ml = "x" === main.field ? b.width() : b.height(),
|
|
16514
16520
|
cl = "x" === cross.field ? b.width() : b.height();
|
|
16515
16521
|
mianLenArray.push({
|
|
16516
16522
|
mainLen: ml,
|
|
@@ -16545,107 +16551,168 @@
|
|
|
16545
16551
|
mainLen: mainLen,
|
|
16546
16552
|
crossLen: crossLen
|
|
16547
16553
|
});
|
|
16548
|
-
const children = p.getChildren();
|
|
16549
16554
|
let lastIdx = 0;
|
|
16550
16555
|
if (mainList.forEach(s => {
|
|
16551
16556
|
this.layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, s), lastIdx = s.idx + 1;
|
|
16552
16557
|
}), crossLen = mainList.reduce((a, b) => a + b.crossLen, 0), 1 === mainList.length) {
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
} else children.forEach(child => {
|
|
16560
|
-
child.attribute[cross.field] = getPadding(child, cross.field);
|
|
16561
|
-
});
|
|
16558
|
+
const anchorPosMap = {
|
|
16559
|
+
"flex-start": 0,
|
|
16560
|
+
"flex-end": cross.len,
|
|
16561
|
+
center: cross.len / 2
|
|
16562
|
+
};
|
|
16563
|
+
this.layoutCross(children, alignItems, cross, anchorPosMap, mianLenArray, mainList[0], 0);
|
|
16562
16564
|
} else if ("flex-start" === alignContent) {
|
|
16563
16565
|
lastIdx = 0;
|
|
16564
16566
|
let anchorPos = 0;
|
|
16565
16567
|
mainList.forEach((s, i) => {
|
|
16566
|
-
|
|
16568
|
+
const anchorPosMap = {
|
|
16569
|
+
"flex-start": anchorPos,
|
|
16570
|
+
"flex-end": anchorPos + s.crossLen,
|
|
16571
|
+
center: anchorPos + s.crossLen / 2
|
|
16572
|
+
};
|
|
16573
|
+
this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
|
|
16567
16574
|
});
|
|
16568
16575
|
} else if ("center" === alignContent) {
|
|
16569
16576
|
lastIdx = 0;
|
|
16570
16577
|
let anchorPos = Math.max(0, (cross.len - crossLen) / 2);
|
|
16571
16578
|
mainList.forEach((s, i) => {
|
|
16572
|
-
|
|
16579
|
+
const anchorPosMap = {
|
|
16580
|
+
"flex-start": anchorPos,
|
|
16581
|
+
"flex-end": anchorPos + s.crossLen,
|
|
16582
|
+
center: anchorPos + s.crossLen / 2
|
|
16583
|
+
};
|
|
16584
|
+
this.layoutCross(children, "center", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen;
|
|
16573
16585
|
});
|
|
16574
16586
|
} else if ("space-around" === alignContent) {
|
|
16575
16587
|
lastIdx = 0;
|
|
16576
16588
|
const padding = Math.max(0, (cross.len - crossLen) / mainList.length / 2);
|
|
16577
16589
|
let anchorPos = padding;
|
|
16578
16590
|
mainList.forEach((s, i) => {
|
|
16579
|
-
|
|
16591
|
+
const anchorPosMap = {
|
|
16592
|
+
"flex-start": anchorPos,
|
|
16593
|
+
"flex-end": anchorPos + s.crossLen,
|
|
16594
|
+
center: anchorPos + s.crossLen / 2
|
|
16595
|
+
};
|
|
16596
|
+
this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
|
|
16580
16597
|
});
|
|
16581
16598
|
} else if ("space-between" === alignContent) {
|
|
16582
16599
|
lastIdx = 0;
|
|
16583
16600
|
const padding = Math.max(0, (cross.len - crossLen) / (2 * mainList.length - 2));
|
|
16584
16601
|
let anchorPos = 0;
|
|
16585
16602
|
mainList.forEach((s, i) => {
|
|
16586
|
-
|
|
16603
|
+
const anchorPosMap = {
|
|
16604
|
+
"flex-start": anchorPos,
|
|
16605
|
+
"flex-end": anchorPos + s.crossLen,
|
|
16606
|
+
center: anchorPos + s.crossLen / 2
|
|
16607
|
+
};
|
|
16608
|
+
this.layoutCross(children, "flex-start", cross, anchorPosMap, mianLenArray, mainList[i], lastIdx), lastIdx = s.idx + 1, anchorPos += s.crossLen + 2 * padding;
|
|
16587
16609
|
});
|
|
16588
16610
|
}
|
|
16589
16611
|
children.forEach((child, idx) => {
|
|
16590
16612
|
child.addUpdateBoundTag(), child.addUpdatePositionTag(), child.clearUpdateLayoutTag();
|
|
16591
|
-
}), p.addUpdateLayoutTag()
|
|
16613
|
+
}), p.addUpdateLayoutTag();
|
|
16614
|
+
const b = this.getAABBBounds(p);
|
|
16615
|
+
clip || this.tempBounds.equals(b) || this.tryLayout(p, !1);
|
|
16616
|
+
}
|
|
16617
|
+
getAABBBounds(graphic) {
|
|
16618
|
+
this.skipBoundsTrigger = !0;
|
|
16619
|
+
const b = graphic.AABBBounds;
|
|
16620
|
+
return this.skipBoundsTrigger = !1, b;
|
|
16621
|
+
}
|
|
16622
|
+
updateChildPos(posBaseLeftTop, lastP, lastBP) {
|
|
16623
|
+
return posBaseLeftTop + (null != lastP ? lastP : 0) - lastBP;
|
|
16592
16624
|
}
|
|
16593
16625
|
layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, currSeg) {
|
|
16594
16626
|
if ("flex-start" === justifyContent) {
|
|
16595
16627
|
let pos = 0;
|
|
16596
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16628
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16629
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16630
|
+
b = this.getAABBBounds(children[i]);
|
|
16631
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
|
|
16632
|
+
}
|
|
16597
16633
|
} else if ("flex-end" === justifyContent) {
|
|
16598
16634
|
let pos = main.len;
|
|
16599
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16635
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16636
|
+
pos -= mianLenArray[i].mainLen;
|
|
16637
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16638
|
+
b = this.getAABBBounds(children[i]);
|
|
16639
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`]));
|
|
16640
|
+
}
|
|
16600
16641
|
} else if ("space-around" === justifyContent) {
|
|
16601
16642
|
if (currSeg.mainLen >= main.len) {
|
|
16602
16643
|
let pos = 0;
|
|
16603
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16644
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16645
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16646
|
+
b = this.getAABBBounds(children[i]);
|
|
16647
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
|
|
16648
|
+
}
|
|
16604
16649
|
} else {
|
|
16605
16650
|
const size = currSeg.idx - lastIdx + 1,
|
|
16606
16651
|
padding = (main.len - currSeg.mainLen) / size / 2;
|
|
16607
16652
|
let pos = padding;
|
|
16608
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16653
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16654
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16655
|
+
b = this.getAABBBounds(children[i]);
|
|
16656
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen + 2 * padding;
|
|
16657
|
+
}
|
|
16609
16658
|
}
|
|
16610
16659
|
} else if ("space-between" === justifyContent) {
|
|
16611
16660
|
if (currSeg.mainLen >= main.len) {
|
|
16612
16661
|
let pos = 0;
|
|
16613
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16662
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16663
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16664
|
+
b = this.getAABBBounds(children[i]);
|
|
16665
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
|
|
16666
|
+
}
|
|
16614
16667
|
} else {
|
|
16615
16668
|
const size = currSeg.idx - lastIdx + 1,
|
|
16616
16669
|
padding = (main.len - currSeg.mainLen) / (2 * size - 2);
|
|
16617
16670
|
let pos = 0;
|
|
16618
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16671
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16672
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16673
|
+
b = this.getAABBBounds(children[i]);
|
|
16674
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen + 2 * padding;
|
|
16675
|
+
}
|
|
16619
16676
|
}
|
|
16620
16677
|
} else if ("center" === justifyContent) {
|
|
16621
16678
|
let pos = (main.len - currSeg.mainLen) / 2;
|
|
16622
|
-
for (let i = lastIdx; i <= currSeg.idx; i++)
|
|
16679
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16680
|
+
const posBaseLeftTop = pos + getPadding(children[i], main.field),
|
|
16681
|
+
b = this.getAABBBounds(children[i]);
|
|
16682
|
+
!b.empty() && (children[i].attribute[main.field] = this.updateChildPos(posBaseLeftTop, children[i].attribute[main.field], b[`${main.field}1`])), pos += mianLenArray[i].mainLen;
|
|
16683
|
+
}
|
|
16623
16684
|
}
|
|
16624
16685
|
}
|
|
16625
|
-
layoutCross(children, alignItem, cross,
|
|
16626
|
-
|
|
16686
|
+
layoutCross(children, alignItem, cross, anchorPosMap, lenArray, currSeg, lastIdx) {
|
|
16687
|
+
var _a;
|
|
16688
|
+
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
16689
|
+
const child = children[i];
|
|
16690
|
+
let {
|
|
16691
|
+
alignSelf: alignSelf
|
|
16692
|
+
} = child.attribute;
|
|
16693
|
+
alignSelf && "auto" !== alignSelf || (alignSelf = alignItem);
|
|
16694
|
+
const b = this.getAABBBounds(child),
|
|
16695
|
+
anchorPos = null !== (_a = anchorPosMap[alignSelf]) && void 0 !== _a ? _a : anchorPosMap["flex-start"];
|
|
16696
|
+
"flex-end" === alignSelf ? !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos - lenArray[i].crossLen + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`])) : "center" === alignSelf ? !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos - lenArray[i].crossLen / 2 + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`])) : !b.empty() && (child.attribute[cross.field] = this.updateChildPos(anchorPos + getPadding(child, cross.field), child.attribute[cross.field], b[`${cross.field}1`]));
|
|
16697
|
+
}
|
|
16627
16698
|
}
|
|
16628
16699
|
activate(context) {
|
|
16629
16700
|
this.pluginService = context, application.graphicService.hooks.onAttributeUpdate.tap(this.key, graphic => {
|
|
16630
|
-
graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic
|
|
16701
|
+
graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage && graphic.stage === this.pluginService.stage && this.tryLayout(graphic, !1);
|
|
16631
16702
|
}), application.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
|
|
16632
|
-
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && _tempBounds.copy(bounds);
|
|
16703
|
+
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && _tempBounds.copy(bounds);
|
|
16633
16704
|
}), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
|
|
16634
|
-
stage && stage === this.pluginService.stage && graphic.isContainer && (_tempBounds.equals(bounds) ||
|
|
16705
|
+
stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && (_tempBounds.equals(bounds) || this.tryLayout(graphic, !1));
|
|
16635
16706
|
}), application.graphicService.hooks.onSetStage.tap(this.key, graphic => {
|
|
16636
|
-
graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic
|
|
16707
|
+
graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1);
|
|
16637
16708
|
});
|
|
16638
16709
|
}
|
|
16639
16710
|
deactivate(context) {
|
|
16640
|
-
application.graphicService.hooks.onAttributeUpdate.taps = application.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onSetStage.taps = application.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key);
|
|
16711
|
+
application.graphicService.hooks.onAttributeUpdate.taps = application.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onSetStage.taps = application.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key);
|
|
16641
16712
|
}
|
|
16642
16713
|
}
|
|
16643
16714
|
function getPadding(graphic, field) {
|
|
16644
|
-
|
|
16645
|
-
if (isNumber$1(graphic.attribute.boundsPadding)) return graphic.attribute.boundsPadding;
|
|
16646
|
-
if (isArray$1(graphic.attribute.boundsPadding) && 1 === graphic.attribute.boundsPadding.length) return graphic.attribute.boundsPadding[0];
|
|
16647
|
-
const paddingArray = parsePadding(graphic.attribute.boundsPadding);
|
|
16648
|
-
return "x" === field ? paddingArray[3] : "y" === field ? paddingArray[0] : 0;
|
|
16715
|
+
return 0;
|
|
16649
16716
|
}
|
|
16650
16717
|
|
|
16651
16718
|
const defaultTicker = new DefaultTicker();
|
|
@@ -17064,6 +17131,9 @@
|
|
|
17064
17131
|
this.pluginService.unRegister(plugin);
|
|
17065
17132
|
}));
|
|
17066
17133
|
}
|
|
17134
|
+
getPluginsByName(name) {
|
|
17135
|
+
return this.pluginService.findPluginsByName(name);
|
|
17136
|
+
}
|
|
17067
17137
|
tryUpdateAABBBounds() {
|
|
17068
17138
|
const viewBox = this._viewBox;
|
|
17069
17139
|
return this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2), this._AABBBounds;
|
|
@@ -17097,7 +17167,7 @@
|
|
|
17097
17167
|
render(layers, params) {
|
|
17098
17168
|
this.ticker.start(), this.timeline.resume();
|
|
17099
17169
|
const state = this.state;
|
|
17100
|
-
this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this.renderLayerList(this.children), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
|
|
17170
|
+
this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this.renderLayerList(this.children, params), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
|
|
17101
17171
|
}
|
|
17102
17172
|
combineLayersToWindow() {}
|
|
17103
17173
|
renderNextFrame(layers, force) {
|
|
@@ -17124,7 +17194,8 @@
|
|
|
17124
17194
|
background: layer === this.defaultLayer ? this.background : void 0,
|
|
17125
17195
|
updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty())
|
|
17126
17196
|
}, Object.assign({
|
|
17127
|
-
renderStyle: this.renderStyle
|
|
17197
|
+
renderStyle: this.renderStyle,
|
|
17198
|
+
keepMatrix: this.params.renderKeepMatrix
|
|
17128
17199
|
}, params)));
|
|
17129
17200
|
}), this.interactiveLayer && !layerList.includes(this.interactiveLayer) && this.interactiveLayer.render({
|
|
17130
17201
|
renderService: this.renderService,
|
|
@@ -17507,11 +17578,17 @@
|
|
|
17507
17578
|
if (!params.bounds.contains(point.x, point.y)) return result;
|
|
17508
17579
|
offsetX = params.bounds.x1, offsetY = params.bounds.y1;
|
|
17509
17580
|
}
|
|
17510
|
-
|
|
17581
|
+
if (this.pickContext) if (params.keepMatrix) {
|
|
17582
|
+
if (this.pickContext.nativeContext && this.pickContext.nativeContext.getTransform) {
|
|
17583
|
+
const t = this.pickContext.nativeContext.getTransform();
|
|
17584
|
+
this.pickContext.setTransformFromMatrix(t, !0, 1);
|
|
17585
|
+
}
|
|
17586
|
+
} else this.pickContext.inuse = !0, this.pickContext.clearMatrix(!0, 1);
|
|
17587
|
+
params.pickContext = this.pickContext;
|
|
17511
17588
|
const parentMatrix = new Matrix(1, 0, 0, 1, offsetX, offsetY);
|
|
17512
17589
|
let group;
|
|
17513
17590
|
for (let i = graphics.length - 1; i >= 0 && (result = graphics[i].isContainer ? this.pickGroup(graphics[i], point, parentMatrix, params) : this.pickItem(graphics[i], point, parentMatrix, params), !result.graphic); i--) group || (group = result.group);
|
|
17514
|
-
if (result.graphic || (result.group = group), this.pickContext && (this.pickContext.inuse = !1), result.graphic) {
|
|
17591
|
+
if (result.graphic || (result.group = group), this.pickContext && !params.keepMatrix && (this.pickContext.inuse = !1), result.graphic) {
|
|
17515
17592
|
let g = result.graphic;
|
|
17516
17593
|
for (; g.parent;) g = g.parent;
|
|
17517
17594
|
g.shadowHost && (result.params = {
|
|
@@ -20039,7 +20116,7 @@
|
|
|
20039
20116
|
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
20040
20117
|
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
20041
20118
|
let picked = !0;
|
|
20042
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$
|
|
20119
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
20043
20120
|
if (picked) return !0;
|
|
20044
20121
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
20045
20122
|
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
|
|
@@ -20107,7 +20184,7 @@
|
|
|
20107
20184
|
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
20108
20185
|
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
20109
20186
|
let picked = !0;
|
|
20110
|
-
if (!onlyTranslate || isNumber$
|
|
20187
|
+
if (!onlyTranslate || isNumber$2(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
20111
20188
|
if (picked) return !0;
|
|
20112
20189
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
20113
20190
|
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
|
|
@@ -24682,6 +24759,14 @@
|
|
|
24682
24759
|
height: bounds.height()
|
|
24683
24760
|
};
|
|
24684
24761
|
}
|
|
24762
|
+
function isRichText(attributes) {
|
|
24763
|
+
let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
|
|
24764
|
+
return typeKey in attributes && "rich" === attributes[typeKey] || isObject$4(attributes.text) && "rich" === attributes.text.type;
|
|
24765
|
+
}
|
|
24766
|
+
function richTextAttributeTransform(attributes) {
|
|
24767
|
+
var _a, _b;
|
|
24768
|
+
return attributes.width = null !== (_a = attributes.width) && void 0 !== _a ? _a : 0, attributes.height = null !== (_b = attributes.height) && void 0 !== _b ? _b : 0, attributes.maxWidth = attributes.maxLineWidth, attributes.textConfig = attributes.text.text || attributes.text, attributes;
|
|
24769
|
+
}
|
|
24685
24770
|
|
|
24686
24771
|
function loadTagComponent() {
|
|
24687
24772
|
registerGroup(), registerRect(), registerSymbol(), registerRichtext(), registerText();
|
|
@@ -24702,7 +24787,7 @@
|
|
|
24702
24787
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, Tag.defaultAttributes, attributes)), this.name = "tag";
|
|
24703
24788
|
}
|
|
24704
24789
|
render() {
|
|
24705
|
-
var _a, _b
|
|
24790
|
+
var _a, _b;
|
|
24706
24791
|
const {
|
|
24707
24792
|
text = "",
|
|
24708
24793
|
textStyle = {},
|
|
@@ -24734,7 +24819,7 @@
|
|
|
24734
24819
|
shapeStyle = __rest$3(shape, ["visible"]);
|
|
24735
24820
|
if (isBoolean$2(shapeVisible)) {
|
|
24736
24821
|
const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
|
|
24737
|
-
maxSize = isNumber$
|
|
24822
|
+
maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
|
|
24738
24823
|
symbol = group.createOrUpdateChild("tag-shape", Object.assign(Object.assign({
|
|
24739
24824
|
symbolType: "circle",
|
|
24740
24825
|
size: size,
|
|
@@ -24746,39 +24831,15 @@
|
|
|
24746
24831
|
}), "symbol"), isEmpty(null == state ? void 0 : state.shape) || (symbol.states = state.shape), shapeVisible && (symbolPlaceWidth = maxSize + space);
|
|
24747
24832
|
}
|
|
24748
24833
|
let textShape;
|
|
24749
|
-
|
|
24750
|
-
|
|
24751
|
-
|
|
24752
|
-
|
|
24753
|
-
},
|
|
24754
|
-
|
|
24755
|
-
|
|
24756
|
-
|
|
24757
|
-
height: null !== (_b = textStyle.height) && void 0 !== _b ? _b : 0
|
|
24758
|
-
});
|
|
24759
|
-
textShape = group.createOrUpdateChild("tag-text", richTextAttrs, "richtext");
|
|
24760
|
-
const {
|
|
24761
|
-
visible: bgVisible
|
|
24762
|
-
} = panel,
|
|
24763
|
-
backgroundStyle = __rest$3(panel, ["visible"]);
|
|
24764
|
-
if (visible && isBoolean$2(bgVisible)) {
|
|
24765
|
-
const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
24766
|
-
visible: bgVisible && !!text,
|
|
24767
|
-
x: textShape.AABBBounds.x1,
|
|
24768
|
-
y: textShape.AABBBounds.y1,
|
|
24769
|
-
width: textShape.AABBBounds.width(),
|
|
24770
|
-
height: textShape.AABBBounds.height()
|
|
24771
|
-
}), "rect");
|
|
24772
|
-
isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
24773
|
-
}
|
|
24774
|
-
} else if ("html" === type) {
|
|
24775
|
-
const richTextAttrs = Object.assign(Object.assign({
|
|
24776
|
-
textConfig: [],
|
|
24834
|
+
tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth;
|
|
24835
|
+
if (isRichText({
|
|
24836
|
+
text: text
|
|
24837
|
+
}) || "rich" === type) {
|
|
24838
|
+
const richTextAttrs = Object.assign(Object.assign(Object.assign({}, richTextAttributeTransform(Object.assign({
|
|
24839
|
+
type: type,
|
|
24840
|
+
text: text
|
|
24841
|
+
}, textStyle))), textStyle), {
|
|
24777
24842
|
visible: isValid$1(text) && !1 !== visible,
|
|
24778
|
-
html: Object.assign(Object.assign({
|
|
24779
|
-
dom: text
|
|
24780
|
-
}, DEFAULT_HTML_TEXT_SPEC), textStyle)
|
|
24781
|
-
}, textStyle), {
|
|
24782
24843
|
x: textX,
|
|
24783
24844
|
y: 0
|
|
24784
24845
|
});
|
|
@@ -24799,7 +24860,7 @@
|
|
|
24799
24860
|
}
|
|
24800
24861
|
} else {
|
|
24801
24862
|
const textAttrs = Object.assign(Object.assign({
|
|
24802
|
-
text: text,
|
|
24863
|
+
text: isObject$4(text) && "type" in text && "text" === text.type ? text.text : text,
|
|
24803
24864
|
visible: isValid$1(text) && !1 !== visible,
|
|
24804
24865
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize
|
|
24805
24866
|
}, textStyle), {
|
|
@@ -24807,12 +24868,12 @@
|
|
|
24807
24868
|
y: 0
|
|
24808
24869
|
});
|
|
24809
24870
|
isNil$1(textAttrs.lineHeight) && (textAttrs.lineHeight = textStyle.fontSize), textShape = group.createOrUpdateChild("tag-text", textAttrs, "text"), isEmpty(null == state ? void 0 : state.text) || (textShape.states = state.text);
|
|
24810
|
-
const textBounds = measureTextSize(textAttrs.text, textStyle, null === (
|
|
24871
|
+
const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme().text.fontFamily),
|
|
24811
24872
|
textWidth = textBounds.width,
|
|
24812
24873
|
textHeight = textBounds.height;
|
|
24813
24874
|
tagWidth += textWidth;
|
|
24814
|
-
const size = null !== (
|
|
24815
|
-
maxSize = isNumber$
|
|
24875
|
+
const size = null !== (_b = shape.size) && void 0 !== _b ? _b : 10,
|
|
24876
|
+
maxSize = isNumber$2(size) ? size : Math.max(size[0], size[1]);
|
|
24816
24877
|
tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
|
|
24817
24878
|
const {
|
|
24818
24879
|
textAlign: textAlign,
|
|
@@ -24820,11 +24881,21 @@
|
|
|
24820
24881
|
} = textStyle;
|
|
24821
24882
|
(isValid$1(minWidth) || isValid$1(maxWidth)) && (isValid$1(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$1(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2])));
|
|
24822
24883
|
let x = 0,
|
|
24823
|
-
y = 0
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
|
|
24884
|
+
y = 0,
|
|
24885
|
+
flag = 0;
|
|
24886
|
+
if ("left" === textAlign || "start" === textAlign ? flag = 1 : "right" === textAlign || "end" === textAlign ? flag = -1 : "center" === textAlign && (flag = 0), flag ? flag < 0 ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : flag > 0 && group.setAttribute("x", parsedPadding[3]) : (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)), textAlwaysCenter && flag) {
|
|
24887
|
+
const containerWidth = tagWidth - parsedPadding[1] - parsedPadding[3],
|
|
24888
|
+
tsWidth = textWidth + symbolPlaceWidth,
|
|
24889
|
+
textX = (containerWidth - tsWidth) / 2 + symbolPlaceWidth + textWidth / 2,
|
|
24890
|
+
symbolX = (containerWidth - tsWidth) / 2 + maxSize / 2;
|
|
24891
|
+
textShape.setAttributes({
|
|
24892
|
+
x: textX * flag,
|
|
24893
|
+
textAlign: "center"
|
|
24894
|
+
}), null == symbol || symbol.setAttributes({
|
|
24895
|
+
x: symbolX * flag
|
|
24896
|
+
}), group.setAttribute("x", parsedPadding[2 + flag] * flag);
|
|
24897
|
+
}
|
|
24898
|
+
"middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
|
|
24828
24899
|
const {
|
|
24829
24900
|
visible: bgVisible
|
|
24830
24901
|
} = panel,
|
|
@@ -25668,12 +25739,10 @@
|
|
|
25668
25739
|
pickable: !1
|
|
25669
25740
|
});
|
|
25670
25741
|
return labelGroup.name = `${AXIS_ELEMENT_NAME.labelContainer}-layer-${layer}`, labelGroup.id = this._getNodeId(`label-container-layer-${layer}`), container.add(labelGroup), data.forEach((item, index) => {
|
|
25671
|
-
var _a
|
|
25742
|
+
var _a;
|
|
25672
25743
|
const labelStyle = this._getLabelAttribute(item, index, data, layer);
|
|
25673
25744
|
let text;
|
|
25674
|
-
if (
|
|
25675
|
-
dom: labelStyle.text
|
|
25676
|
-
}, DEFAULT_HTML_TEXT_SPEC), labelStyle), text = graphicCreator$1.richtext(labelStyle)) : text = graphicCreator$1.text(labelStyle), text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_c = this.attribute.label) || void 0 === _c ? void 0 : _c.state)) text.states = DEFAULT_STATES$2;else {
|
|
25745
|
+
if (text = isRichText(labelStyle) ? graphicCreator$1.richtext(richTextAttributeTransform(labelStyle)) : graphicCreator$1.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 {
|
|
25677
25746
|
const labelState = merge({}, DEFAULT_STATES$2, this.attribute.label.state);
|
|
25678
25747
|
Object.keys(labelState).forEach(key => {
|
|
25679
25748
|
isFunction$1(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
|
|
@@ -26521,8 +26590,8 @@
|
|
|
26521
26590
|
textAlign: "center",
|
|
26522
26591
|
textBaseline: "middle"
|
|
26523
26592
|
}, textStyle), null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme().text.fontFamily),
|
|
26524
|
-
handlerSizeX = isNumber$
|
|
26525
|
-
handlerSizeY = isNumber$
|
|
26593
|
+
handlerSizeX = isNumber$2(handlerSize) ? handlerSize : handlerSize[0],
|
|
26594
|
+
handlerSizeY = isNumber$2(handlerSize) ? handlerSize : handlerSize[1],
|
|
26526
26595
|
text = graphicCreator$1.text(Object.assign({
|
|
26527
26596
|
x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
|
|
26528
26597
|
y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
|
|
@@ -26851,7 +26920,8 @@
|
|
|
26851
26920
|
shape.fill && isNil$1(shapeStyle.state[key].fill) && color && (shapeStyle.state[key].fill = color), shape.stroke && isNil$1(shapeStyle.state[key].stroke) && color && (shapeStyle.state[key].stroke = color);
|
|
26852
26921
|
}), this._appendDataToShape(itemShape, LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeStyle.state), itemShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(itemShape);
|
|
26853
26922
|
}
|
|
26854
|
-
let
|
|
26923
|
+
let labelShape,
|
|
26924
|
+
focusSpace = 0;
|
|
26855
26925
|
if (focus) {
|
|
26856
26926
|
const focusSize = get$5(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
|
|
26857
26927
|
focusShape = graphicCreator$1.symbol(Object.assign(Object.assign({
|
|
@@ -26864,29 +26934,32 @@
|
|
|
26864
26934
|
boundsPadding: parsedPadding
|
|
26865
26935
|
})), this._appendDataToShape(focusShape, LEGEND_ELEMENT_NAME.focus, item, itemGroup), focusSpace = focusSize;
|
|
26866
26936
|
}
|
|
26867
|
-
const
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26872
|
-
|
|
26873
|
-
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
|
|
26937
|
+
const text = labelAttr.formatMethod ? labelAttr.formatMethod(label, item, index) : label,
|
|
26938
|
+
labelAttributes = Object.assign(Object.assign({
|
|
26939
|
+
x: shapeSize / 2 + shapeSpace,
|
|
26940
|
+
y: 0,
|
|
26941
|
+
textAlign: "start",
|
|
26942
|
+
textBaseline: "middle",
|
|
26943
|
+
lineHeight: null === (_b = labelStyle.style) || void 0 === _b ? void 0 : _b.fontSize
|
|
26944
|
+
}, labelStyle.style), {
|
|
26945
|
+
text: text
|
|
26946
|
+
});
|
|
26947
|
+
labelShape = isRichText(labelAttributes) ? graphicCreator$1.richtext(richTextAttributeTransform(labelAttributes)) : graphicCreator$1.text(labelAttributes), this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
|
|
26877
26948
|
const labelSpace = get$5(labelAttr, "space", DEFAULT_LABEL_SPACE);
|
|
26878
26949
|
if (isValid$1(value)) {
|
|
26879
26950
|
const valueSpace = get$5(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
|
|
26880
|
-
|
|
26951
|
+
valueText = valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value,
|
|
26952
|
+
valueAttributes = Object.assign(Object.assign({
|
|
26881
26953
|
x: 0,
|
|
26882
26954
|
y: 0,
|
|
26883
26955
|
textAlign: "start",
|
|
26884
26956
|
textBaseline: "middle",
|
|
26885
26957
|
lineHeight: valueStyle.style.fontSize
|
|
26886
26958
|
}, valueStyle.style), {
|
|
26887
|
-
text:
|
|
26888
|
-
})
|
|
26889
|
-
|
|
26959
|
+
text: valueText
|
|
26960
|
+
});
|
|
26961
|
+
let valueShape;
|
|
26962
|
+
if (valueShape = isRichText(valueAttributes) ? graphicCreator$1.richtext(richTextAttributeTransform(valueAttributes)) : graphicCreator$1.text(valueAttributes), this._appendDataToShape(valueShape, LEGEND_ELEMENT_NAME.itemValue, item, itemGroup, valueStyle.state), valueShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), this._itemWidthByUser) {
|
|
26890
26963
|
const layoutWidth = this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - labelSpace - focusSpace - valueSpace,
|
|
26891
26964
|
valueBounds = valueShape.AABBBounds,
|
|
26892
26965
|
labelBounds = labelShape.AABBBounds,
|
|
@@ -27566,7 +27639,7 @@
|
|
|
27566
27639
|
return this._isFixed && !!this._bandwidth;
|
|
27567
27640
|
}
|
|
27568
27641
|
_isBandwidthFixedByUser() {
|
|
27569
|
-
return this._isFixed && this._userBandwidth && isNumber$
|
|
27642
|
+
return this._isFixed && this._userBandwidth && isNumber$2(this._userBandwidth);
|
|
27570
27643
|
}
|
|
27571
27644
|
clone() {
|
|
27572
27645
|
var _a, _b, _c;
|
|
@@ -27834,13 +27907,13 @@
|
|
|
27834
27907
|
}
|
|
27835
27908
|
}
|
|
27836
27909
|
function parseNiceOptions(originalDomain, option) {
|
|
27837
|
-
const hasForceMin = isNumber$
|
|
27838
|
-
hasForceMax = isNumber$
|
|
27910
|
+
const hasForceMin = isNumber$2(option.forceMin),
|
|
27911
|
+
hasForceMax = isNumber$2(option.forceMax);
|
|
27839
27912
|
let niceType = null;
|
|
27840
27913
|
const niceMinMax = [];
|
|
27841
27914
|
let niceDomain = null;
|
|
27842
27915
|
const domainValidator = hasForceMin && hasForceMax ? x => x >= option.forceMin && x <= option.forceMax : hasForceMin ? x => x >= option.forceMin : hasForceMax ? x => x <= option.forceMax : null;
|
|
27843
|
-
return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$
|
|
27916
|
+
return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$2(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$2(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$2(niceMinMax[0]) && isNumber$2(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$2(niceMinMax[0]) || isNumber$2(niceMinMax[1]) ? isNumber$2(niceMinMax[0]) ? "max" : "min" : "all", {
|
|
27844
27917
|
niceType: niceType,
|
|
27845
27918
|
niceDomain: niceDomain,
|
|
27846
27919
|
niceMinMax: niceMinMax,
|
|
@@ -31668,7 +31741,7 @@
|
|
|
31668
31741
|
}
|
|
31669
31742
|
|
|
31670
31743
|
function getQuadProps(paddingOrigin) {
|
|
31671
|
-
if (isNumber$
|
|
31744
|
+
if (isNumber$2(paddingOrigin) || isString$2(paddingOrigin) || isArray$1(paddingOrigin)) {
|
|
31672
31745
|
let padding = parsePadding(paddingOrigin);
|
|
31673
31746
|
if (typeof padding === 'number' || typeof padding === 'string') {
|
|
31674
31747
|
padding = [padding, padding, padding, padding];
|
|
@@ -31934,7 +32007,7 @@
|
|
|
31934
32007
|
if (isNil$1(v)) {
|
|
31935
32008
|
return false;
|
|
31936
32009
|
}
|
|
31937
|
-
if (isNumber$
|
|
32010
|
+
if (isNumber$2(v)) {
|
|
31938
32011
|
return true;
|
|
31939
32012
|
}
|
|
31940
32013
|
return +v === +v;
|
|
@@ -32900,6 +32973,16 @@
|
|
|
32900
32973
|
cursor: 'pointer'
|
|
32901
32974
|
};
|
|
32902
32975
|
},
|
|
32976
|
+
get loading_pic() {
|
|
32977
|
+
return {
|
|
32978
|
+
type: 'svg',
|
|
32979
|
+
svg: '<svg viewBox="0 0 400 300" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="50" y="65" width="301" height="170"><path d="M350.3 65H50v169.8h300.3V65Z" fill="#fff"/></mask><g mask="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M58.3 233.2h32.8v-36.8H58.3v36.8Z" fill="#C7DEFF"/><path d="M91.1 224.5v8.8H58.3M82.4 196.2H58.3" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M305.4 182.5s-2.7 12.6 0 17.4c2.7 4.8 8.3 6.7 12.4 4.4 4.2-2.4 5.3-8.1 2.6-12.9-2.7-4.8-15-8.9-15-8.9ZM336 204.7c4.3 2 9.7-.4 12-5.4 2.3-5-1.5-17.3-1.5-17.3s-11.8 5.1-14.1 10.1c-2.3 5-.7 10.6 3.6 12.6Z" fill="#00E4E5"/><path fill-rule="evenodd" clip-rule="evenodd" d="M326.7 174s-10 11.8-10 18.6c0 6.7 4.5 12.2 10 12.2s10-5.5 10-12.3c0-6.8-10-18.5-10-18.5Z" fill="#00E4E5"/><path d="M332.3 181.5c2.3 3.6 4.4 7.8 4.4 10.9M316.7 192.5c0-3.1 2.1-7.2 4.3-10.8" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M343.1 227.3v-9.7h-34v9.7c0 3.7 3 6.6 6.6 6.6h20.9c3.6 0 6.5-2.9 6.5-6.6Z" fill="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M350.4 220.8V198H302v22.8c0 5.9 4.8 10.7 10.7 10.7h26.9c5.9 0 10.7-4.8 10.8-10.7Z" fill="#C7DEFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M331.7 74.2H117.8L87.4 203h213.8l30.5-128.8Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M337 74.2h-6.2l-30.6 129.2h6.2L337 74.2Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M303.8 203.5h2.4l30.7-129.3h-1.8l-31.3 129.3Z" fill="#C7DEFF"/><path d="m337 74.2-30.6 129.2h-5.9" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M229.9 202.1h-47.6l2 9.6h47.3l-1.7-9.6Z" fill="#C7DEFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M94.7 172.6 87.4 203h213.1l7.8-30.4H94.7Z" fill="#006EFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M94.7 172.6 87.4 203h213.1l7.8-30.4H94.7Z" fill="#006EFF"/><path d="M138.5 74.2h193.2l-23.4 98.6M94.5 172.7l11-46.3M104.8 155.4l-2.3 11.5h6.7M316 112.1l1.1-4.5" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M148.3 138.1h97V119h-97v19.1Z" fill="#00E4E5"/><path d="M303.1 80.6h20.3l-4.6 19.6M228.3 234.3c3.6 0 6.3-3.2 5.7-6.8l-4.1-24.1" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M226.2 229.5h-68.9v1.2c0 2 1.6 3.7 3.7 3.7h60.1c2.8 0 5-2.2 5.1-4.9Z" fill="#C7DEFF"/><path d="M180.699 226.8h-19.9c-2.8 0-4.6 3-3.3 5.5m0 0c.6 1.2 1.9 2 3.3 2h57.8M175.9 203.4l3.6 17.6M241.2 234.3h65.1M104.6 234.3h41.3" stroke="#071F4D"/><path d="M206.2 234.3h14.9c3.1 0 5.5-2.8 5-5.9l-4.3-24.9M160.7 226.8h46M62.2 226.1h-9.5c-1.2 0-2.2-1-2.2-2.2v-18.3c0-1.2 1-2.2 2.2-2.2h9.5" stroke="#071F4D"/><path d="M53.4 171.7H68c2.1 0 3.7 1.7 3.7 3.7v16.1M79.1 192v-21.8c0-2.5 2-4.6 4.6-4.6h2.2c2.5 0 4.5-2 4.5-4.5m0 0c0-2.5-2-4.5-4.5-4.5H56.1c-2.4 0-4.3-1.9-4.3-4.3V148M71.2 165.2h-18M64 181.7v10.1" stroke="#C7DEFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M85.7 120H124c4.3 0 7.7-3.5 7.7-7.7V65.5H94.2c-4.7 0-8.5 4.9-8.5 11V120Z" fill="#C7DEFF"/><path d="M85.7 110.7V73c0-4.1 3.4-7.5 7.5-7.5h38.5M146.2 73.8v-2.5c0-3.2-2-5.8-5.8-5.8-2.8 0-6 1.1-6 5.8v42.4c0 4.7-3.8 8.5-8.5 8.5h-15.6" stroke="#071F4D"/><path d="M119.7 122.3H87c-6.1 0-11.1-5-11.1-11.1m0 0h39M126.1 122.3c-6.1 0-11.1-5-11.1-11.1" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M85.4 122.1h37.2c-6.5-1.8-8-10.5-8-10.5H76.2c.6 8.8 9.2 10.5 9.2 10.5Z" fill="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M95.8 102.9h4.8V83.6h-4.8v19.3ZM106.6 102.9h4.8V77.6h-4.8v25.3ZM117.3 102.9h4.8V89.1h-4.8v13.8Z" fill="#fff"/><path d="M273.2 195.9h16.9M261.2 195.9h5" stroke="#fff"/><path d="M62.4 201.9v2.9M62.4 224.5v2.9" stroke="#071F4D"/><path d="m153.6 138.1 9.7-19.1M168.8 138.1l9.7-19.1M184.1 138.1l9.7-19.1M199.4 138.1l9.7-19.1M214.6 138.1l9.8-19.1M229.9 138.1l9.7-19.1" stroke="#fff"/><path d="M148.3 138.1h121.6V119H148.3v19.1Z" stroke="#071F4D"/></g></svg>',
|
|
32980
|
+
width: 400,
|
|
32981
|
+
height: 300,
|
|
32982
|
+
name: 'loading_pic',
|
|
32983
|
+
positionType: IconPosition.left
|
|
32984
|
+
};
|
|
32985
|
+
},
|
|
32903
32986
|
get expand() {
|
|
32904
32987
|
return {
|
|
32905
32988
|
type: 'svg',
|
|
@@ -32972,15 +33055,21 @@
|
|
|
32972
33055
|
}
|
|
32973
33056
|
|
|
32974
33057
|
function calcKeepAspectRatioSize(width, height, maxWidth, maxHeight) {
|
|
32975
|
-
|
|
32976
|
-
|
|
32977
|
-
|
|
32978
|
-
|
|
32979
|
-
|
|
33058
|
+
const rectWidth = width;
|
|
33059
|
+
const rectHeight = height;
|
|
33060
|
+
const containerWidth = maxWidth;
|
|
33061
|
+
const containerHeight = maxHeight;
|
|
33062
|
+
const containerRatio = containerWidth / containerHeight;
|
|
33063
|
+
const rectRatio = rectWidth / rectHeight;
|
|
33064
|
+
let newWidth;
|
|
33065
|
+
let newHeight;
|
|
33066
|
+
if (rectRatio > containerRatio) {
|
|
33067
|
+
newWidth = containerWidth;
|
|
33068
|
+
newHeight = newWidth / rectRatio;
|
|
32980
33069
|
}
|
|
32981
|
-
|
|
32982
|
-
newHeight =
|
|
32983
|
-
newWidth =
|
|
33070
|
+
else {
|
|
33071
|
+
newHeight = containerHeight;
|
|
33072
|
+
newWidth = newHeight * rectRatio;
|
|
32984
33073
|
}
|
|
32985
33074
|
return {
|
|
32986
33075
|
width: newWidth,
|
|
@@ -33008,7 +33097,6 @@
|
|
|
33008
33097
|
return { x, y };
|
|
33009
33098
|
}
|
|
33010
33099
|
|
|
33011
|
-
get$1();
|
|
33012
33100
|
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
33013
33101
|
const headerStyle = table._getCellStyle(col, row);
|
|
33014
33102
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
@@ -33052,31 +33140,29 @@
|
|
|
33052
33140
|
image.name = 'image';
|
|
33053
33141
|
image.keepAspectRatio = keepAspectRatio;
|
|
33054
33142
|
if (keepAspectRatio || imageAutoSizing) {
|
|
33055
|
-
image.
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
|
|
33064
|
-
|
|
33065
|
-
|
|
33066
|
-
y: pos.y,
|
|
33067
|
-
width: imageWidth,
|
|
33068
|
-
height: imageHeight,
|
|
33069
|
-
dx: isMerge ? -table.getColsWidth(cellGroup.mergeStartCol, col - 1) : 0,
|
|
33070
|
-
dy: isMerge ? -table.getRowsHeight(cellGroup.mergeStartRow, row - 1) : 0
|
|
33071
|
-
});
|
|
33072
|
-
}
|
|
33073
|
-
table.scenegraph.updateNextFrame();
|
|
33074
|
-
};
|
|
33143
|
+
if (image.resources &&
|
|
33144
|
+
image.resources.has(image.attribute.image) &&
|
|
33145
|
+
image.resources.get(image.attribute.image).state === 'success') {
|
|
33146
|
+
updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table);
|
|
33147
|
+
}
|
|
33148
|
+
else {
|
|
33149
|
+
image.successCallback = () => {
|
|
33150
|
+
updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table);
|
|
33151
|
+
table.scenegraph.updateNextFrame();
|
|
33152
|
+
};
|
|
33153
|
+
}
|
|
33075
33154
|
}
|
|
33076
33155
|
else {
|
|
33077
|
-
image.
|
|
33156
|
+
if (image.resources &&
|
|
33157
|
+
image.resources.has(image.attribute.image) &&
|
|
33158
|
+
image.resources.get(image.attribute.image).state === 'success') {
|
|
33078
33159
|
updateImageCellContentWhileResize(cellGroup, col, row, table);
|
|
33079
|
-
}
|
|
33160
|
+
}
|
|
33161
|
+
else {
|
|
33162
|
+
image.successCallback = () => {
|
|
33163
|
+
updateImageCellContentWhileResize(cellGroup, col, row, table);
|
|
33164
|
+
};
|
|
33165
|
+
}
|
|
33080
33166
|
}
|
|
33081
33167
|
image.failCallback = () => {
|
|
33082
33168
|
const regedIcons = get$1();
|
|
@@ -33189,6 +33275,47 @@
|
|
|
33189
33275
|
isMerge: false
|
|
33190
33276
|
};
|
|
33191
33277
|
}
|
|
33278
|
+
function updateImageDxDy(startCol, endCol, startRow, endRow, table) {
|
|
33279
|
+
for (let col = startCol; col <= endCol; col++) {
|
|
33280
|
+
for (let row = startRow; row <= endRow; row++) {
|
|
33281
|
+
const cellGroup = table.scenegraph.getCell(col, row);
|
|
33282
|
+
if (cellGroup) {
|
|
33283
|
+
const image = cellGroup.getChildByName('image');
|
|
33284
|
+
if (image) {
|
|
33285
|
+
image.setAttributes({
|
|
33286
|
+
dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
|
|
33287
|
+
dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
|
|
33288
|
+
});
|
|
33289
|
+
}
|
|
33290
|
+
}
|
|
33291
|
+
}
|
|
33292
|
+
}
|
|
33293
|
+
}
|
|
33294
|
+
function updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table) {
|
|
33295
|
+
const originImage = image.resources.get(image.attribute.image).data;
|
|
33296
|
+
const { col, row } = cellGroup;
|
|
33297
|
+
if (imageAutoSizing && !isDamagePic(image)) {
|
|
33298
|
+
_adjustWidthHeight(col, row, originImage.width, originImage.height, table.scenegraph, padding);
|
|
33299
|
+
}
|
|
33300
|
+
if (keepAspectRatio || isDamagePic(image)) {
|
|
33301
|
+
const { width: cellWidth, height: cellHeight, isMerge } = getCellRange(cellGroup, table);
|
|
33302
|
+
const { width: imageWidth, height: imageHeight } = calcKeepAspectRatioSize(originImage.width, originImage.height, cellWidth - padding[1] - padding[3], cellHeight - padding[0] - padding[2]);
|
|
33303
|
+
const pos = calcStartPosition(0, 0, cellWidth, cellHeight, imageWidth, imageHeight, textAlign, textBaseline, padding);
|
|
33304
|
+
image.setAttributes({
|
|
33305
|
+
x: pos.x,
|
|
33306
|
+
y: pos.y,
|
|
33307
|
+
width: imageWidth,
|
|
33308
|
+
height: imageHeight
|
|
33309
|
+
});
|
|
33310
|
+
if (isMerge) {
|
|
33311
|
+
updateImageDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
|
|
33312
|
+
}
|
|
33313
|
+
}
|
|
33314
|
+
}
|
|
33315
|
+
function isDamagePic(image) {
|
|
33316
|
+
const regedIcons = get$1();
|
|
33317
|
+
return image.attribute.image === regedIcons.damage_pic.svg;
|
|
33318
|
+
}
|
|
33192
33319
|
|
|
33193
33320
|
function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table) {
|
|
33194
33321
|
if (progressBarDefine.dependField) {
|
|
@@ -34295,8 +34422,8 @@
|
|
|
34295
34422
|
iconAttribute.funcType = icon.funcType;
|
|
34296
34423
|
iconAttribute.interactive = icon.interactive;
|
|
34297
34424
|
let hierarchyOffset = 0;
|
|
34298
|
-
if (isNumber$
|
|
34299
|
-
isNumber$
|
|
34425
|
+
if (isNumber$2(col) &&
|
|
34426
|
+
isNumber$2(row) &&
|
|
34300
34427
|
table &&
|
|
34301
34428
|
(icon.funcType === IconFuncTypeEnum.collapse || icon.funcType === IconFuncTypeEnum.expand)) {
|
|
34302
34429
|
hierarchyOffset = range
|
|
@@ -35739,10 +35866,10 @@
|
|
|
35739
35866
|
|
|
35740
35867
|
function isMergeCellGroup(cellGroup) {
|
|
35741
35868
|
if (cellGroup.role === 'cell' &&
|
|
35742
|
-
isNumber$
|
|
35743
|
-
isNumber$
|
|
35744
|
-
isNumber$
|
|
35745
|
-
isNumber$
|
|
35869
|
+
isNumber$2(cellGroup.mergeStartCol) &&
|
|
35870
|
+
isNumber$2(cellGroup.mergeStartRow) &&
|
|
35871
|
+
isNumber$2(cellGroup.mergeEndCol) &&
|
|
35872
|
+
isNumber$2(cellGroup.mergeEndRow)) {
|
|
35746
35873
|
return true;
|
|
35747
35874
|
}
|
|
35748
35875
|
return false;
|
|
@@ -35764,10 +35891,10 @@
|
|
|
35764
35891
|
max = domainMax + (domainMax - domainMin) * axisOption.expand.max;
|
|
35765
35892
|
}
|
|
35766
35893
|
}
|
|
35767
|
-
if (isNumber$
|
|
35894
|
+
if (isNumber$2(axisOption?.min)) {
|
|
35768
35895
|
min = axisOption.min;
|
|
35769
35896
|
}
|
|
35770
|
-
if (isNumber$
|
|
35897
|
+
if (isNumber$2(axisOption?.max)) {
|
|
35771
35898
|
max = axisOption.max;
|
|
35772
35899
|
}
|
|
35773
35900
|
let scale;
|
|
@@ -35809,7 +35936,7 @@
|
|
|
35809
35936
|
delete scale._niceType;
|
|
35810
35937
|
let scaleTicks;
|
|
35811
35938
|
if (!skipTick) {
|
|
35812
|
-
scaleTicks = scale.ticks(isNumber$
|
|
35939
|
+
scaleTicks = scale.ticks(isNumber$2(axisOption?.tickCount) ? axisOption?.tickCount : DEFAULT_CONTINUOUS_TICK_COUNT, {
|
|
35813
35940
|
noDecimals: axisOption?.tick?.noDecimals
|
|
35814
35941
|
});
|
|
35815
35942
|
}
|
|
@@ -36044,13 +36171,13 @@
|
|
|
36044
36171
|
}
|
|
36045
36172
|
}
|
|
36046
36173
|
}
|
|
36047
|
-
if (isNumber$
|
|
36174
|
+
if (isNumber$2(axisOption?.min)) {
|
|
36048
36175
|
range.min = axisOption.min;
|
|
36049
36176
|
if (range.min > 0) {
|
|
36050
36177
|
axisOption.zero = false;
|
|
36051
36178
|
}
|
|
36052
36179
|
}
|
|
36053
|
-
if (isNumber$
|
|
36180
|
+
if (isNumber$2(axisOption?.max)) {
|
|
36054
36181
|
range.max = axisOption.max;
|
|
36055
36182
|
if (range.max < 0) {
|
|
36056
36183
|
axisOption.zero = false;
|
|
@@ -36095,13 +36222,13 @@
|
|
|
36095
36222
|
}
|
|
36096
36223
|
}
|
|
36097
36224
|
}
|
|
36098
|
-
if (isNumber$
|
|
36225
|
+
if (isNumber$2(axisOption?.min)) {
|
|
36099
36226
|
range.min = axisOption.min;
|
|
36100
36227
|
if (range.min > 0) {
|
|
36101
36228
|
axisOption.zero = false;
|
|
36102
36229
|
}
|
|
36103
36230
|
}
|
|
36104
|
-
if (isNumber$
|
|
36231
|
+
if (isNumber$2(axisOption?.max)) {
|
|
36105
36232
|
range.max = axisOption.max;
|
|
36106
36233
|
if (range.max < 0) {
|
|
36107
36234
|
axisOption.zero = false;
|
|
@@ -36177,13 +36304,13 @@
|
|
|
36177
36304
|
}
|
|
36178
36305
|
}
|
|
36179
36306
|
}
|
|
36180
|
-
if (isNumber$
|
|
36307
|
+
if (isNumber$2(axisOption?.min)) {
|
|
36181
36308
|
range.min = axisOption.min;
|
|
36182
36309
|
if (range.min > 0) {
|
|
36183
36310
|
axisOption.zero = false;
|
|
36184
36311
|
}
|
|
36185
36312
|
}
|
|
36186
|
-
if (isNumber$
|
|
36313
|
+
if (isNumber$2(axisOption?.max)) {
|
|
36187
36314
|
range.max = axisOption.max;
|
|
36188
36315
|
if (range.max < 0) {
|
|
36189
36316
|
axisOption.zero = false;
|
|
@@ -36225,13 +36352,13 @@
|
|
|
36225
36352
|
}
|
|
36226
36353
|
}
|
|
36227
36354
|
}
|
|
36228
|
-
if (isNumber$
|
|
36355
|
+
if (isNumber$2(axisOption?.min)) {
|
|
36229
36356
|
range.min = axisOption.min;
|
|
36230
36357
|
if (range.min > 0) {
|
|
36231
36358
|
axisOption.zero = false;
|
|
36232
36359
|
}
|
|
36233
36360
|
}
|
|
36234
|
-
if (isNumber$
|
|
36361
|
+
if (isNumber$2(axisOption?.max)) {
|
|
36235
36362
|
range.max = axisOption.max;
|
|
36236
36363
|
if (range.max < 0) {
|
|
36237
36364
|
axisOption.zero = false;
|
|
@@ -36411,13 +36538,13 @@
|
|
|
36411
36538
|
const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, layout._table.getColWidth(col));
|
|
36412
36539
|
range.min = !isNaN(niceRange[0]) ? niceRange[0] : 0;
|
|
36413
36540
|
range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
|
|
36414
|
-
if (isNumber$
|
|
36541
|
+
if (isNumber$2(axisOption?.min)) {
|
|
36415
36542
|
range.min = axisOption.min;
|
|
36416
36543
|
if (range.min > 0) {
|
|
36417
36544
|
axisOption.zero = false;
|
|
36418
36545
|
}
|
|
36419
36546
|
}
|
|
36420
|
-
if (isNumber$
|
|
36547
|
+
if (isNumber$2(axisOption?.max)) {
|
|
36421
36548
|
range.max = axisOption.max;
|
|
36422
36549
|
if (range.max < 0) {
|
|
36423
36550
|
axisOption.zero = false;
|
|
@@ -36893,7 +37020,7 @@
|
|
|
36893
37020
|
}
|
|
36894
37021
|
else {
|
|
36895
37022
|
const defaultHeight = table.getDefaultRowHeight(row);
|
|
36896
|
-
if (isNumber$
|
|
37023
|
+
if (isNumber$2(defaultHeight)) {
|
|
36897
37024
|
return defaultHeight;
|
|
36898
37025
|
}
|
|
36899
37026
|
}
|
|
@@ -36927,7 +37054,7 @@
|
|
|
36927
37054
|
: table.getBodyColumnType(col, row);
|
|
36928
37055
|
if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar' && cellType !== 'checkbox') {
|
|
36929
37056
|
const defaultHeight = table.getDefaultRowHeight(row);
|
|
36930
|
-
maxHeight = Math.max(maxHeight, isNumber$
|
|
37057
|
+
maxHeight = Math.max(maxHeight, isNumber$2(defaultHeight) ? defaultHeight : table.defaultRowHeight);
|
|
36931
37058
|
continue;
|
|
36932
37059
|
}
|
|
36933
37060
|
const textHeight = computeTextHeight(col, row, cellType, table);
|
|
@@ -37201,7 +37328,7 @@
|
|
|
37201
37328
|
wordBreak: 'break-word',
|
|
37202
37329
|
whiteSpace: lines.length === 1 && !autoWrapText ? 'no-wrap' : 'normal'
|
|
37203
37330
|
});
|
|
37204
|
-
maxHeight = utilTextMark.AABBBounds.height();
|
|
37331
|
+
maxHeight = utilTextMark.AABBBounds.height() || (typeof lineHeight === 'number' ? lineHeight : fontSize);
|
|
37205
37332
|
}
|
|
37206
37333
|
else {
|
|
37207
37334
|
maxHeight = lines.length * lineHeight;
|
|
@@ -39765,6 +39892,90 @@
|
|
|
39765
39892
|
injectable()
|
|
39766
39893
|
], SplitRectAfterRenderContribution);
|
|
39767
39894
|
|
|
39895
|
+
let loadingImage;
|
|
39896
|
+
let VTableDrawItemInterceptorContribution = class VTableDrawItemInterceptorContribution {
|
|
39897
|
+
order = 1;
|
|
39898
|
+
interceptors;
|
|
39899
|
+
constructor() {
|
|
39900
|
+
this.interceptors = [new ImageDrawItemInterceptorContribution()];
|
|
39901
|
+
}
|
|
39902
|
+
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
39903
|
+
for (let i = 0; i < this.interceptors.length; i++) {
|
|
39904
|
+
if (this.interceptors[i].afterDrawItem &&
|
|
39905
|
+
this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) {
|
|
39906
|
+
return true;
|
|
39907
|
+
}
|
|
39908
|
+
}
|
|
39909
|
+
return false;
|
|
39910
|
+
}
|
|
39911
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
39912
|
+
if ((!graphic.in3dMode || drawContext.in3dInterceptor) &&
|
|
39913
|
+
!graphic.shadowRoot &&
|
|
39914
|
+
!(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) {
|
|
39915
|
+
return false;
|
|
39916
|
+
}
|
|
39917
|
+
for (let i = 0; i < this.interceptors.length; i++) {
|
|
39918
|
+
if (this.interceptors[i].beforeDrawItem &&
|
|
39919
|
+
this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) {
|
|
39920
|
+
return true;
|
|
39921
|
+
}
|
|
39922
|
+
}
|
|
39923
|
+
return false;
|
|
39924
|
+
}
|
|
39925
|
+
};
|
|
39926
|
+
VTableDrawItemInterceptorContribution = __decorate([
|
|
39927
|
+
injectable()
|
|
39928
|
+
], VTableDrawItemInterceptorContribution);
|
|
39929
|
+
class ImageDrawItemInterceptorContribution {
|
|
39930
|
+
order = 1;
|
|
39931
|
+
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
39932
|
+
if (graphic.type === 'image') {
|
|
39933
|
+
this.drawItem(graphic, renderService, drawContext, drawContribution, params);
|
|
39934
|
+
}
|
|
39935
|
+
return false;
|
|
39936
|
+
}
|
|
39937
|
+
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
39938
|
+
const { image: url } = graphic.attribute;
|
|
39939
|
+
if (!url || !graphic.resources) {
|
|
39940
|
+
return false;
|
|
39941
|
+
}
|
|
39942
|
+
const res = graphic.resources.get(url);
|
|
39943
|
+
if (res.state !== 'loading') {
|
|
39944
|
+
return false;
|
|
39945
|
+
}
|
|
39946
|
+
if (!loadingImage) {
|
|
39947
|
+
const regedIcons = get$1();
|
|
39948
|
+
const svg = regedIcons.loading_pic.svg;
|
|
39949
|
+
const width = regedIcons.loading_pic.width;
|
|
39950
|
+
const height = regedIcons.loading_pic.height;
|
|
39951
|
+
loadingImage = createImage({
|
|
39952
|
+
width,
|
|
39953
|
+
height,
|
|
39954
|
+
image: svg
|
|
39955
|
+
});
|
|
39956
|
+
}
|
|
39957
|
+
const { image: loadingUrl } = loadingImage.attribute;
|
|
39958
|
+
if (!url || !loadingImage.resources) {
|
|
39959
|
+
return false;
|
|
39960
|
+
}
|
|
39961
|
+
const loadingRes = loadingImage.resources.get(loadingUrl);
|
|
39962
|
+
if (loadingRes.state !== 'success') {
|
|
39963
|
+
return false;
|
|
39964
|
+
}
|
|
39965
|
+
const { context } = drawContext;
|
|
39966
|
+
context.highPerformanceSave();
|
|
39967
|
+
graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, true);
|
|
39968
|
+
graphic.glyphHost &&
|
|
39969
|
+
graphic.glyphHost.parent &&
|
|
39970
|
+
context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, true);
|
|
39971
|
+
const b = graphic.AABBBounds;
|
|
39972
|
+
const { width, height } = calcKeepAspectRatioSize(loadingRes.data.width, loadingRes.data.height, b.width(), b.height());
|
|
39973
|
+
context.drawImage(loadingRes.data, b.x1 + (b.width() - width) / 2, b.y1 + (b.height() - height) / 2, width, height);
|
|
39974
|
+
context.highPerformanceRestore();
|
|
39975
|
+
return true;
|
|
39976
|
+
}
|
|
39977
|
+
}
|
|
39978
|
+
|
|
39768
39979
|
var splitModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
39769
39980
|
if (isBound(SplitRectBeforeRenderContribution$1)) {
|
|
39770
39981
|
rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope();
|
|
@@ -39807,6 +40018,8 @@
|
|
|
39807
40018
|
bind(GroupRenderContribution).toService(ClipBodyGroupBeforeRenderContribution);
|
|
39808
40019
|
bind(ClipBodyGroupAfterRenderContribution).toSelf().inSingletonScope();
|
|
39809
40020
|
bind(GroupRenderContribution).toService(ClipBodyGroupAfterRenderContribution);
|
|
40021
|
+
bind(VTableDrawItemInterceptorContribution).toSelf().inSingletonScope();
|
|
40022
|
+
bind(DrawItemInterceptor).toService(VTableDrawItemInterceptorContribution);
|
|
39810
40023
|
});
|
|
39811
40024
|
|
|
39812
40025
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
@@ -40218,7 +40431,7 @@
|
|
|
40218
40431
|
columnGroup.role = 'column';
|
|
40219
40432
|
columnGroup.col = i;
|
|
40220
40433
|
containerGroup.addChild(columnGroup);
|
|
40221
|
-
const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$
|
|
40434
|
+
const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$2(defaultHeaderRowHeight) ? defaultHeaderRowHeight : defaultRowHeight, table, cellLocation, rowLimit);
|
|
40222
40435
|
x += default2Width;
|
|
40223
40436
|
heightMax = Math.max(heightMax, default2Height);
|
|
40224
40437
|
}
|
|
@@ -40436,7 +40649,7 @@
|
|
|
40436
40649
|
const deltaX = screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);
|
|
40437
40650
|
proxy.table.scenegraph.proxy.deltaX += deltaX;
|
|
40438
40651
|
proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;
|
|
40439
|
-
proxy.totalCol = direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count;
|
|
40652
|
+
proxy.totalCol = Math.max(0, Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count));
|
|
40440
40653
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
40441
40654
|
proxy.colUpdatePos = distStartCol;
|
|
40442
40655
|
proxy.colUpdateDirection = direction;
|
|
@@ -40473,7 +40686,7 @@
|
|
|
40473
40686
|
proxy.table.scenegraph.proxy.deltaX = deltaX;
|
|
40474
40687
|
}
|
|
40475
40688
|
proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;
|
|
40476
|
-
proxy.totalCol = direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count;
|
|
40689
|
+
proxy.totalCol = Math.max(0, Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count));
|
|
40477
40690
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
40478
40691
|
proxy.colUpdatePos = proxy.colStart;
|
|
40479
40692
|
proxy.colUpdateDirection = distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? 'right' : 'left';
|
|
@@ -41137,7 +41350,7 @@
|
|
|
41137
41350
|
computeColsWidth(this.table, this.currentCol + 1, endCol);
|
|
41138
41351
|
for (let row = 0; row < this.table.rowCount; row++) {
|
|
41139
41352
|
const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
|
|
41140
|
-
if (isNumber$
|
|
41353
|
+
if (isNumber$2(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {
|
|
41141
41354
|
this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
41142
41355
|
}
|
|
41143
41356
|
}
|
|
@@ -41945,7 +42158,7 @@
|
|
|
41945
42158
|
const beforeRow = removeRows[removeRows.length - 1] - 1;
|
|
41946
42159
|
const afterRow = removeRows[0] - removeRows.length + 1;
|
|
41947
42160
|
const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);
|
|
41948
|
-
isNumber$
|
|
42161
|
+
isNumber$2(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
|
|
41949
42162
|
}
|
|
41950
42163
|
scene.table._clearRowRangeHeightsMap();
|
|
41951
42164
|
let updateAfter;
|
|
@@ -41959,7 +42172,7 @@
|
|
|
41959
42172
|
const beforeRow = addRows[0] - 1;
|
|
41960
42173
|
const afterRow = addRows[addRows.length - 1] + 1;
|
|
41961
42174
|
const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);
|
|
41962
|
-
isNumber$
|
|
42175
|
+
isNumber$2(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
|
|
41963
42176
|
}
|
|
41964
42177
|
for (let col = 0; col < table.colCount; col++) {
|
|
41965
42178
|
updateRows.forEach(r => {
|
|
@@ -41980,9 +42193,9 @@
|
|
|
41980
42193
|
const beforeRow = updateRows[0] - 1;
|
|
41981
42194
|
const afterRow = updateRows[updateRows.length - 1] + 1;
|
|
41982
42195
|
const rowUpdatePos = updateMergeCellGroup(beforeRow, afterRow, scene);
|
|
41983
|
-
isNumber$
|
|
42196
|
+
isNumber$2(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
|
|
41984
42197
|
}
|
|
41985
|
-
if (isNumber$
|
|
42198
|
+
if (isNumber$2(updateAfter)) {
|
|
41986
42199
|
for (let col = 0; col < table.colCount; col++) {
|
|
41987
42200
|
for (let row = updateAfter; row < table.rowCount; row++) {
|
|
41988
42201
|
const cellGroup = scene.highPerformanceGetCell(col, row, true);
|
|
@@ -41992,7 +42205,7 @@
|
|
|
41992
42205
|
scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);
|
|
41993
42206
|
}
|
|
41994
42207
|
if (addRows.length) {
|
|
41995
|
-
if (!isNumber$
|
|
42208
|
+
if (!isNumber$2(updateAfter)) {
|
|
41996
42209
|
const minRow = Math.min(...addRows);
|
|
41997
42210
|
scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
|
|
41998
42211
|
}
|
|
@@ -42300,7 +42513,7 @@
|
|
|
42300
42513
|
});
|
|
42301
42514
|
});
|
|
42302
42515
|
});
|
|
42303
|
-
changedCells.
|
|
42516
|
+
changedCells.clear();
|
|
42304
42517
|
const { scrollTop, scrollLeft, frozenRowCount, frozenColCount } = table;
|
|
42305
42518
|
const frozenRowsHeight = table.getFrozenRowsHeight();
|
|
42306
42519
|
const frozenColsWidth = table.getFrozenColsWidth();
|
|
@@ -42364,10 +42577,10 @@
|
|
|
42364
42577
|
}
|
|
42365
42578
|
}
|
|
42366
42579
|
function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, table) {
|
|
42367
|
-
if (isNumber$
|
|
42368
|
-
isNumber$
|
|
42369
|
-
isNumber$
|
|
42370
|
-
isNumber$
|
|
42580
|
+
if (isNumber$2(cellGroup.mergeStartCol) &&
|
|
42581
|
+
isNumber$2(cellGroup.mergeStartRow) &&
|
|
42582
|
+
isNumber$2(cellGroup.mergeEndCol) &&
|
|
42583
|
+
isNumber$2(cellGroup.mergeEndRow)) {
|
|
42371
42584
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
42372
42585
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
42373
42586
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
@@ -42399,34 +42612,36 @@
|
|
|
42399
42612
|
const textBottom = graphic.globalAABBBounds.y2;
|
|
42400
42613
|
if (textTop < minTop) {
|
|
42401
42614
|
const deltaHeight = textTop - minTop;
|
|
42402
|
-
changedCells.
|
|
42403
|
-
col
|
|
42404
|
-
|
|
42405
|
-
|
|
42406
|
-
|
|
42407
|
-
|
|
42615
|
+
!changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&
|
|
42616
|
+
changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {
|
|
42617
|
+
col: cellGroup.col,
|
|
42618
|
+
row: cellGroup.row,
|
|
42619
|
+
dx: cellGroup.firstChild?.attribute.dx ?? 0,
|
|
42620
|
+
dy: cellGroup.firstChild?.attribute.dy ?? 0
|
|
42621
|
+
});
|
|
42408
42622
|
cellGroup.forEachChildren((child) => {
|
|
42409
42623
|
child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight + 2);
|
|
42410
42624
|
});
|
|
42411
42625
|
}
|
|
42412
42626
|
else if (textBottom > maxTop) {
|
|
42413
42627
|
const deltaHeight = textBottom - maxTop;
|
|
42414
|
-
changedCells.
|
|
42415
|
-
col
|
|
42416
|
-
|
|
42417
|
-
|
|
42418
|
-
|
|
42419
|
-
|
|
42628
|
+
!changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&
|
|
42629
|
+
changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {
|
|
42630
|
+
col: cellGroup.col,
|
|
42631
|
+
row: cellGroup.row,
|
|
42632
|
+
dx: cellGroup.firstChild?.attribute.dx ?? 0,
|
|
42633
|
+
dy: cellGroup.firstChild?.attribute.dy ?? 0
|
|
42634
|
+
});
|
|
42420
42635
|
cellGroup.forEachChildren((child) => {
|
|
42421
42636
|
child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight);
|
|
42422
42637
|
});
|
|
42423
42638
|
}
|
|
42424
42639
|
}
|
|
42425
42640
|
function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, table) {
|
|
42426
|
-
if (isNumber$
|
|
42427
|
-
isNumber$
|
|
42428
|
-
isNumber$
|
|
42429
|
-
isNumber$
|
|
42641
|
+
if (isNumber$2(cellGroup.mergeStartCol) &&
|
|
42642
|
+
isNumber$2(cellGroup.mergeStartRow) &&
|
|
42643
|
+
isNumber$2(cellGroup.mergeEndCol) &&
|
|
42644
|
+
isNumber$2(cellGroup.mergeEndRow)) {
|
|
42430
42645
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
42431
42646
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
42432
42647
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
@@ -42448,24 +42663,26 @@
|
|
|
42448
42663
|
const textRight = text.globalAABBBounds.x2;
|
|
42449
42664
|
if (textLeft < minLeft) {
|
|
42450
42665
|
const deltaWidth = textLeft - minLeft;
|
|
42451
|
-
changedCells.
|
|
42452
|
-
col
|
|
42453
|
-
|
|
42454
|
-
|
|
42455
|
-
|
|
42456
|
-
|
|
42666
|
+
!changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&
|
|
42667
|
+
changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {
|
|
42668
|
+
col: cellGroup.col,
|
|
42669
|
+
row: cellGroup.row,
|
|
42670
|
+
dx: cellGroup.firstChild?.attribute.dx ?? 0,
|
|
42671
|
+
dy: cellGroup.firstChild?.attribute.dy ?? 0
|
|
42672
|
+
});
|
|
42457
42673
|
cellGroup.forEachChildren((child) => {
|
|
42458
42674
|
child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth + 2);
|
|
42459
42675
|
});
|
|
42460
42676
|
}
|
|
42461
42677
|
else if (textRight > maxLeft) {
|
|
42462
42678
|
const deltaWidth = textRight - maxLeft;
|
|
42463
|
-
changedCells.
|
|
42464
|
-
col
|
|
42465
|
-
|
|
42466
|
-
|
|
42467
|
-
|
|
42468
|
-
|
|
42679
|
+
!changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&
|
|
42680
|
+
changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {
|
|
42681
|
+
col: cellGroup.col,
|
|
42682
|
+
row: cellGroup.row,
|
|
42683
|
+
dx: cellGroup.firstChild?.attribute.dx ?? 0,
|
|
42684
|
+
dy: cellGroup.firstChild?.attribute.dy ?? 0
|
|
42685
|
+
});
|
|
42469
42686
|
cellGroup.forEachChildren((child) => {
|
|
42470
42687
|
child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth);
|
|
42471
42688
|
});
|
|
@@ -43458,7 +43675,7 @@
|
|
|
43458
43675
|
}
|
|
43459
43676
|
}
|
|
43460
43677
|
});
|
|
43461
|
-
if (isNumber$
|
|
43678
|
+
if (isNumber$2(updateAfter)) {
|
|
43462
43679
|
for (let col = updateAfter; col < table.colCount; col++) {
|
|
43463
43680
|
for (let row = 0; row < table.rowCount; row++) {
|
|
43464
43681
|
const cellGroup = scene.highPerformanceGetCell(col, row, true);
|
|
@@ -43468,7 +43685,7 @@
|
|
|
43468
43685
|
scene.proxy.colUpdatePos = updateAfter;
|
|
43469
43686
|
}
|
|
43470
43687
|
if (addCols.length) {
|
|
43471
|
-
if (!isNumber$
|
|
43688
|
+
if (!isNumber$2(updateAfter)) {
|
|
43472
43689
|
const minCol = Math.min(...addCols);
|
|
43473
43690
|
scene.proxy.colUpdatePos = minCol;
|
|
43474
43691
|
}
|
|
@@ -45242,7 +45459,10 @@
|
|
|
45242
45459
|
}
|
|
45243
45460
|
else if (col >= 0 && row >= 0) {
|
|
45244
45461
|
const cellRange = table.getCellRange(col, row);
|
|
45245
|
-
state.select.ranges.push(
|
|
45462
|
+
state.select.ranges.push({
|
|
45463
|
+
start: { col: cellRange.start.col, row: cellRange.start.row },
|
|
45464
|
+
end: { col: cellRange.end.col, row: cellRange.end.row }
|
|
45465
|
+
});
|
|
45246
45466
|
}
|
|
45247
45467
|
cellPos.col = col;
|
|
45248
45468
|
cellPos.row = row;
|
|
@@ -51061,7 +51281,7 @@
|
|
|
51061
51281
|
return TABLE_EVENT_TYPE;
|
|
51062
51282
|
}
|
|
51063
51283
|
options;
|
|
51064
|
-
version = "0.18.
|
|
51284
|
+
version = "0.18.5-alpha.0";
|
|
51065
51285
|
pagination;
|
|
51066
51286
|
id = `VTable${Date.now()}`;
|
|
51067
51287
|
headerStyleCache;
|
|
@@ -51116,7 +51336,7 @@
|
|
|
51116
51336
|
internalProps.context = internalProps.canvas.getContext('2d');
|
|
51117
51337
|
}
|
|
51118
51338
|
internalProps.handler = new EventHandler();
|
|
51119
|
-
if (isNumber$
|
|
51339
|
+
if (isNumber$2(this.options.resizeTime)) {
|
|
51120
51340
|
internalProps.handler.resizeTime = this.options.resizeTime;
|
|
51121
51341
|
}
|
|
51122
51342
|
internalProps.pixelRatio = pixelRatio;
|
|
@@ -51206,7 +51426,7 @@
|
|
|
51206
51426
|
this.headerStyleCache = new Map();
|
|
51207
51427
|
this.bodyStyleCache = new Map();
|
|
51208
51428
|
this.bodyBottomStyleCache = new Map();
|
|
51209
|
-
internalProps.stick = { changedCells:
|
|
51429
|
+
internalProps.stick = { changedCells: new Map() };
|
|
51210
51430
|
internalProps.customMergeCell = options.customMergeCell;
|
|
51211
51431
|
}
|
|
51212
51432
|
throttleInvalidate = throttle2(this.render.bind(this), 200);
|
|
@@ -51510,11 +51730,11 @@
|
|
|
51510
51730
|
return Math.round(w);
|
|
51511
51731
|
}
|
|
51512
51732
|
getRowHeight(row) {
|
|
51513
|
-
if (this.rowHeightsMap.get(row)) {
|
|
51733
|
+
if (isValid$1(this.rowHeightsMap.get(row))) {
|
|
51514
51734
|
return this.rowHeightsMap.get(row);
|
|
51515
51735
|
}
|
|
51516
51736
|
const defaultHeight = this.getDefaultRowHeight(row);
|
|
51517
|
-
if (isNumber$
|
|
51737
|
+
if (isNumber$2(defaultHeight)) {
|
|
51518
51738
|
return defaultHeight;
|
|
51519
51739
|
}
|
|
51520
51740
|
return this.defaultRowHeight;
|
|
@@ -51548,9 +51768,9 @@
|
|
|
51548
51768
|
const height = Math.round(cachedLowerRowHeight +
|
|
51549
51769
|
(this.rowHeightsMap.get(endRow) ??
|
|
51550
51770
|
(this.isColumnHeader(0, endRow) || this.isCornerHeader(0, endRow)
|
|
51551
|
-
? Array.isArray(this.defaultHeaderRowHeight) && isNumber$
|
|
51771
|
+
? Array.isArray(this.defaultHeaderRowHeight) && isNumber$2(this.defaultHeaderRowHeight[endRow])
|
|
51552
51772
|
? this.defaultHeaderRowHeight[endRow]
|
|
51553
|
-
: isNumber$
|
|
51773
|
+
: isNumber$2(this.defaultHeaderRowHeight)
|
|
51554
51774
|
? this.defaultHeaderRowHeight
|
|
51555
51775
|
: this.internalProps.defaultRowHeight
|
|
51556
51776
|
: this.internalProps.defaultRowHeight)));
|
|
@@ -52212,6 +52432,7 @@
|
|
|
52212
52432
|
this.colWidthsMap = new NumberMap();
|
|
52213
52433
|
this.colContentWidthsMap = new NumberMap();
|
|
52214
52434
|
this.colWidthsLimit = {};
|
|
52435
|
+
internalProps.stick.changedCells.clear();
|
|
52215
52436
|
internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
|
|
52216
52437
|
this.scenegraph.updateStageBackground();
|
|
52217
52438
|
internalProps.autoWrapText = options.autoWrapText;
|
|
@@ -53668,10 +53889,10 @@
|
|
|
53668
53889
|
}
|
|
53669
53890
|
}
|
|
53670
53891
|
}
|
|
53671
|
-
if (isNumber$
|
|
53892
|
+
if (isNumber$2(axisOption?.min)) {
|
|
53672
53893
|
range.min = axisOption.min;
|
|
53673
53894
|
}
|
|
53674
|
-
if (isNumber$
|
|
53895
|
+
if (isNumber$2(axisOption?.max)) {
|
|
53675
53896
|
range.max = axisOption.max;
|
|
53676
53897
|
}
|
|
53677
53898
|
axes.push(merge({
|
|
@@ -53724,10 +53945,10 @@
|
|
|
53724
53945
|
}
|
|
53725
53946
|
}
|
|
53726
53947
|
}
|
|
53727
|
-
if (isNumber$
|
|
53948
|
+
if (isNumber$2(axisOption?.min)) {
|
|
53728
53949
|
range.min = axisOption.min;
|
|
53729
53950
|
}
|
|
53730
|
-
if (isNumber$
|
|
53951
|
+
if (isNumber$2(axisOption?.max)) {
|
|
53731
53952
|
range.max = axisOption.max;
|
|
53732
53953
|
}
|
|
53733
53954
|
axes.push(merge({
|
|
@@ -53807,10 +54028,10 @@
|
|
|
53807
54028
|
range.min = axisRange[0];
|
|
53808
54029
|
range.max = axisRange[1];
|
|
53809
54030
|
}
|
|
53810
|
-
if (isNumber$
|
|
54031
|
+
if (isNumber$2(axisOption?.min)) {
|
|
53811
54032
|
range.min = axisOption.min;
|
|
53812
54033
|
}
|
|
53813
|
-
if (isNumber$
|
|
54034
|
+
if (isNumber$2(axisOption?.max)) {
|
|
53814
54035
|
range.max = axisOption.max;
|
|
53815
54036
|
}
|
|
53816
54037
|
return {
|
|
@@ -62359,7 +62580,7 @@
|
|
|
62359
62580
|
}
|
|
62360
62581
|
|
|
62361
62582
|
registerForVrender();
|
|
62362
|
-
const version = "0.18.
|
|
62583
|
+
const version = "0.18.5-alpha.0";
|
|
62363
62584
|
function getIcons() {
|
|
62364
62585
|
return get$1();
|
|
62365
62586
|
}
|