@visactor/vtable 0.13.4-alpha.0 → 0.13.4-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +4 -5
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +5 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/render/layout/arc.d.ts +10 -21
- package/cjs/render/layout/arc.js +7 -9
- package/cjs/render/layout/arc.js.map +1 -1
- package/cjs/render/layout/circle.d.ts +10 -17
- package/cjs/render/layout/circle.js +5 -6
- package/cjs/render/layout/circle.js.map +1 -1
- package/cjs/render/layout/container.d.ts +10 -48
- package/cjs/render/layout/container.js +15 -100
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/group-element.d.ts +4 -24
- package/cjs/render/layout/group-element.js +4 -40
- package/cjs/render/layout/group-element.js.map +1 -1
- package/cjs/render/layout/group.d.ts +12 -0
- package/cjs/render/layout/group.js +18 -0
- package/cjs/render/layout/group.js.map +1 -0
- package/cjs/render/layout/icon.d.ts +10 -10
- package/cjs/render/layout/icon.js +11 -9
- package/cjs/render/layout/icon.js.map +1 -1
- package/cjs/render/layout/image.d.ts +10 -17
- package/cjs/render/layout/image.js +6 -7
- package/cjs/render/layout/image.js.map +1 -1
- package/cjs/render/layout/index.d.ts +2 -0
- package/cjs/render/layout/index.js +2 -1
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/render/layout/percent-calc.d.ts +1 -4
- package/cjs/render/layout/percent-calc.js.map +1 -1
- package/cjs/render/layout/rect.d.ts +10 -20
- package/cjs/render/layout/rect.js +5 -6
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/render/layout/tag.d.ts +14 -0
- package/cjs/render/layout/tag.js +21 -0
- package/cjs/render/layout/tag.js.map +1 -0
- package/cjs/render/layout/text.d.ts +9 -46
- package/cjs/render/layout/text.js +7 -18
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +2 -2
- package/cjs/scenegraph/component/custom.js +14 -6
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +5 -8
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -1
- package/cjs/tools/NumberMap.js +1 -1
- package/cjs/tools/Rect.js +1 -1
- package/cjs/ts-types/base-table.js +1 -1
- package/cjs/ts-types/common.js +1 -1
- package/cjs/ts-types/customElement.js +1 -1
- package/dist/vtable.js +305 -660
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +4 -5
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +5 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/render/layout/arc.d.ts +10 -21
- package/es/render/layout/arc.js +7 -7
- package/es/render/layout/arc.js.map +1 -1
- package/es/render/layout/circle.d.ts +10 -17
- package/es/render/layout/circle.js +7 -6
- package/es/render/layout/circle.js.map +1 -1
- package/es/render/layout/container.d.ts +10 -48
- package/es/render/layout/container.js +16 -107
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/group-element.d.ts +4 -24
- package/es/render/layout/group-element.js +4 -42
- package/es/render/layout/group-element.js.map +1 -1
- package/es/render/layout/group.d.ts +12 -0
- package/es/render/layout/group.js +12 -0
- package/es/render/layout/group.js.map +1 -0
- package/es/render/layout/icon.d.ts +10 -10
- package/es/render/layout/icon.js +12 -10
- package/es/render/layout/icon.js.map +1 -1
- package/es/render/layout/image.d.ts +10 -17
- package/es/render/layout/image.js +8 -7
- package/es/render/layout/image.js.map +1 -1
- package/es/render/layout/index.d.ts +2 -0
- package/es/render/layout/index.js +4 -0
- package/es/render/layout/index.js.map +1 -1
- package/es/render/layout/percent-calc.d.ts +1 -4
- package/es/render/layout/percent-calc.js.map +1 -1
- package/es/render/layout/rect.d.ts +10 -20
- package/es/render/layout/rect.js +7 -6
- package/es/render/layout/rect.js.map +1 -1
- package/es/render/layout/tag.d.ts +14 -0
- package/es/render/layout/tag.js +15 -0
- package/es/render/layout/tag.js.map +1 -0
- package/es/render/layout/text.d.ts +9 -46
- package/es/render/layout/text.js +9 -18
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +2 -2
- package/es/scenegraph/component/custom.js +15 -7
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +5 -8
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js +1 -1
- package/es/tools/NumberMap.js +1 -1
- package/es/tools/Rect.js +1 -1
- package/es/ts-types/base-table.js +1 -1
- package/es/ts-types/common.js +1 -1
- package/es/ts-types/customElement.js +1 -1
- package/package.json +1 -1
package/dist/vtable.js
CHANGED
|
@@ -7867,7 +7867,7 @@
|
|
|
7867
7867
|
let Application$1 = class Application {};
|
|
7868
7868
|
const application$1 = new Application$1();
|
|
7869
7869
|
|
|
7870
|
-
const DIRECTION_KEY$
|
|
7870
|
+
const DIRECTION_KEY$1 = {
|
|
7871
7871
|
horizontal: {
|
|
7872
7872
|
width: "width",
|
|
7873
7873
|
height: "height",
|
|
@@ -11618,7 +11618,7 @@
|
|
|
11618
11618
|
!function (GroupUpdateAABBBoundsMode) {
|
|
11619
11619
|
GroupUpdateAABBBoundsMode[GroupUpdateAABBBoundsMode.LESS_GROUP = 0] = "LESS_GROUP", GroupUpdateAABBBoundsMode[GroupUpdateAABBBoundsMode.MORE_GROUP = 1] = "MORE_GROUP";
|
|
11620
11620
|
}(GroupUpdateAABBBoundsMode || (GroupUpdateAABBBoundsMode = {}));
|
|
11621
|
-
let Group$
|
|
11621
|
+
let Group$2 = class Group extends Graphic$1 {
|
|
11622
11622
|
constructor(params) {
|
|
11623
11623
|
super(params), this.type = "group", this.parent = null, this.isContainer = !0, this.numberType = GROUP_NUMBER_TYPE, this._childUpdateTag = UpdateTag$1.UPDATE_BOUNDS;
|
|
11624
11624
|
}
|
|
@@ -11768,9 +11768,9 @@
|
|
|
11768
11768
|
return Group.NOWORK_ANIMATE_ATTR;
|
|
11769
11769
|
}
|
|
11770
11770
|
};
|
|
11771
|
-
Group$
|
|
11771
|
+
Group$2.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
|
|
11772
11772
|
|
|
11773
|
-
class Layer extends Group$
|
|
11773
|
+
class Layer extends Group$2 {
|
|
11774
11774
|
get offscreen() {
|
|
11775
11775
|
return this.layerHandler.offscreen;
|
|
11776
11776
|
}
|
|
@@ -13590,7 +13590,7 @@
|
|
|
13590
13590
|
}, NOWORK_ANIMATE_ATTR$1);
|
|
13591
13591
|
|
|
13592
13592
|
const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY$1];
|
|
13593
|
-
let Line$
|
|
13593
|
+
let Line$2 = class Line extends Graphic$1 {
|
|
13594
13594
|
constructor() {
|
|
13595
13595
|
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13596
13596
|
super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
@@ -13654,7 +13654,7 @@
|
|
|
13654
13654
|
return Line.NOWORK_ANIMATE_ATTR;
|
|
13655
13655
|
}
|
|
13656
13656
|
};
|
|
13657
|
-
Line$
|
|
13657
|
+
Line$2.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
13658
13658
|
segments: 1,
|
|
13659
13659
|
curveType: 1
|
|
13660
13660
|
}, NOWORK_ANIMATE_ATTR$1);
|
|
@@ -13875,7 +13875,7 @@
|
|
|
13875
13875
|
|
|
13876
13876
|
let Frame$1 = class Frame {
|
|
13877
13877
|
constructor(left, top, width, height, ellipsis, wordBreak, verticalDirection, globalAlign, globalBaseline, layoutDirection, isWidthMax, isHeightMax, singleLine, icons) {
|
|
13878
|
-
this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY$
|
|
13878
|
+
this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY$1[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
|
|
13879
13879
|
}
|
|
13880
13880
|
draw(ctx, drawIcon) {
|
|
13881
13881
|
const {
|
|
@@ -14220,9 +14220,9 @@
|
|
|
14220
14220
|
}
|
|
14221
14221
|
};
|
|
14222
14222
|
|
|
14223
|
-
let Line$
|
|
14223
|
+
let Line$1 = class Line {
|
|
14224
14224
|
constructor(left, width, baseline, ascent, descent, lineBuffer, direction, isWidthMax) {
|
|
14225
|
-
this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon$1 ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY$
|
|
14225
|
+
this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon$1 ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY$1[this.direction], this.actualWidth = 0;
|
|
14226
14226
|
let maxHeight = 0;
|
|
14227
14227
|
this.paragraphs.forEach((word, index) => {
|
|
14228
14228
|
if (0 === index && word instanceof Paragraph$1) {
|
|
@@ -14312,7 +14312,7 @@
|
|
|
14312
14312
|
|
|
14313
14313
|
let Wrapper$1 = class Wrapper {
|
|
14314
14314
|
constructor(frame) {
|
|
14315
|
-
this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY$
|
|
14315
|
+
this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY$1[this.direction];
|
|
14316
14316
|
}
|
|
14317
14317
|
store(paragraph) {
|
|
14318
14318
|
if (paragraph instanceof RichTextIcon$1) {
|
|
@@ -14326,7 +14326,7 @@
|
|
|
14326
14326
|
if (0 === this.lineBuffer.length) return;
|
|
14327
14327
|
const maxAscent = 0 === this.maxAscent ? this.maxAscentForBlank : this.maxAscent,
|
|
14328
14328
|
maxDescent = 0 === this.maxDescent ? this.maxDescentForBlank : this.maxDescent,
|
|
14329
|
-
line = new Line$
|
|
14329
|
+
line = new Line$1(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
|
|
14330
14330
|
this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
|
|
14331
14331
|
}
|
|
14332
14332
|
deal(paragraph) {
|
|
@@ -14681,7 +14681,7 @@
|
|
|
14681
14681
|
}, NOWORK_ANIMATE_ATTR$1);
|
|
14682
14682
|
|
|
14683
14683
|
const ARC_UPDATE_TAG_KEY = ["innerRadius", "outerRadius", "startAngle", "endAngle", "cornerRadius", "padAngle", "padRadius", "cap", ...GRAPHIC_UPDATE_TAG_KEY$1];
|
|
14684
|
-
class Arc extends Graphic$1 {
|
|
14684
|
+
let Arc$1 = class Arc extends Graphic$1 {
|
|
14685
14685
|
constructor(params) {
|
|
14686
14686
|
super(params), this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
14687
14687
|
}
|
|
@@ -14834,12 +14834,12 @@
|
|
|
14834
14834
|
getNoWorkAnimateAttr() {
|
|
14835
14835
|
return Arc.NOWORK_ANIMATE_ATTR;
|
|
14836
14836
|
}
|
|
14837
|
-
}
|
|
14838
|
-
Arc.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
14837
|
+
};
|
|
14838
|
+
Arc$1.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
14839
14839
|
cap: 1
|
|
14840
14840
|
}, NOWORK_ANIMATE_ATTR$1);
|
|
14841
14841
|
|
|
14842
|
-
class Arc3d extends Arc {
|
|
14842
|
+
class Arc3d extends Arc$1 {
|
|
14843
14843
|
constructor(params) {
|
|
14844
14844
|
super(params), this.type = "arc3d", this.numberType = ARC3D_NUMBER_TYPE;
|
|
14845
14845
|
}
|
|
@@ -15717,7 +15717,7 @@
|
|
|
15717
15717
|
};
|
|
15718
15718
|
DefaultGraphicService = __decorate$1C([injectable(), __param$P(0, inject(GraphicCreator)), __param$P(1, inject(ContributionProvider)), __param$P(1, named(RectBoundsContribution)), __param$P(2, inject(ContributionProvider)), __param$P(2, named(SymbolBoundsContribution)), __param$P(3, inject(ContributionProvider)), __param$P(3, named(CircleBoundsContribution)), __param$P(4, inject(ContributionProvider)), __param$P(4, named(ArcBoundsContribution)), __param$P(5, inject(ContributionProvider)), __param$P(5, named(PathBoundsContribution)), __metadata$13("design:paramtypes", [Object, Object, Object, Object, Object, Object])], DefaultGraphicService);
|
|
15719
15719
|
|
|
15720
|
-
class ShadowRoot extends Group$
|
|
15720
|
+
class ShadowRoot extends Group$2 {
|
|
15721
15721
|
constructor(graphic) {
|
|
15722
15722
|
super({
|
|
15723
15723
|
x: 0,
|
|
@@ -15750,7 +15750,7 @@
|
|
|
15750
15750
|
}
|
|
15751
15751
|
|
|
15752
15752
|
function createArc(attributes) {
|
|
15753
|
-
return new Arc(attributes);
|
|
15753
|
+
return new Arc$1(attributes);
|
|
15754
15754
|
}
|
|
15755
15755
|
function createArea(attributes) {
|
|
15756
15756
|
return new Area(attributes);
|
|
@@ -15759,10 +15759,10 @@
|
|
|
15759
15759
|
return new Circle$1(attributes);
|
|
15760
15760
|
}
|
|
15761
15761
|
function createGroup(attributes) {
|
|
15762
|
-
return new Group$
|
|
15762
|
+
return new Group$2(attributes);
|
|
15763
15763
|
}
|
|
15764
15764
|
function createLine(attributes) {
|
|
15765
|
-
return new Line$
|
|
15765
|
+
return new Line$2(attributes);
|
|
15766
15766
|
}
|
|
15767
15767
|
function createPath(attributes) {
|
|
15768
15768
|
return new Path(attributes);
|
|
@@ -20600,7 +20600,7 @@
|
|
|
20600
20600
|
Y: 0,
|
|
20601
20601
|
BACKGROUND: "white"
|
|
20602
20602
|
};
|
|
20603
|
-
class Stage extends Group$
|
|
20603
|
+
class Stage extends Group$2 {
|
|
20604
20604
|
set viewBox(b) {
|
|
20605
20605
|
this._viewBox.setValue(b.x1, b.y1, b.x2, b.y2);
|
|
20606
20606
|
}
|
|
@@ -25703,7 +25703,7 @@
|
|
|
25703
25703
|
}
|
|
25704
25704
|
|
|
25705
25705
|
const GROUP_ATTRIBUTES = ["x", "y", "dx", "dy", "scaleX", "scaleY", "angle", "anchor", "postMatrix", "visible", "clip", "pickable", "childrenPickable", "zIndex", "cursor"];
|
|
25706
|
-
class AbstractComponent extends Group$
|
|
25706
|
+
class AbstractComponent extends Group$2 {
|
|
25707
25707
|
constructor(attributes) {
|
|
25708
25708
|
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
|
|
25709
25709
|
super(attributes), this.mode = mode, this.setTheme({
|
|
@@ -26050,7 +26050,7 @@
|
|
|
26050
26050
|
}
|
|
26051
26051
|
return t;
|
|
26052
26052
|
};
|
|
26053
|
-
class Tag extends AbstractComponent {
|
|
26053
|
+
let Tag$1 = class Tag extends AbstractComponent {
|
|
26054
26054
|
constructor(attributes) {
|
|
26055
26055
|
super(merge$1({}, Tag.defaultAttributes, attributes)), this.name = "tag";
|
|
26056
26056
|
}
|
|
@@ -26138,8 +26138,8 @@
|
|
|
26138
26138
|
isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
26139
26139
|
}
|
|
26140
26140
|
}
|
|
26141
|
-
}
|
|
26142
|
-
Tag.defaultAttributes = {
|
|
26141
|
+
};
|
|
26142
|
+
Tag$1.defaultAttributes = {
|
|
26143
26143
|
visible: !0,
|
|
26144
26144
|
textStyle: {
|
|
26145
26145
|
fontSize: 12,
|
|
@@ -26972,7 +26972,7 @@
|
|
|
26972
26972
|
}
|
|
26973
26973
|
renderTitle(container) {
|
|
26974
26974
|
const titleAttributes = this.getTitleAttribute(),
|
|
26975
|
-
axisTitle = new Tag(Object.assign({}, titleAttributes));
|
|
26975
|
+
axisTitle = new Tag$1(Object.assign({}, titleAttributes));
|
|
26976
26976
|
axisTitle.name = AXIS_ELEMENT_NAME.title, axisTitle.id = this._getNodeId("title"), container.add(axisTitle);
|
|
26977
26977
|
}
|
|
26978
26978
|
getVerticalCoord(point, offset, inside) {
|
|
@@ -27890,7 +27890,7 @@
|
|
|
27890
27890
|
}, shape.style), isValid$6(shape.space) && (tagAttrs.space = shape.space)), background && background.visible && (tagAttrs.panel = Object.assign({
|
|
27891
27891
|
visible: !0
|
|
27892
27892
|
}, background.style));
|
|
27893
|
-
const titleTag = new Tag(tagAttrs);
|
|
27893
|
+
const titleTag = new Tag$1(tagAttrs);
|
|
27894
27894
|
titleTag.name = LEGEND_ELEMENT_NAME.title, this._title = titleTag, this._innerView.add(titleTag);
|
|
27895
27895
|
}
|
|
27896
27896
|
_adjustLayout() {
|
|
@@ -32750,7 +32750,7 @@
|
|
|
32750
32750
|
class Application {}
|
|
32751
32751
|
const application = new Application();
|
|
32752
32752
|
|
|
32753
|
-
const DIRECTION_KEY
|
|
32753
|
+
const DIRECTION_KEY = {
|
|
32754
32754
|
horizontal: {
|
|
32755
32755
|
width: "width",
|
|
32756
32756
|
height: "height",
|
|
@@ -35273,7 +35273,7 @@
|
|
|
35273
35273
|
|
|
35274
35274
|
class Frame {
|
|
35275
35275
|
constructor(left, top, width, height, ellipsis, wordBreak, verticalDirection, globalAlign, globalBaseline, layoutDirection, isWidthMax, isHeightMax, singleLine, icons) {
|
|
35276
|
-
this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY
|
|
35276
|
+
this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
|
|
35277
35277
|
}
|
|
35278
35278
|
draw(ctx, drawIcon) {
|
|
35279
35279
|
const {
|
|
@@ -35618,9 +35618,9 @@
|
|
|
35618
35618
|
}
|
|
35619
35619
|
}
|
|
35620
35620
|
|
|
35621
|
-
|
|
35621
|
+
class Line {
|
|
35622
35622
|
constructor(left, width, baseline, ascent, descent, lineBuffer, direction, isWidthMax) {
|
|
35623
|
-
this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY
|
|
35623
|
+
this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY[this.direction], this.actualWidth = 0;
|
|
35624
35624
|
let maxHeight = 0;
|
|
35625
35625
|
this.paragraphs.forEach((word, index) => {
|
|
35626
35626
|
if (0 === index && word instanceof Paragraph) {
|
|
@@ -35706,11 +35706,11 @@
|
|
|
35706
35706
|
width += paragraph instanceof RichTextIcon ? paragraph.width : paragraph.getWidthWithEllips(this.direction);
|
|
35707
35707
|
}), width;
|
|
35708
35708
|
}
|
|
35709
|
-
}
|
|
35709
|
+
}
|
|
35710
35710
|
|
|
35711
35711
|
class Wrapper {
|
|
35712
35712
|
constructor(frame) {
|
|
35713
|
-
this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY
|
|
35713
|
+
this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY[this.direction];
|
|
35714
35714
|
}
|
|
35715
35715
|
store(paragraph) {
|
|
35716
35716
|
if (paragraph instanceof RichTextIcon) {
|
|
@@ -35724,7 +35724,7 @@
|
|
|
35724
35724
|
if (0 === this.lineBuffer.length) return;
|
|
35725
35725
|
const maxAscent = 0 === this.maxAscent ? this.maxAscentForBlank : this.maxAscent,
|
|
35726
35726
|
maxDescent = 0 === this.maxDescent ? this.maxDescentForBlank : this.maxDescent,
|
|
35727
|
-
line = new Line
|
|
35727
|
+
line = new Line(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
|
|
35728
35728
|
this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
|
|
35729
35729
|
}
|
|
35730
35730
|
deal(paragraph) {
|
|
@@ -38071,7 +38071,7 @@
|
|
|
38071
38071
|
};
|
|
38072
38072
|
}
|
|
38073
38073
|
|
|
38074
|
-
class Group extends Group$
|
|
38074
|
+
let Group$1 = class Group extends Group$2 {
|
|
38075
38075
|
role;
|
|
38076
38076
|
col;
|
|
38077
38077
|
row;
|
|
@@ -38252,7 +38252,7 @@
|
|
|
38252
38252
|
this.colHeight += cellHeight;
|
|
38253
38253
|
}
|
|
38254
38254
|
}
|
|
38255
|
-
}
|
|
38255
|
+
};
|
|
38256
38256
|
function after(group, selfChange) {
|
|
38257
38257
|
if (!(group.stage && group.stage.renderCount)) {
|
|
38258
38258
|
return;
|
|
@@ -38309,13 +38309,10 @@
|
|
|
38309
38309
|
if (customRenderObj.rootContainer) {
|
|
38310
38310
|
customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
|
|
38311
38311
|
}
|
|
38312
|
-
if (customRenderObj.rootContainer instanceof Group$
|
|
38312
|
+
if (customRenderObj.rootContainer instanceof Group$2) {
|
|
38313
38313
|
elementsGroup = customRenderObj.rootContainer;
|
|
38314
38314
|
elementsGroup.name = 'custom-container';
|
|
38315
38315
|
}
|
|
38316
|
-
else if (customRenderObj.rootContainer) {
|
|
38317
|
-
customElements = customRenderObj.rootContainer.getElements(undefined, false, false);
|
|
38318
|
-
}
|
|
38319
38316
|
renderDefault = customRenderObj.renderDefault;
|
|
38320
38317
|
}
|
|
38321
38318
|
else if (typeof customRender === 'function') {
|
|
@@ -38352,13 +38349,14 @@
|
|
|
38352
38349
|
const value = table.getCellValue(col, row);
|
|
38353
38350
|
elementsGroup = adjustElementToGroup(customElements, autoWidth ? expectedWidth : width, autoHeight ? expectedHeight : height, value);
|
|
38354
38351
|
}
|
|
38352
|
+
dealPercentCalc(elementsGroup);
|
|
38355
38353
|
return {
|
|
38356
38354
|
elementsGroup,
|
|
38357
38355
|
renderDefault
|
|
38358
38356
|
};
|
|
38359
38357
|
}
|
|
38360
38358
|
function adjustElementToGroup(elements, width, height, value) {
|
|
38361
|
-
const customGroup = new Group({
|
|
38359
|
+
const customGroup = new Group$1({
|
|
38362
38360
|
x: 0,
|
|
38363
38361
|
y: 0,
|
|
38364
38362
|
width,
|
|
@@ -38507,6 +38505,8 @@
|
|
|
38507
38505
|
rect.x = isString$3(rect.x)
|
|
38508
38506
|
? transformString(rect.x, width - borderLineWidths[1])
|
|
38509
38507
|
: Number(rect.x);
|
|
38508
|
+
}
|
|
38509
|
+
if (isValid$6(rect.y)) {
|
|
38510
38510
|
rect.y = isString$3(rect.y)
|
|
38511
38511
|
? transformString(rect.y, height - borderLineWidths[2])
|
|
38512
38512
|
: Number(rect.y);
|
|
@@ -38557,6 +38557,24 @@
|
|
|
38557
38557
|
}
|
|
38558
38558
|
return parseInt(str, 10);
|
|
38559
38559
|
}
|
|
38560
|
+
function dealPercentCalc(group) {
|
|
38561
|
+
if (!group) {
|
|
38562
|
+
return;
|
|
38563
|
+
}
|
|
38564
|
+
group.forEachChildren((child) => {
|
|
38565
|
+
if (isObject$4(child.attribute.width) && child.attribute.width.percent) {
|
|
38566
|
+
child.setAttribute('width', (child.attribute.width.percent / 100) * group.attribute.width +
|
|
38567
|
+
(child.attribute.width.delta ?? 0));
|
|
38568
|
+
}
|
|
38569
|
+
if (isObject$4(child.attribute.height) && child.attribute.height.percent) {
|
|
38570
|
+
child.setAttribute('height', (child.attribute.height.percent / 100) * group.attribute.height +
|
|
38571
|
+
(child.attribute.height.delta ?? 0));
|
|
38572
|
+
}
|
|
38573
|
+
if (child.type === 'group') {
|
|
38574
|
+
dealPercentCalc(child);
|
|
38575
|
+
}
|
|
38576
|
+
});
|
|
38577
|
+
}
|
|
38560
38578
|
function decodeReactDom(dom) {
|
|
38561
38579
|
if (!dom.$$typeof) {
|
|
38562
38580
|
return dom;
|
|
@@ -38937,7 +38955,7 @@
|
|
|
38937
38955
|
if (cellTheme?.text?.textBaseline) {
|
|
38938
38956
|
textBaseline = cellTheme?.text?.textBaseline;
|
|
38939
38957
|
}
|
|
38940
|
-
const cellGroup = new Group({
|
|
38958
|
+
const cellGroup = new Group$1({
|
|
38941
38959
|
x: xOrigin,
|
|
38942
38960
|
y: yOrigin,
|
|
38943
38961
|
width,
|
|
@@ -39078,7 +39096,7 @@
|
|
|
39078
39096
|
const height = table.getRowHeight(row);
|
|
39079
39097
|
let contentWidth = width;
|
|
39080
39098
|
let contentHeight = height;
|
|
39081
|
-
const percentCompleteBarGroup = new Group({
|
|
39099
|
+
const percentCompleteBarGroup = new Group$1({
|
|
39082
39100
|
x: 0,
|
|
39083
39101
|
y: 0,
|
|
39084
39102
|
width: contentWidth,
|
|
@@ -39508,7 +39526,7 @@
|
|
|
39508
39526
|
const yScale = new LinearScale();
|
|
39509
39527
|
function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme) {
|
|
39510
39528
|
if (!cellGroup) {
|
|
39511
|
-
cellGroup = new Group({
|
|
39529
|
+
cellGroup = new Group$1({
|
|
39512
39530
|
x: xOrigin,
|
|
39513
39531
|
y: yOrigin,
|
|
39514
39532
|
width,
|
|
@@ -39681,7 +39699,7 @@
|
|
|
39681
39699
|
else {
|
|
39682
39700
|
specObj = spec;
|
|
39683
39701
|
}
|
|
39684
|
-
const group = new Group({
|
|
39702
|
+
const group = new Group$1({
|
|
39685
39703
|
x,
|
|
39686
39704
|
y,
|
|
39687
39705
|
width,
|
|
@@ -39706,7 +39724,7 @@
|
|
|
39706
39724
|
interpolate: 'linear'
|
|
39707
39725
|
};
|
|
39708
39726
|
}
|
|
39709
|
-
const symbolGroup = new Group({
|
|
39727
|
+
const symbolGroup = new Group$1({
|
|
39710
39728
|
x: 0,
|
|
39711
39729
|
y: 0,
|
|
39712
39730
|
width,
|
|
@@ -39730,7 +39748,7 @@
|
|
|
39730
39748
|
return group;
|
|
39731
39749
|
}
|
|
39732
39750
|
|
|
39733
|
-
class CellContent extends Group {
|
|
39751
|
+
class CellContent extends Group$1 {
|
|
39734
39752
|
_leftGroup;
|
|
39735
39753
|
_rightGroup;
|
|
39736
39754
|
_centerGroup;
|
|
@@ -39742,19 +39760,19 @@
|
|
|
39742
39760
|
_baseline;
|
|
39743
39761
|
constructor(params) {
|
|
39744
39762
|
super(params);
|
|
39745
|
-
this._leftGroup = new Group({
|
|
39763
|
+
this._leftGroup = new Group$1({
|
|
39746
39764
|
pickable: false,
|
|
39747
39765
|
fill: false,
|
|
39748
39766
|
stroke: false
|
|
39749
39767
|
});
|
|
39750
39768
|
this._leftGroup.role = 'content-left';
|
|
39751
|
-
this._rightGroup = new Group({
|
|
39769
|
+
this._rightGroup = new Group$1({
|
|
39752
39770
|
pickable: false,
|
|
39753
39771
|
fill: false,
|
|
39754
39772
|
stroke: false
|
|
39755
39773
|
});
|
|
39756
39774
|
this._rightGroup.role = 'content-right';
|
|
39757
|
-
this._centerGroup = new Group({
|
|
39775
|
+
this._centerGroup = new Group$1({
|
|
39758
39776
|
pickable: false,
|
|
39759
39777
|
fill: false,
|
|
39760
39778
|
stroke: false
|
|
@@ -41274,7 +41292,7 @@
|
|
|
41274
41292
|
if (customLayoutObj.rootContainer) {
|
|
41275
41293
|
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
41276
41294
|
}
|
|
41277
|
-
if (customLayoutObj.rootContainer instanceof Group$
|
|
41295
|
+
if (customLayoutObj.rootContainer instanceof Group$2) {
|
|
41278
41296
|
height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
|
|
41279
41297
|
}
|
|
41280
41298
|
else if (customLayoutObj.rootContainer) {
|
|
@@ -41810,7 +41828,7 @@
|
|
|
41810
41828
|
_menuInfo;
|
|
41811
41829
|
constructor(table) {
|
|
41812
41830
|
this._table = table;
|
|
41813
|
-
this._menuInstance = new Group({
|
|
41831
|
+
this._menuInstance = new Group$1({
|
|
41814
41832
|
x: 0,
|
|
41815
41833
|
y: 0,
|
|
41816
41834
|
fill: menuStyle.bgColor,
|
|
@@ -41900,7 +41918,7 @@
|
|
|
41900
41918
|
icon = item.icon;
|
|
41901
41919
|
}
|
|
41902
41920
|
}
|
|
41903
|
-
const group = new Group({
|
|
41921
|
+
const group = new Group$1({
|
|
41904
41922
|
y,
|
|
41905
41923
|
x,
|
|
41906
41924
|
height: menuStyle.lineHeight,
|
|
@@ -42774,7 +42792,7 @@
|
|
|
42774
42792
|
}
|
|
42775
42793
|
|
|
42776
42794
|
const CHART_NUMBER_TYPE = genNumberType$1();
|
|
42777
|
-
class Chart extends Group$
|
|
42795
|
+
class Chart extends Group$2 {
|
|
42778
42796
|
type = 'chart';
|
|
42779
42797
|
chartInstance;
|
|
42780
42798
|
activeChartInstance;
|
|
@@ -43901,14 +43919,9 @@
|
|
|
43901
43919
|
if (customLayoutObj.rootContainer) {
|
|
43902
43920
|
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
43903
43921
|
}
|
|
43904
|
-
if (customLayoutObj.rootContainer instanceof Group$
|
|
43922
|
+
if (customLayoutObj.rootContainer instanceof Group$2) {
|
|
43905
43923
|
width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
|
|
43906
43924
|
}
|
|
43907
|
-
else if (customLayoutObj.rootContainer) {
|
|
43908
|
-
customLayoutObj.rootContainer.isRoot = true;
|
|
43909
|
-
const size = customLayoutObj.rootContainer.getContentSize();
|
|
43910
|
-
width = size.width ?? 0;
|
|
43911
|
-
}
|
|
43912
43925
|
else {
|
|
43913
43926
|
width = 0;
|
|
43914
43927
|
}
|
|
@@ -43986,7 +43999,7 @@
|
|
|
43986
43999
|
return widthDefined;
|
|
43987
44000
|
}
|
|
43988
44001
|
|
|
43989
|
-
const emptyGroup = new Group({});
|
|
44002
|
+
const emptyGroup = new Group$1({});
|
|
43990
44003
|
emptyGroup.role = 'empty';
|
|
43991
44004
|
|
|
43992
44005
|
const chartTypes = {};
|
|
@@ -44005,7 +44018,7 @@
|
|
|
44005
44018
|
padding = functionalPadding;
|
|
44006
44019
|
}
|
|
44007
44020
|
if (!cellGroup) {
|
|
44008
|
-
cellGroup = new Group({
|
|
44021
|
+
cellGroup = new Group$1({
|
|
44009
44022
|
x: xOrigin,
|
|
44010
44023
|
y: yOrigin,
|
|
44011
44024
|
width,
|
|
@@ -44063,7 +44076,7 @@
|
|
|
44063
44076
|
const autoColWidth = colWidth === 'auto';
|
|
44064
44077
|
const autoWrapText = headerStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
44065
44078
|
const lineClamp = headerStyle.lineClamp;
|
|
44066
|
-
const cellGroup = new Group({
|
|
44079
|
+
const cellGroup = new Group$1({
|
|
44067
44080
|
x: xOrigin,
|
|
44068
44081
|
y: yOrigin,
|
|
44069
44082
|
width: cellWidth,
|
|
@@ -44127,7 +44140,7 @@
|
|
|
44127
44140
|
if (cellTheme?.text?.textBaseline) {
|
|
44128
44141
|
textBaseline = cellTheme?.text?.textBaseline;
|
|
44129
44142
|
}
|
|
44130
|
-
const cellGroup = new Group({
|
|
44143
|
+
const cellGroup = new Group$1({
|
|
44131
44144
|
x: xOrigin,
|
|
44132
44145
|
y: yOrigin,
|
|
44133
44146
|
width,
|
|
@@ -44218,7 +44231,7 @@
|
|
|
44218
44231
|
|
|
44219
44232
|
function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
|
|
44220
44233
|
if (!cellGroup) {
|
|
44221
|
-
cellGroup = new Group({
|
|
44234
|
+
cellGroup = new Group$1({
|
|
44222
44235
|
x: xOrigin,
|
|
44223
44236
|
y: yOrigin,
|
|
44224
44237
|
width,
|
|
@@ -44518,7 +44531,7 @@
|
|
|
44518
44531
|
}
|
|
44519
44532
|
let newCellGroup;
|
|
44520
44533
|
if (isMerge && (col !== range.start.col || row !== range.start.row)) {
|
|
44521
|
-
newCellGroup = new Group({
|
|
44534
|
+
newCellGroup = new Group$1({
|
|
44522
44535
|
x: 0,
|
|
44523
44536
|
y: addNew ? 0 : oldCellGroup.attribute.y,
|
|
44524
44537
|
width: 0,
|
|
@@ -44673,7 +44686,7 @@
|
|
|
44673
44686
|
}
|
|
44674
44687
|
if (mergeResult) {
|
|
44675
44688
|
const height = mergeResult.cellHeight / (range.end.row - range.start.row + 1);
|
|
44676
|
-
const cellGroup = new Group({
|
|
44689
|
+
const cellGroup = new Group$1({
|
|
44677
44690
|
x: 0,
|
|
44678
44691
|
y,
|
|
44679
44692
|
width: 0,
|
|
@@ -44735,7 +44748,7 @@
|
|
|
44735
44748
|
for (let i = colStart; i <= colEnd; i++) {
|
|
44736
44749
|
const col = i;
|
|
44737
44750
|
const colWidth = table.getColWidth(col);
|
|
44738
|
-
const columnGroup = new Group({
|
|
44751
|
+
const columnGroup = new Group$1({
|
|
44739
44752
|
x: xOrigin + x,
|
|
44740
44753
|
y: yOrigin,
|
|
44741
44754
|
width: colWidth,
|
|
@@ -45658,7 +45671,7 @@
|
|
|
45658
45671
|
}
|
|
45659
45672
|
}
|
|
45660
45673
|
if (this.table.columnHeaderLevelCount) {
|
|
45661
|
-
const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45674
|
+
const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group$1
|
|
45662
45675
|
? this.table.scenegraph.colHeaderGroup.lastChild
|
|
45663
45676
|
: this.table.scenegraph.colHeaderGroup.lastChild._prev);
|
|
45664
45677
|
const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
|
|
@@ -45666,7 +45679,7 @@
|
|
|
45666
45679
|
createColGroup(this.table.scenegraph.colHeaderGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, 0, this.table.columnHeaderLevelCount - 1, 'columnHeader', this.table);
|
|
45667
45680
|
}
|
|
45668
45681
|
if (this.table.bottomFrozenRowCount) {
|
|
45669
|
-
const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group
|
|
45682
|
+
const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group$1
|
|
45670
45683
|
? this.table.scenegraph.bottomFrozenGroup.lastChild
|
|
45671
45684
|
: this.table.scenegraph.bottomFrozenGroup.lastChild._prev);
|
|
45672
45685
|
const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
|
|
@@ -45674,13 +45687,13 @@
|
|
|
45674
45687
|
createColGroup(this.table.scenegraph.bottomFrozenGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.table.rowCount - this.table.bottomFrozenRowCount, this.table.rowCount - 1, 'columnHeader', this.table);
|
|
45675
45688
|
}
|
|
45676
45689
|
let lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild &&
|
|
45677
|
-
(this.table.scenegraph.bodyGroup.lastChild instanceof Group
|
|
45690
|
+
(this.table.scenegraph.bodyGroup.lastChild instanceof Group$1
|
|
45678
45691
|
? this.table.scenegraph.bodyGroup.lastChild
|
|
45679
45692
|
: this.table.scenegraph.bodyGroup.lastChild._prev);
|
|
45680
45693
|
if (!lastColumnGroup) {
|
|
45681
45694
|
lastColumnGroup =
|
|
45682
45695
|
this.table.scenegraph.colHeaderGroup.lastChild &&
|
|
45683
|
-
(this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45696
|
+
(this.table.scenegraph.colHeaderGroup.lastChild instanceof Group$1
|
|
45684
45697
|
? this.table.scenegraph.colHeaderGroup.lastChild
|
|
45685
45698
|
: this.table.scenegraph.colHeaderGroup.lastChild._prev);
|
|
45686
45699
|
}
|
|
@@ -45822,7 +45835,7 @@
|
|
|
45822
45835
|
return getCellByCache(cacheCellGroup._next, row);
|
|
45823
45836
|
}
|
|
45824
45837
|
|
|
45825
|
-
new Group$
|
|
45838
|
+
new Group$2({});
|
|
45826
45839
|
function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, table) {
|
|
45827
45840
|
const scene = table.scenegraph;
|
|
45828
45841
|
const cellLocation = table.getCellLocation(colTarget, rowTarget);
|
|
@@ -46223,7 +46236,7 @@
|
|
|
46223
46236
|
}
|
|
46224
46237
|
function addRow(row, scene) {
|
|
46225
46238
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
46226
|
-
const cellGroup = new Group({
|
|
46239
|
+
const cellGroup = new Group$1({
|
|
46227
46240
|
x: 0,
|
|
46228
46241
|
y: 0,
|
|
46229
46242
|
width: scene.table.getColWidth(col),
|
|
@@ -46496,7 +46509,7 @@
|
|
|
46496
46509
|
scene.hasFrozen = true;
|
|
46497
46510
|
}
|
|
46498
46511
|
function moveColumnFromBodyToRowHeader(scene) {
|
|
46499
|
-
const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;
|
|
46512
|
+
const column = scene.bodyGroup.firstChild instanceof Group$1 ? scene.bodyGroup.firstChild : null;
|
|
46500
46513
|
if (column) {
|
|
46501
46514
|
scene.rowHeaderGroup.appendChild(column);
|
|
46502
46515
|
scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);
|
|
@@ -46504,7 +46517,7 @@
|
|
|
46504
46517
|
}
|
|
46505
46518
|
}
|
|
46506
46519
|
function moveColumnFromColHeaderToCornerHeader(scene) {
|
|
46507
|
-
const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;
|
|
46520
|
+
const headerColumn = scene.colHeaderGroup.firstChild instanceof Group$1 ? scene.colHeaderGroup.firstChild : null;
|
|
46508
46521
|
if (headerColumn) {
|
|
46509
46522
|
scene.cornerHeaderGroup.appendChild(headerColumn);
|
|
46510
46523
|
scene.cornerHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width);
|
|
@@ -46512,7 +46525,7 @@
|
|
|
46512
46525
|
}
|
|
46513
46526
|
}
|
|
46514
46527
|
function moveColumnFromRowHeaderToBody(scene) {
|
|
46515
|
-
const column = scene.rowHeaderGroup.lastChild instanceof Group
|
|
46528
|
+
const column = scene.rowHeaderGroup.lastChild instanceof Group$1
|
|
46516
46529
|
? scene.rowHeaderGroup.lastChild
|
|
46517
46530
|
: scene.rowHeaderGroup.lastChild?._prev;
|
|
46518
46531
|
if (column) {
|
|
@@ -46522,7 +46535,7 @@
|
|
|
46522
46535
|
}
|
|
46523
46536
|
}
|
|
46524
46537
|
function moveColumnFromCornerHeaderToColHeader(scene) {
|
|
46525
|
-
const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group
|
|
46538
|
+
const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group$1
|
|
46526
46539
|
? scene.cornerHeaderGroup.lastChild
|
|
46527
46540
|
: scene.cornerHeaderGroup.lastChild?._prev;
|
|
46528
46541
|
if (headerColumn) {
|
|
@@ -46532,7 +46545,7 @@
|
|
|
46532
46545
|
}
|
|
46533
46546
|
}
|
|
46534
46547
|
function moveColumnFromBottomToLeftBottomCorner(scene) {
|
|
46535
|
-
const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;
|
|
46548
|
+
const column = scene.bottomFrozenGroup.firstChild instanceof Group$1 ? scene.bottomFrozenGroup.firstChild : null;
|
|
46536
46549
|
if (column) {
|
|
46537
46550
|
scene.leftBottomCornerGroup.appendChild(column);
|
|
46538
46551
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
|
|
@@ -46540,7 +46553,7 @@
|
|
|
46540
46553
|
}
|
|
46541
46554
|
}
|
|
46542
46555
|
function moveColumnFromLeftBottomCornerToBottom(scene) {
|
|
46543
|
-
const column = scene.leftBottomCornerGroup.lastChild instanceof Group
|
|
46556
|
+
const column = scene.leftBottomCornerGroup.lastChild instanceof Group$1
|
|
46544
46557
|
? scene.leftBottomCornerGroup.lastChild
|
|
46545
46558
|
: scene.leftBottomCornerGroup.lastChild?._prev;
|
|
46546
46559
|
if (column) {
|
|
@@ -46877,7 +46890,7 @@
|
|
|
46877
46890
|
function initSceneGraph(scene) {
|
|
46878
46891
|
const width = scene.table.tableNoFrameWidth;
|
|
46879
46892
|
const height = scene.table.tableNoFrameHeight;
|
|
46880
|
-
scene.tableGroup = new Group({ x: 0, y: 0, width, height, clip: true, pickable: false });
|
|
46893
|
+
scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
|
|
46881
46894
|
scene.tableGroup.role = 'table';
|
|
46882
46895
|
const colHeaderGroup = createContainerGroup(0, 0);
|
|
46883
46896
|
colHeaderGroup.role = 'col-header';
|
|
@@ -46926,7 +46939,7 @@
|
|
|
46926
46939
|
scene.tableGroup.addChild(componentGroup);
|
|
46927
46940
|
}
|
|
46928
46941
|
function createContainerGroup(width, height) {
|
|
46929
|
-
return new Group({
|
|
46942
|
+
return new Group$1({
|
|
46930
46943
|
x: 0,
|
|
46931
46944
|
y: 0,
|
|
46932
46945
|
width,
|
|
@@ -50159,7 +50172,7 @@
|
|
|
50159
50172
|
eventManeger.dealColumnMover(eventArgsSet);
|
|
50160
50173
|
}
|
|
50161
50174
|
else {
|
|
50162
|
-
eventManeger.dealTableSelect(eventArgsSet
|
|
50175
|
+
eventManeger.dealTableSelect(eventArgsSet);
|
|
50163
50176
|
}
|
|
50164
50177
|
return;
|
|
50165
50178
|
}
|
|
@@ -50309,14 +50322,10 @@
|
|
|
50309
50322
|
}
|
|
50310
50323
|
}
|
|
50311
50324
|
else if (stateManeger.isSelecting()) {
|
|
50325
|
+
table.stateManeger.endSelectCells();
|
|
50312
50326
|
if (table.stateManeger.select?.ranges?.length) {
|
|
50313
50327
|
const lastCol = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.col;
|
|
50314
50328
|
const lastRow = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.row;
|
|
50315
|
-
table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CELL, {
|
|
50316
|
-
ranges: table.stateManeger.select.ranges,
|
|
50317
|
-
col: lastCol,
|
|
50318
|
-
row: lastRow
|
|
50319
|
-
});
|
|
50320
50329
|
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
50321
50330
|
const cellsEvent = {
|
|
50322
50331
|
event: e.nativeEvent,
|
|
@@ -50546,8 +50555,7 @@
|
|
|
50546
50555
|
const target = e.target;
|
|
50547
50556
|
if (target &&
|
|
50548
50557
|
!target.isDescendantsOf(table.scenegraph.tableGroup) &&
|
|
50549
|
-
target !== table.scenegraph.tableGroup
|
|
50550
|
-
target !== table.scenegraph.stage) {
|
|
50558
|
+
target !== table.scenegraph.tableGroup) {
|
|
50551
50559
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
50552
50560
|
eventManeger.dealTableHover();
|
|
50553
50561
|
eventManeger.dealTableSelect();
|
|
@@ -51157,7 +51165,7 @@
|
|
|
51157
51165
|
}
|
|
51158
51166
|
dealMenuHover(eventArgsSet) {
|
|
51159
51167
|
}
|
|
51160
|
-
dealTableSelect(eventArgsSet
|
|
51168
|
+
dealTableSelect(eventArgsSet) {
|
|
51161
51169
|
if (!eventArgsSet) {
|
|
51162
51170
|
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51163
51171
|
return false;
|
|
@@ -51168,17 +51176,10 @@
|
|
|
51168
51176
|
return false;
|
|
51169
51177
|
}
|
|
51170
51178
|
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
|
|
51171
|
-
if (this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
51172
|
-
(define?.disableHeaderSelect || this.table.stateManeger.select?.disableHeader)) {
|
|
51173
|
-
if (!isSelectMoving) {
|
|
51174
|
-
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51175
|
-
}
|
|
51179
|
+
if (this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableHeaderSelect) {
|
|
51176
51180
|
return false;
|
|
51177
51181
|
}
|
|
51178
51182
|
else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
|
|
51179
|
-
if (!isSelectMoving) {
|
|
51180
|
-
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51181
|
-
}
|
|
51182
51183
|
return false;
|
|
51183
51184
|
}
|
|
51184
51185
|
if (this.table.isPivotChart() &&
|
|
@@ -54092,7 +54093,7 @@
|
|
|
54092
54093
|
return TABLE_EVENT_TYPE;
|
|
54093
54094
|
}
|
|
54094
54095
|
options;
|
|
54095
|
-
version = "0.13.4-alpha.
|
|
54096
|
+
version = "0.13.4-alpha.3";
|
|
54096
54097
|
pagination;
|
|
54097
54098
|
id = `VTable${Date.now()}`;
|
|
54098
54099
|
headerStyleCache;
|
|
@@ -63116,569 +63117,180 @@
|
|
|
63116
63117
|
}
|
|
63117
63118
|
}
|
|
63118
63119
|
|
|
63119
|
-
class
|
|
63120
|
-
type;
|
|
63121
|
-
id;
|
|
63122
|
-
x = 0;
|
|
63123
|
-
y = 0;
|
|
63124
|
-
width = 0;
|
|
63125
|
-
height = 0;
|
|
63126
|
-
marginLeft;
|
|
63127
|
-
marginRight;
|
|
63128
|
-
marginTop;
|
|
63129
|
-
marginBottom;
|
|
63130
|
-
layoutWidth;
|
|
63131
|
-
layoutHeight;
|
|
63132
|
-
dx = 0;
|
|
63133
|
-
dy = 0;
|
|
63134
|
-
background;
|
|
63135
|
-
constructor(options) {
|
|
63136
|
-
this.id = options.id;
|
|
63137
|
-
this.marginLeft = options.marginLeft ?? 0;
|
|
63138
|
-
this.marginRight = options.marginRight ?? 0;
|
|
63139
|
-
this.marginTop = options.marginTop ?? 0;
|
|
63140
|
-
this.marginBottom = options.marginBottom ?? 0;
|
|
63141
|
-
this.background = options.background || undefined;
|
|
63142
|
-
}
|
|
63143
|
-
getSize(table) {
|
|
63144
|
-
this.initLayoutSize();
|
|
63145
|
-
}
|
|
63146
|
-
initLayoutSize() {
|
|
63147
|
-
this.layoutWidth = this.width + this.marginLeft + this.marginRight;
|
|
63148
|
-
this.layoutHeight = this.height + this.marginTop + this.marginBottom;
|
|
63149
|
-
if (this.background) {
|
|
63150
|
-
this.layoutWidth += (this.background.expandX || 0) * 2;
|
|
63151
|
-
this.layoutHeight += (this.background.expandY || 0) * 2;
|
|
63152
|
-
}
|
|
63153
|
-
this.dx = this.marginLeft;
|
|
63154
|
-
this.dy = this.marginTop;
|
|
63155
|
-
}
|
|
63156
|
-
}
|
|
63157
|
-
|
|
63158
|
-
class Circle extends BaseElement {
|
|
63159
|
-
type = 'circle';
|
|
63160
|
-
radius;
|
|
63161
|
-
radian;
|
|
63162
|
-
lineWidth;
|
|
63163
|
-
fill;
|
|
63164
|
-
stroke;
|
|
63120
|
+
class Circle extends Circle$1 {
|
|
63165
63121
|
constructor(options) {
|
|
63122
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63123
|
+
const padding = [
|
|
63124
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63125
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63126
|
+
options.marginBottom ??
|
|
63127
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63128
|
+
0,
|
|
63129
|
+
options.marginLeft ??
|
|
63130
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63131
|
+
0
|
|
63132
|
+
];
|
|
63133
|
+
options.boundsPadding = padding;
|
|
63166
63134
|
super(options);
|
|
63167
|
-
this.radius = options.radius;
|
|
63168
|
-
this.radian = options.radian;
|
|
63169
|
-
this.lineWidth = options.lineWidth;
|
|
63170
|
-
this.fill = options.fill;
|
|
63171
|
-
this.stroke = options.stroke;
|
|
63172
|
-
this.width = this.radius * 2;
|
|
63173
|
-
this.height = this.radius * 2;
|
|
63174
|
-
this.initLayoutSize();
|
|
63175
|
-
this.dx += this.radius;
|
|
63176
|
-
this.dy += this.radius;
|
|
63177
63135
|
}
|
|
63178
63136
|
}
|
|
63179
63137
|
|
|
63180
|
-
|
|
63181
|
-
|
|
63182
|
-
|
|
63183
|
-
|
|
63184
|
-
|
|
63185
|
-
|
|
63186
|
-
|
|
63187
|
-
|
|
63188
|
-
|
|
63189
|
-
|
|
63190
|
-
|
|
63191
|
-
|
|
63192
|
-
|
|
63193
|
-
|
|
63194
|
-
|
|
63195
|
-
|
|
63196
|
-
|
|
63197
|
-
|
|
63198
|
-
|
|
63199
|
-
|
|
63200
|
-
|
|
63201
|
-
|
|
63202
|
-
|
|
63203
|
-
|
|
63204
|
-
|
|
63205
|
-
|
|
63206
|
-
|
|
63207
|
-
|
|
63208
|
-
|
|
63209
|
-
|
|
63210
|
-
|
|
63211
|
-
|
|
63212
|
-
|
|
63213
|
-
|
|
63214
|
-
|
|
63215
|
-
|
|
63216
|
-
|
|
63217
|
-
|
|
63218
|
-
|
|
63219
|
-
|
|
63220
|
-
|
|
63221
|
-
|
|
63222
|
-
|
|
63223
|
-
|
|
63224
|
-
|
|
63225
|
-
|
|
63226
|
-
|
|
63227
|
-
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63228
|
-
this.justifyContent = justifyContent;
|
|
63229
|
-
this.alignItems = alignItems;
|
|
63230
|
-
this[this.directionKey.widthLimit] = widthLimit;
|
|
63231
|
-
}
|
|
63232
|
-
add(element) {
|
|
63233
|
-
element[this.directionKey.x] = this[this.directionKey.width];
|
|
63234
|
-
this[this.directionKey.width] += element[this.directionKey.layoutWidth];
|
|
63235
|
-
this.children.push(element);
|
|
63236
|
-
this.updateHeight(element);
|
|
63237
|
-
}
|
|
63238
|
-
canAdd(element) {
|
|
63239
|
-
if (this[this.directionKey.width] + element[this.directionKey.layoutWidth] > this[this.directionKey.widthLimit]) {
|
|
63240
|
-
return false;
|
|
63241
|
-
}
|
|
63242
|
-
return true;
|
|
63243
|
-
}
|
|
63244
|
-
updateHeight(element) {
|
|
63245
|
-
if (element[this.directionKey.layoutHeight] > this[this.directionKey.height]) {
|
|
63246
|
-
this[this.directionKey.height] = element[this.directionKey.layoutHeight];
|
|
63247
|
-
}
|
|
63248
|
-
}
|
|
63249
|
-
lineFinish() {
|
|
63250
|
-
this.updateXAlign();
|
|
63251
|
-
}
|
|
63252
|
-
updateXAlign() {
|
|
63253
|
-
const offsetX = this[this.directionKey.widthLimit] - this[this.directionKey.width];
|
|
63254
|
-
if (this.justifyContent === 'center') {
|
|
63255
|
-
this.offsetX = offsetX / 2;
|
|
63256
|
-
}
|
|
63257
|
-
else if (this.justifyContent === 'start') {
|
|
63258
|
-
this.offsetX = 0;
|
|
63259
|
-
}
|
|
63260
|
-
else {
|
|
63261
|
-
this.offsetX = offsetX;
|
|
63262
|
-
}
|
|
63263
|
-
}
|
|
63264
|
-
getOffsetY(element) {
|
|
63265
|
-
switch (this.alignItems) {
|
|
63266
|
-
case 'start':
|
|
63267
|
-
return 0;
|
|
63268
|
-
case 'center':
|
|
63269
|
-
return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
|
|
63270
|
-
case 'end':
|
|
63271
|
-
return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
|
|
63272
|
-
default:
|
|
63273
|
-
return 0;
|
|
63274
|
-
}
|
|
63275
|
-
}
|
|
63276
|
-
getContentSize() {
|
|
63277
|
-
const result = {
|
|
63278
|
-
width: 0,
|
|
63279
|
-
height: 0
|
|
63280
|
-
};
|
|
63281
|
-
for (let i = 0; i < this.children.length; i++) {
|
|
63282
|
-
const element = this.children[i];
|
|
63283
|
-
let size;
|
|
63284
|
-
if (element.type === 'container') {
|
|
63285
|
-
size = element.getContentSize();
|
|
63286
|
-
}
|
|
63287
|
-
else {
|
|
63288
|
-
size = {
|
|
63289
|
-
width: element.layoutWidth,
|
|
63290
|
-
height: element.layoutHeight
|
|
63291
|
-
};
|
|
63292
|
-
}
|
|
63293
|
-
if (result[this.directionKey.height] < size[this.directionKey.height]) {
|
|
63294
|
-
result[this.directionKey.height] = size[this.directionKey.height];
|
|
63295
|
-
}
|
|
63296
|
-
result[this.directionKey.width] += size[this.directionKey.width];
|
|
63297
|
-
}
|
|
63298
|
-
return result;
|
|
63299
|
-
}
|
|
63300
|
-
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63301
|
-
const elements = [];
|
|
63302
|
-
for (let i = 0; i < this.children.length; i++) {
|
|
63303
|
-
const element = this.children[i];
|
|
63304
|
-
if (element.type === 'container' || element.type === 'group-element') {
|
|
63305
|
-
const childElements = element.getElements({
|
|
63306
|
-
[this.directionKey.parentX]: this.offsetX + this[this.directionKey.x] + parentPos.parentX,
|
|
63307
|
-
[this.directionKey.parentY]: this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY
|
|
63308
|
-
}, isHover, isSelect);
|
|
63309
|
-
elements.push(...childElements);
|
|
63310
|
-
}
|
|
63311
|
-
else {
|
|
63312
|
-
if (element.type === 'icon' &&
|
|
63313
|
-
((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
|
|
63314
|
-
(element.cache?.visibleTime === 'click_cell' && !isSelect))) {
|
|
63315
|
-
continue;
|
|
63316
|
-
}
|
|
63317
|
-
element[this.directionKey.x] += this.offsetX + this[this.directionKey.x] + parentPos.parentX;
|
|
63318
|
-
element[this.directionKey.y] += this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY;
|
|
63319
|
-
elements.push(element);
|
|
63320
|
-
}
|
|
63321
|
-
}
|
|
63322
|
-
return elements;
|
|
63138
|
+
class Container extends Group$2 {
|
|
63139
|
+
constructor(containerOptions) {
|
|
63140
|
+
if (containerOptions.direction) {
|
|
63141
|
+
containerOptions.flexDirection = containerOptions.direction;
|
|
63142
|
+
}
|
|
63143
|
+
if (containerOptions.justifyContent &&
|
|
63144
|
+
(containerOptions.justifyContent === 'start' || containerOptions.justifyContent === 'end')) {
|
|
63145
|
+
containerOptions.justifyContent = ('flex-' + containerOptions.justifyContent);
|
|
63146
|
+
}
|
|
63147
|
+
if (containerOptions.alignItems &&
|
|
63148
|
+
(containerOptions.alignItems === 'start' || containerOptions.alignItems === 'end')) {
|
|
63149
|
+
containerOptions.alignItems = ('flex-' + containerOptions.alignItems);
|
|
63150
|
+
}
|
|
63151
|
+
if (containerOptions.alignContent &&
|
|
63152
|
+
(containerOptions.alignContent === 'start' || containerOptions.alignContent === 'end')) {
|
|
63153
|
+
containerOptions.alignContent = ('flex-' + containerOptions.alignContent);
|
|
63154
|
+
}
|
|
63155
|
+
containerOptions.display = 'flex';
|
|
63156
|
+
if (!containerOptions.flexDirection) {
|
|
63157
|
+
containerOptions.flexDirection = 'row';
|
|
63158
|
+
}
|
|
63159
|
+
containerOptions.clip = true;
|
|
63160
|
+
containerOptions.fill = containerOptions?.background?.fill;
|
|
63161
|
+
containerOptions.stroke = containerOptions?.background?.stroke;
|
|
63162
|
+
containerOptions.lineWidth = containerOptions?.background?.lineWidth;
|
|
63163
|
+
containerOptions.cornerRadius = containerOptions?.background?.cornerRadius;
|
|
63164
|
+
const isPaddingNumber = isArray$5(containerOptions.boundsPadding);
|
|
63165
|
+
const padding = [
|
|
63166
|
+
containerOptions.marginTop ??
|
|
63167
|
+
(isPaddingNumber ? containerOptions.boundsPadding[0] : containerOptions.boundsPadding) ??
|
|
63168
|
+
0,
|
|
63169
|
+
containerOptions.marginRight ??
|
|
63170
|
+
(isPaddingNumber ? containerOptions.boundsPadding[1] : containerOptions.boundsPadding) ??
|
|
63171
|
+
0,
|
|
63172
|
+
containerOptions.marginBottom ??
|
|
63173
|
+
(isPaddingNumber
|
|
63174
|
+
? containerOptions.boundsPadding[2] ?? containerOptions.boundsPadding[0]
|
|
63175
|
+
: containerOptions.boundsPadding) ??
|
|
63176
|
+
0,
|
|
63177
|
+
containerOptions.marginLeft ??
|
|
63178
|
+
(isPaddingNumber
|
|
63179
|
+
? containerOptions.boundsPadding[3] ?? containerOptions.boundsPadding[1]
|
|
63180
|
+
: containerOptions.boundsPadding) ??
|
|
63181
|
+
0
|
|
63182
|
+
];
|
|
63183
|
+
containerOptions.boundsPadding = padding;
|
|
63184
|
+
super(containerOptions);
|
|
63323
63185
|
}
|
|
63324
63186
|
}
|
|
63325
63187
|
|
|
63326
|
-
class
|
|
63327
|
-
|
|
63328
|
-
|
|
63329
|
-
|
|
63330
|
-
radius;
|
|
63331
|
-
fill;
|
|
63332
|
-
stroke;
|
|
63333
|
-
constructor(options) {
|
|
63334
|
-
super(options);
|
|
63335
|
-
this.width = options.width;
|
|
63336
|
-
this.height = options.height;
|
|
63337
|
-
this.lineWidth = options.lineWidth || 0;
|
|
63338
|
-
this.cornerRadius = options.cornerRadius || 0;
|
|
63339
|
-
this.radius = this.cornerRadius;
|
|
63340
|
-
this.fill = options.fill || '#777';
|
|
63341
|
-
this.stroke = options.stroke || undefined;
|
|
63342
|
-
this.initLayoutSize();
|
|
63343
|
-
}
|
|
63344
|
-
}
|
|
63345
|
-
|
|
63346
|
-
class Container extends BaseElement {
|
|
63347
|
-
type = 'container';
|
|
63348
|
-
_widthObj;
|
|
63349
|
-
_heightObj;
|
|
63350
|
-
needCalcSize = false;
|
|
63351
|
-
direction;
|
|
63352
|
-
justifyContent;
|
|
63353
|
-
alignItems;
|
|
63354
|
-
alignContent;
|
|
63355
|
-
lines = [];
|
|
63356
|
-
currentLine;
|
|
63357
|
-
currentLineY = 0;
|
|
63358
|
-
table;
|
|
63359
|
-
directionKey;
|
|
63360
|
-
showBounds;
|
|
63361
|
-
offsetY = 0;
|
|
63362
|
-
isRoot;
|
|
63363
|
-
constructor(options) {
|
|
63364
|
-
super(options);
|
|
63365
|
-
this.direction = options.direction || 'row';
|
|
63366
|
-
this.justifyContent = options.justifyContent || 'start';
|
|
63367
|
-
this.alignItems = options.alignItems || 'start';
|
|
63368
|
-
this.alignContent = options.alignContent || 'start';
|
|
63369
|
-
if (isNumber$6(options.width)) {
|
|
63370
|
-
this.width = options.width;
|
|
63371
|
-
}
|
|
63372
|
-
else {
|
|
63373
|
-
this._widthObj = options.width;
|
|
63374
|
-
this.needCalcSize = true;
|
|
63375
|
-
}
|
|
63376
|
-
if (isNumber$6(options.height)) {
|
|
63377
|
-
this.height = options.height;
|
|
63378
|
-
}
|
|
63379
|
-
else {
|
|
63380
|
-
this._heightObj = options.height;
|
|
63381
|
-
this.needCalcSize = true;
|
|
63382
|
-
}
|
|
63383
|
-
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63384
|
-
this.showBounds = options.showBounds || false;
|
|
63385
|
-
this.initLayoutSize();
|
|
63386
|
-
}
|
|
63387
|
-
add(element) {
|
|
63388
|
-
if (this.needCalcSize) {
|
|
63389
|
-
throw new Error('Need to specify a parent element before adding a child element when use percent size!');
|
|
63390
|
-
}
|
|
63391
|
-
if (element.type === 'container') {
|
|
63392
|
-
element.calcSize(this.width, this.height);
|
|
63393
|
-
}
|
|
63394
|
-
if (this.currentLine && this.currentLine.canAdd(element)) {
|
|
63395
|
-
this.currentLine.add(element);
|
|
63396
|
-
}
|
|
63397
|
-
else {
|
|
63398
|
-
if (this.currentLine) {
|
|
63399
|
-
this.currentLine.addAble = false;
|
|
63400
|
-
this.currentLineY += this.currentLine[this.directionKey.height];
|
|
63401
|
-
this.currentLine.lineFinish();
|
|
63402
|
-
}
|
|
63403
|
-
this.currentLine = new Line(this[this.directionKey.width], this.direction, this.justifyContent, this.alignItems);
|
|
63404
|
-
this.currentLine[this.directionKey.y] = this.currentLineY;
|
|
63405
|
-
this.currentLine.add(element);
|
|
63406
|
-
this.lines.push(this.currentLine);
|
|
63407
|
-
}
|
|
63408
|
-
}
|
|
63409
|
-
updateYAlign() {
|
|
63410
|
-
const offsetY = this[this.directionKey.height] - this.currentLineY;
|
|
63411
|
-
if (this.alignContent === 'center') {
|
|
63412
|
-
this.offsetY = offsetY / 2;
|
|
63413
|
-
}
|
|
63414
|
-
else if (this.alignContent === 'start') {
|
|
63415
|
-
this.offsetY = 0;
|
|
63416
|
-
}
|
|
63417
|
-
else {
|
|
63418
|
-
this.offsetY = offsetY;
|
|
63419
|
-
}
|
|
63420
|
-
}
|
|
63421
|
-
getSize() {
|
|
63422
|
-
const result = {
|
|
63423
|
-
width: 0,
|
|
63424
|
-
height: 0
|
|
63425
|
-
};
|
|
63426
|
-
if (this.currentLine && this.currentLine.addAble) {
|
|
63427
|
-
result[this.directionKey.height] = this.currentLineY + this.currentLine[this.directionKey.height];
|
|
63428
|
-
}
|
|
63429
|
-
else {
|
|
63430
|
-
result[this.directionKey.height] = this.currentLineY;
|
|
63431
|
-
}
|
|
63432
|
-
for (let i = 0; i < this.lines.length; i++) {
|
|
63433
|
-
const line = this.lines[i];
|
|
63434
|
-
if (result[this.directionKey.width] < line[this.directionKey.width]) {
|
|
63435
|
-
result[this.directionKey.width] = line[this.directionKey.width];
|
|
63436
|
-
}
|
|
63437
|
-
}
|
|
63438
|
-
return result;
|
|
63439
|
-
}
|
|
63440
|
-
getContentSize() {
|
|
63441
|
-
const result = {
|
|
63442
|
-
width: 0,
|
|
63443
|
-
height: 0
|
|
63444
|
-
};
|
|
63445
|
-
const calcFlag = {
|
|
63446
|
-
width: true,
|
|
63447
|
-
height: true
|
|
63448
|
-
};
|
|
63449
|
-
if (!this.isRoot && !this._heightObj) {
|
|
63450
|
-
calcFlag.height = false;
|
|
63451
|
-
result.height = this.height;
|
|
63452
|
-
}
|
|
63453
|
-
if (!this.isRoot && !this._widthObj) {
|
|
63454
|
-
calcFlag.width = false;
|
|
63455
|
-
result.width = this.width;
|
|
63456
|
-
}
|
|
63457
|
-
for (let i = 0; i < this.lines.length; i++) {
|
|
63458
|
-
const line = this.lines[i];
|
|
63459
|
-
const size = line.getContentSize();
|
|
63460
|
-
if (calcFlag[this.directionKey.width] && result[this.directionKey.width] < size[this.directionKey.width]) {
|
|
63461
|
-
result[this.directionKey.width] = size[this.directionKey.width];
|
|
63462
|
-
}
|
|
63463
|
-
if (calcFlag[this.directionKey.height]) {
|
|
63464
|
-
result[this.directionKey.height] += size[this.directionKey.height];
|
|
63465
|
-
}
|
|
63466
|
-
}
|
|
63467
|
-
return result;
|
|
63468
|
-
}
|
|
63469
|
-
calcSize(parentWidth, parentHeight) {
|
|
63470
|
-
if (this._heightObj) {
|
|
63471
|
-
this.height = (parentHeight * this._heightObj.percent) / 100 + this._heightObj.delta;
|
|
63472
|
-
this.needCalcSize = false;
|
|
63473
|
-
this.initLayoutSize();
|
|
63474
|
-
}
|
|
63475
|
-
if (this._widthObj) {
|
|
63476
|
-
this.width = (parentWidth * this._widthObj.percent) / 100 + this._widthObj.delta;
|
|
63477
|
-
this.needCalcSize = false;
|
|
63478
|
-
this.initLayoutSize();
|
|
63479
|
-
}
|
|
63480
|
-
}
|
|
63481
|
-
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63482
|
-
if (this.currentLine && this.currentLine.addAble) {
|
|
63483
|
-
this.currentLine.addAble = false;
|
|
63484
|
-
this.currentLineY += this.currentLine[this.directionKey.height];
|
|
63485
|
-
this.currentLine.lineFinish();
|
|
63486
|
-
}
|
|
63487
|
-
this.updateYAlign();
|
|
63488
|
-
const elements = [];
|
|
63489
|
-
if (this.background && this.background.fill) {
|
|
63490
|
-
const backgroundRect = new Rect({
|
|
63491
|
-
width: this.width,
|
|
63492
|
-
height: this.height,
|
|
63493
|
-
stroke: this.background.stroke ?? false,
|
|
63494
|
-
fill: this.background.fill,
|
|
63495
|
-
cornerRadius: this.background.cornerRadius ?? 0,
|
|
63496
|
-
lineWidth: this.background.lineWidth ?? 1
|
|
63497
|
-
});
|
|
63498
|
-
backgroundRect.x += this.x + parentPos.parentX;
|
|
63499
|
-
backgroundRect.y += this.y + parentPos.parentY;
|
|
63500
|
-
elements.push(backgroundRect);
|
|
63501
|
-
}
|
|
63502
|
-
if (this.showBounds) {
|
|
63503
|
-
const boundsRect = new Rect({
|
|
63504
|
-
width: this.width,
|
|
63505
|
-
height: this.height,
|
|
63506
|
-
cornerRadius: 0,
|
|
63507
|
-
stroke: 'red',
|
|
63508
|
-
fill: 'rgba(255, 0, 0, 0.2)',
|
|
63509
|
-
lineWidth: 4
|
|
63510
|
-
});
|
|
63511
|
-
boundsRect.x += this.x + parentPos.parentX;
|
|
63512
|
-
boundsRect.y += this.y + parentPos.parentY;
|
|
63513
|
-
elements.push(boundsRect);
|
|
63514
|
-
}
|
|
63515
|
-
for (let i = 0; i < this.lines.length; i++) {
|
|
63516
|
-
const line = this.lines[i];
|
|
63517
|
-
line[this.directionKey.y] += this.offsetY;
|
|
63518
|
-
const linesElements = line.getElements({
|
|
63519
|
-
[this.directionKey.parentX]: this.x + parentPos.parentX,
|
|
63520
|
-
[this.directionKey.parentY]: this.y + parentPos.parentY
|
|
63521
|
-
}, isHover, isSelect);
|
|
63522
|
-
elements.push(...linesElements);
|
|
63523
|
-
}
|
|
63524
|
-
return elements;
|
|
63525
|
-
}
|
|
63526
|
-
}
|
|
63527
|
-
|
|
63528
|
-
class GroupElement extends BaseElement {
|
|
63529
|
-
type = 'group-element';
|
|
63530
|
-
direction;
|
|
63531
|
-
alignItems;
|
|
63532
|
-
width = 0;
|
|
63533
|
-
height = 0;
|
|
63534
|
-
children = [];
|
|
63535
|
-
directionKey;
|
|
63536
|
-
constructor(options) {
|
|
63537
|
-
super(options);
|
|
63538
|
-
this.direction = options.direction || 'row';
|
|
63539
|
-
this.alignItems = options.alignItems || 'start';
|
|
63540
|
-
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63541
|
-
}
|
|
63542
|
-
add(element) {
|
|
63543
|
-
element.x = this.width;
|
|
63544
|
-
this.width += element.layoutWidth;
|
|
63545
|
-
this.children.push(element);
|
|
63546
|
-
this.updateHeight(element);
|
|
63547
|
-
this.initLayoutSize();
|
|
63548
|
-
}
|
|
63549
|
-
updateHeight(element) {
|
|
63550
|
-
if (element.layoutHeight > this.height) {
|
|
63551
|
-
this.height = element.layoutHeight;
|
|
63552
|
-
}
|
|
63553
|
-
}
|
|
63554
|
-
getOffsetY(element) {
|
|
63555
|
-
switch (this.alignItems) {
|
|
63556
|
-
case 'start':
|
|
63557
|
-
return 0;
|
|
63558
|
-
case 'center':
|
|
63559
|
-
return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
|
|
63560
|
-
case 'end':
|
|
63561
|
-
return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
|
|
63562
|
-
default:
|
|
63563
|
-
return 0;
|
|
63564
|
-
}
|
|
63565
|
-
}
|
|
63566
|
-
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63567
|
-
const elements = [];
|
|
63568
|
-
for (let i = 0; i < this.children.length; i++) {
|
|
63569
|
-
const element = this.children[i];
|
|
63570
|
-
if (element.type === 'icon' &&
|
|
63571
|
-
((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
|
|
63572
|
-
(element.cache?.visibleTime === 'click_cell' && !isSelect))) {
|
|
63573
|
-
continue;
|
|
63574
|
-
}
|
|
63575
|
-
element[this.directionKey.x] += this[this.directionKey.dx] + this[this.directionKey.x] + parentPos.parentX;
|
|
63576
|
-
element[this.directionKey.y] +=
|
|
63577
|
-
this.getOffsetY(element) + this[this.directionKey.dy] + this[this.directionKey.y] + parentPos.parentY;
|
|
63578
|
-
elements.push(element);
|
|
63579
|
-
}
|
|
63580
|
-
return elements;
|
|
63188
|
+
class GroupElement extends Container {
|
|
63189
|
+
constructor(option) {
|
|
63190
|
+
option.flexWrap = 'nowrap';
|
|
63191
|
+
super(option);
|
|
63581
63192
|
}
|
|
63582
63193
|
}
|
|
63583
63194
|
|
|
63584
|
-
class Icon extends
|
|
63585
|
-
type = 'icon';
|
|
63195
|
+
class Icon extends Image$3 {
|
|
63586
63196
|
svg;
|
|
63587
63197
|
iconName;
|
|
63588
|
-
cursor;
|
|
63589
63198
|
cache;
|
|
63590
63199
|
constructor(options) {
|
|
63591
|
-
|
|
63592
|
-
|
|
63593
|
-
if (isString$3(this.iconName)) {
|
|
63200
|
+
let cache;
|
|
63201
|
+
if (isString$3(options.iconName)) {
|
|
63594
63202
|
const regedIcons = get$1();
|
|
63595
|
-
|
|
63203
|
+
cache = regedIcons[options.iconName];
|
|
63596
63204
|
if (cache) {
|
|
63597
|
-
|
|
63598
|
-
|
|
63599
|
-
|
|
63600
|
-
|
|
63601
|
-
|
|
63602
|
-
|
|
63603
|
-
|
|
63604
|
-
|
|
63605
|
-
|
|
63606
|
-
|
|
63607
|
-
|
|
63205
|
+
options.width = options.width ?? cache.width;
|
|
63206
|
+
options.height = options.height ?? cache.height;
|
|
63207
|
+
options.svg = cache.svg;
|
|
63208
|
+
options.cursor = cache.cursor;
|
|
63209
|
+
}
|
|
63210
|
+
}
|
|
63211
|
+
if (options.svg) {
|
|
63212
|
+
options.image = options.svg;
|
|
63213
|
+
}
|
|
63214
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63215
|
+
const padding = [
|
|
63216
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63217
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63218
|
+
options.marginBottom ??
|
|
63219
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63220
|
+
0,
|
|
63221
|
+
options.marginLeft ??
|
|
63222
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63223
|
+
0
|
|
63224
|
+
];
|
|
63225
|
+
options.boundsPadding = padding;
|
|
63226
|
+
super(options);
|
|
63227
|
+
this.cache = cache;
|
|
63608
63228
|
}
|
|
63609
63229
|
}
|
|
63610
63230
|
|
|
63611
|
-
let Image$1 = class Image extends
|
|
63612
|
-
type = 'image';
|
|
63613
|
-
src;
|
|
63614
|
-
cursor;
|
|
63615
|
-
cache;
|
|
63616
|
-
shape;
|
|
63231
|
+
let Image$1 = class Image extends Image$3 {
|
|
63617
63232
|
constructor(options) {
|
|
63233
|
+
if (options.src) {
|
|
63234
|
+
options.image = options.src;
|
|
63235
|
+
}
|
|
63236
|
+
if (options.shape === 'circle') {
|
|
63237
|
+
options.cornerRadius = options.width / 2;
|
|
63238
|
+
}
|
|
63239
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63240
|
+
const padding = [
|
|
63241
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63242
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63243
|
+
options.marginBottom ??
|
|
63244
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63245
|
+
0,
|
|
63246
|
+
options.marginLeft ??
|
|
63247
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63248
|
+
0
|
|
63249
|
+
];
|
|
63250
|
+
options.boundsPadding = padding;
|
|
63618
63251
|
super(options);
|
|
63619
|
-
|
|
63620
|
-
|
|
63621
|
-
|
|
63622
|
-
|
|
63623
|
-
this.initLayoutSize();
|
|
63624
|
-
}
|
|
63625
|
-
};
|
|
63626
|
-
|
|
63627
|
-
class Text extends BaseElement {
|
|
63628
|
-
type = 'text';
|
|
63629
|
-
text;
|
|
63630
|
-
fill;
|
|
63631
|
-
color;
|
|
63632
|
-
stroke;
|
|
63633
|
-
lineWidth;
|
|
63634
|
-
fontSize;
|
|
63635
|
-
fontFamily;
|
|
63636
|
-
fontWeight;
|
|
63637
|
-
fontVariant;
|
|
63638
|
-
fontStyle;
|
|
63639
|
-
ellipsis;
|
|
63640
|
-
maxLineWidth;
|
|
63641
|
-
textAlign;
|
|
63642
|
-
textBaseline;
|
|
63643
|
-
lineHeight;
|
|
63644
|
-
underline;
|
|
63645
|
-
lineThrough;
|
|
63646
|
-
heightLimit;
|
|
63647
|
-
lineClamp;
|
|
63252
|
+
}
|
|
63253
|
+
};
|
|
63254
|
+
|
|
63255
|
+
class Rect extends Rect$1 {
|
|
63648
63256
|
constructor(options) {
|
|
63257
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63258
|
+
const padding = [
|
|
63259
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63260
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63261
|
+
options.marginBottom ??
|
|
63262
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63263
|
+
0,
|
|
63264
|
+
options.marginLeft ??
|
|
63265
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63266
|
+
0
|
|
63267
|
+
];
|
|
63268
|
+
options.boundsPadding = padding;
|
|
63269
|
+
super(options);
|
|
63270
|
+
}
|
|
63271
|
+
}
|
|
63272
|
+
|
|
63273
|
+
class Text extends WrapText {
|
|
63274
|
+
constructor(options) {
|
|
63275
|
+
if (!options.textBaseline) {
|
|
63276
|
+
options.textBaseline = 'top';
|
|
63277
|
+
}
|
|
63278
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63279
|
+
const padding = [
|
|
63280
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63281
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63282
|
+
options.marginBottom ??
|
|
63283
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63284
|
+
0,
|
|
63285
|
+
options.marginLeft ??
|
|
63286
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63287
|
+
0
|
|
63288
|
+
];
|
|
63289
|
+
options.boundsPadding = padding;
|
|
63649
63290
|
super(options);
|
|
63650
|
-
this.text = options.text;
|
|
63651
|
-
this.fontSize = options.fontSize || 12;
|
|
63652
|
-
this.fontFamily = options.fontFamily || 'Arial,sans-serif';
|
|
63653
|
-
this.fill = options.color || options.fill || 'black';
|
|
63654
|
-
this.textBaseline = options.textBaseline || 'top';
|
|
63655
|
-
this.textAlign = options.textAlign || 'left';
|
|
63656
|
-
options.stroke && (this.stroke = options.stroke);
|
|
63657
|
-
options.lineWidth && (this.lineWidth = options.lineWidth);
|
|
63658
|
-
options.fontWeight && (this.fontWeight = options.fontWeight);
|
|
63659
|
-
options.fontVariant && (this.fontVariant = options.fontVariant);
|
|
63660
|
-
options.fontStyle && (this.fontStyle = options.fontStyle);
|
|
63661
|
-
options.ellipsis && (this.ellipsis = options.ellipsis);
|
|
63662
|
-
options.maxLineWidth && (this.maxLineWidth = options.maxLineWidth);
|
|
63663
|
-
options.lineHeight && (this.lineHeight = options.lineHeight);
|
|
63664
|
-
options.underline && (this.underline = options.underline);
|
|
63665
|
-
options.lineThrough && (this.lineThrough = options.lineThrough);
|
|
63666
|
-
options.heightLimit && (this.heightLimit = options.heightLimit);
|
|
63667
|
-
options.lineClamp && (this.lineClamp = options.lineClamp);
|
|
63668
63291
|
}
|
|
63669
63292
|
getSize(table) {
|
|
63670
|
-
|
|
63671
|
-
fontSize: this.fontSize,
|
|
63672
|
-
fontWeight: this.fontWeight,
|
|
63673
|
-
fontFamily: this.fontFamily
|
|
63674
|
-
});
|
|
63675
|
-
this.width = width;
|
|
63676
|
-
this.height = height;
|
|
63677
|
-
this.initLayoutSize();
|
|
63678
|
-
if (this.background) {
|
|
63679
|
-
this.dx += this.background.expandX || 0;
|
|
63680
|
-
this.dy += this.background.expandY || 0;
|
|
63681
|
-
}
|
|
63293
|
+
this.AABBBounds.width();
|
|
63682
63294
|
}
|
|
63683
63295
|
}
|
|
63684
63296
|
|
|
@@ -63689,41 +63301,74 @@
|
|
|
63689
63301
|
};
|
|
63690
63302
|
}
|
|
63691
63303
|
|
|
63692
|
-
class
|
|
63693
|
-
type = 'arc';
|
|
63694
|
-
radius;
|
|
63695
|
-
startDegree = 0;
|
|
63696
|
-
endDegree = 360;
|
|
63697
|
-
clockWise = true;
|
|
63698
|
-
lineWidth;
|
|
63699
|
-
fill;
|
|
63700
|
-
stroke;
|
|
63304
|
+
class Arc extends Arc$1 {
|
|
63701
63305
|
constructor(options) {
|
|
63306
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63307
|
+
const padding = [
|
|
63308
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63309
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63310
|
+
options.marginBottom ??
|
|
63311
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63312
|
+
0,
|
|
63313
|
+
options.marginLeft ??
|
|
63314
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63315
|
+
0
|
|
63316
|
+
];
|
|
63317
|
+
options.boundsPadding = padding;
|
|
63318
|
+
super(options);
|
|
63319
|
+
}
|
|
63320
|
+
}
|
|
63321
|
+
|
|
63322
|
+
class Tag extends Tag$1 {
|
|
63323
|
+
constructor(options) {
|
|
63324
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63325
|
+
const padding = [
|
|
63326
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63327
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63328
|
+
options.marginBottom ??
|
|
63329
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63330
|
+
0,
|
|
63331
|
+
options.marginLeft ??
|
|
63332
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63333
|
+
0
|
|
63334
|
+
];
|
|
63335
|
+
options.boundsPadding = padding;
|
|
63336
|
+
super(options);
|
|
63337
|
+
}
|
|
63338
|
+
getSize(table) {
|
|
63339
|
+
this.AABBBounds.width();
|
|
63340
|
+
}
|
|
63341
|
+
}
|
|
63342
|
+
|
|
63343
|
+
class Group extends Group$2 {
|
|
63344
|
+
constructor(options) {
|
|
63345
|
+
const isPaddingNumber = isArray$5(options.boundsPadding);
|
|
63346
|
+
const padding = [
|
|
63347
|
+
options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
|
|
63348
|
+
options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
|
|
63349
|
+
options.marginBottom ??
|
|
63350
|
+
(isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
|
|
63351
|
+
0,
|
|
63352
|
+
options.marginLeft ??
|
|
63353
|
+
(isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
|
|
63354
|
+
0
|
|
63355
|
+
];
|
|
63356
|
+
options.boundsPadding = padding;
|
|
63702
63357
|
super(options);
|
|
63703
|
-
this.radius = options.radius;
|
|
63704
|
-
this.startDegree = options.startDegree;
|
|
63705
|
-
this.endDegree = options.endDegree;
|
|
63706
|
-
this.clockWise = options.clockWise;
|
|
63707
|
-
this.lineWidth = options.lineWidth;
|
|
63708
|
-
this.fill = options.fill;
|
|
63709
|
-
this.stroke = options.stroke;
|
|
63710
|
-
this.width = this.radius * 2;
|
|
63711
|
-
this.height = this.radius * 2;
|
|
63712
|
-
this.initLayoutSize();
|
|
63713
|
-
this.dx += this.radius;
|
|
63714
|
-
this.dy += this.radius;
|
|
63715
63358
|
}
|
|
63716
63359
|
}
|
|
63717
63360
|
|
|
63718
63361
|
var index = /*#__PURE__*/Object.freeze({
|
|
63719
63362
|
__proto__: null,
|
|
63363
|
+
Arc: Arc,
|
|
63720
63364
|
Circle: Circle,
|
|
63721
63365
|
Container: Container,
|
|
63366
|
+
Group: Group,
|
|
63722
63367
|
GroupElement: GroupElement,
|
|
63723
63368
|
Icon: Icon,
|
|
63724
63369
|
Image: Image$1,
|
|
63725
63370
|
Rect: Rect,
|
|
63726
|
-
|
|
63371
|
+
Tag: Tag,
|
|
63727
63372
|
Text: Text,
|
|
63728
63373
|
percentCalc: percentCalc
|
|
63729
63374
|
});
|
|
@@ -63974,10 +63619,10 @@
|
|
|
63974
63619
|
}
|
|
63975
63620
|
|
|
63976
63621
|
function VTag(params) {
|
|
63977
|
-
return new Tag(params ? params.attribute : {});
|
|
63622
|
+
return new Tag$1(params ? params.attribute : {});
|
|
63978
63623
|
}
|
|
63979
63624
|
|
|
63980
|
-
const version = "0.13.4-alpha.
|
|
63625
|
+
const version = "0.13.4-alpha.3";
|
|
63981
63626
|
function getIcons() {
|
|
63982
63627
|
return get$1();
|
|
63983
63628
|
}
|