@visactor/vtable 0.18.2-alpha.2 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +2 -2
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +2 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js +2 -2
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/core/BaseTable.js +6 -6
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +2 -2
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/listener/table-group.js +2 -2
- 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/scenegraph/component/cell-mover.d.ts +1 -0
- package/cjs/scenegraph/component/cell-mover.js +11 -0
- package/cjs/scenegraph/component/cell-mover.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +1 -0
- package/cjs/scenegraph/component/table-component.js +60 -0
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +10 -6
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +3 -3
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +781 -372
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +2 -2
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +2 -2
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js +2 -2
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/core/BaseTable.js +5 -5
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +2 -2
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/listener/table-group.js +2 -2
- 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/scenegraph/component/cell-mover.d.ts +1 -0
- package/es/scenegraph/component/cell-mover.js +11 -0
- package/es/scenegraph/component/cell-mover.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +1 -0
- package/es/scenegraph/component/table-component.js +60 -0
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +10 -6
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +3 -3
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +8 -8
package/dist/vtable.js
CHANGED
|
@@ -4153,6 +4153,7 @@
|
|
|
4153
4153
|
const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
|
|
4154
4154
|
opacity: 1,
|
|
4155
4155
|
background: null,
|
|
4156
|
+
backgroundCornerRadius: 0,
|
|
4156
4157
|
texture: null,
|
|
4157
4158
|
textureColor: "black",
|
|
4158
4159
|
textureSize: 10,
|
|
@@ -5321,7 +5322,10 @@
|
|
|
5321
5322
|
removeAllChild() {
|
|
5322
5323
|
if (!this._idMap) return;
|
|
5323
5324
|
let child = this._firstChild;
|
|
5324
|
-
for (; child;)
|
|
5325
|
+
for (; child;) {
|
|
5326
|
+
const next = child._next;
|
|
5327
|
+
child.parent = null, child._prev = null, child._next = null, child = next;
|
|
5328
|
+
}
|
|
5325
5329
|
this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
|
|
5326
5330
|
}
|
|
5327
5331
|
replaceChild(newChild, oldChild) {
|
|
@@ -7054,18 +7058,10 @@
|
|
|
7054
7058
|
class ResourceLoader {
|
|
7055
7059
|
static GetImage(url, mark) {
|
|
7056
7060
|
var _a;
|
|
7057
|
-
|
|
7061
|
+
const data = ResourceLoader.cache.get(url);
|
|
7058
7062
|
data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(() => {
|
|
7059
7063
|
mark.imageLoadFail(url);
|
|
7060
|
-
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : (
|
|
7061
|
-
type: "image",
|
|
7062
|
-
loadState: "init"
|
|
7063
|
-
}, ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(res => {
|
|
7064
|
-
var _a;
|
|
7065
|
-
data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
|
|
7066
|
-
(null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
|
|
7067
|
-
});
|
|
7068
|
-
})) : (data.loadState = "fail", mark.imageLoadFail(url)));
|
|
7064
|
+
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : ResourceLoader.loadImage(url, mark);
|
|
7069
7065
|
}
|
|
7070
7066
|
static GetSvg(svgStr, mark) {
|
|
7071
7067
|
var _a;
|
|
@@ -7091,8 +7087,60 @@
|
|
|
7091
7087
|
loadState: "init"
|
|
7092
7088
|
}, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
|
|
7093
7089
|
}
|
|
7090
|
+
static loading() {
|
|
7091
|
+
setTimeout(() => {
|
|
7092
|
+
if (!ResourceLoader.isLoading && ResourceLoader.toLoadAueue.length) {
|
|
7093
|
+
ResourceLoader.isLoading = !0;
|
|
7094
|
+
const tasks = ResourceLoader.toLoadAueue.splice(0, 10),
|
|
7095
|
+
promises = [];
|
|
7096
|
+
tasks.forEach(task => {
|
|
7097
|
+
const {
|
|
7098
|
+
url: url,
|
|
7099
|
+
marks: marks
|
|
7100
|
+
} = task,
|
|
7101
|
+
data = {
|
|
7102
|
+
type: "image",
|
|
7103
|
+
loadState: "init"
|
|
7104
|
+
};
|
|
7105
|
+
if (ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise) {
|
|
7106
|
+
data.waitingMark = marks;
|
|
7107
|
+
const end = data.dataPromise.then(res => {
|
|
7108
|
+
var _a;
|
|
7109
|
+
data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map((mark, index) => {
|
|
7110
|
+
(null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
|
|
7111
|
+
});
|
|
7112
|
+
});
|
|
7113
|
+
promises.push(end);
|
|
7114
|
+
} else data.loadState = "fail", marks.forEach(mark => mark.imageLoadFail(url));
|
|
7115
|
+
}), Promise.all(promises).then(() => {
|
|
7116
|
+
ResourceLoader.isLoading = !1, ResourceLoader.loading();
|
|
7117
|
+
}).catch(error => {
|
|
7118
|
+
ResourceLoader.isLoading = !1, ResourceLoader.loading();
|
|
7119
|
+
});
|
|
7120
|
+
}
|
|
7121
|
+
}, 0);
|
|
7122
|
+
}
|
|
7123
|
+
static loadImage(url, mark) {
|
|
7124
|
+
const index = getIndex(url, ResourceLoader.toLoadAueue);
|
|
7125
|
+
if (-1 !== index) return ResourceLoader.toLoadAueue[index].marks.push(mark), void ResourceLoader.loading();
|
|
7126
|
+
ResourceLoader.toLoadAueue.push({
|
|
7127
|
+
url: url,
|
|
7128
|
+
marks: [mark]
|
|
7129
|
+
}), ResourceLoader.loading();
|
|
7130
|
+
}
|
|
7131
|
+
static improveImageLoading(url) {
|
|
7132
|
+
const index = getIndex(url, ResourceLoader.toLoadAueue);
|
|
7133
|
+
if (-1 !== index) {
|
|
7134
|
+
const elememt = ResourceLoader.toLoadAueue.splice(index, 1);
|
|
7135
|
+
ResourceLoader.toLoadAueue.unshift(elememt[0]);
|
|
7136
|
+
}
|
|
7137
|
+
}
|
|
7138
|
+
}
|
|
7139
|
+
function getIndex(url, arr) {
|
|
7140
|
+
for (let i = 0; i < arr.length; i++) if (arr[i].url === url) return i;
|
|
7141
|
+
return -1;
|
|
7094
7142
|
}
|
|
7095
|
-
ResourceLoader.cache = new Map();
|
|
7143
|
+
ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [];
|
|
7096
7144
|
|
|
7097
7145
|
const tempMatrix = new Matrix(),
|
|
7098
7146
|
tempBounds$1 = new AABBBounds();
|
|
@@ -7290,7 +7338,7 @@
|
|
|
7290
7338
|
const context = {
|
|
7291
7339
|
type: AttributeUpdateType.INIT
|
|
7292
7340
|
};
|
|
7293
|
-
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.onAttributeUpdate(context);
|
|
7341
|
+
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
|
|
7294
7342
|
}
|
|
7295
7343
|
translate(x, y) {
|
|
7296
7344
|
var _a, _b;
|
|
@@ -7708,7 +7756,7 @@
|
|
|
7708
7756
|
data: "init",
|
|
7709
7757
|
state: null
|
|
7710
7758
|
};
|
|
7711
|
-
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
|
|
7759
|
+
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$4(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
|
|
7712
7760
|
}
|
|
7713
7761
|
imageLoadSuccess(url, image, cb) {
|
|
7714
7762
|
if (!this.resources) return;
|
|
@@ -8107,7 +8155,7 @@
|
|
|
8107
8155
|
doUpdateAABBBounds() {
|
|
8108
8156
|
const attribute = this.attribute,
|
|
8109
8157
|
groupTheme = getTheme(this).group;
|
|
8110
|
-
this._AABBBounds.
|
|
8158
|
+
this._AABBBounds.clear();
|
|
8111
8159
|
const bounds = application.graphicService.updateGroupAABBBounds(attribute, groupTheme, this._AABBBounds, this),
|
|
8112
8160
|
{
|
|
8113
8161
|
boundsPadding = groupTheme.boundsPadding
|
|
@@ -8732,7 +8780,7 @@
|
|
|
8732
8780
|
}
|
|
8733
8781
|
doUpdateAABBBounds(full) {
|
|
8734
8782
|
const circleTheme = getTheme(this).circle;
|
|
8735
|
-
this._AABBBounds.
|
|
8783
|
+
this._AABBBounds.clear();
|
|
8736
8784
|
const attribute = this.attribute,
|
|
8737
8785
|
bounds = application.graphicService.updateCircleAABBBounds(attribute, getTheme(this).circle, this._AABBBounds, full, this),
|
|
8738
8786
|
{
|
|
@@ -8882,7 +8930,7 @@
|
|
|
8882
8930
|
}
|
|
8883
8931
|
}
|
|
8884
8932
|
|
|
8885
|
-
const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
8933
|
+
const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "textAlign", "textBaseline", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
8886
8934
|
let Text$1 = class Text extends Graphic {
|
|
8887
8935
|
get font() {
|
|
8888
8936
|
const textTheme = getTheme(this).text;
|
|
@@ -8937,7 +8985,7 @@
|
|
|
8937
8985
|
}
|
|
8938
8986
|
doUpdateAABBBounds() {
|
|
8939
8987
|
const textTheme = getTheme(this).text;
|
|
8940
|
-
this._AABBBounds.
|
|
8988
|
+
this._AABBBounds.clear();
|
|
8941
8989
|
const attribute = this.attribute,
|
|
8942
8990
|
bounds = application.graphicService.updateTextAABBBounds(attribute, textTheme, this._AABBBounds, this),
|
|
8943
8991
|
{
|
|
@@ -10029,7 +10077,7 @@
|
|
|
10029
10077
|
}
|
|
10030
10078
|
doUpdateAABBBounds(full) {
|
|
10031
10079
|
const symbolTheme = getTheme(this).symbol;
|
|
10032
|
-
this._AABBBounds.
|
|
10080
|
+
this._AABBBounds.clear();
|
|
10033
10081
|
const attribute = this.attribute,
|
|
10034
10082
|
bounds = application.graphicService.updateSymbolAABBBounds(attribute, getTheme(this).symbol, this._AABBBounds, full, this),
|
|
10035
10083
|
{
|
|
@@ -10092,7 +10140,7 @@
|
|
|
10092
10140
|
}
|
|
10093
10141
|
doUpdateAABBBounds() {
|
|
10094
10142
|
const lineTheme = getTheme(this).line;
|
|
10095
|
-
this._AABBBounds.
|
|
10143
|
+
this._AABBBounds.clear();
|
|
10096
10144
|
const attribute = this.attribute,
|
|
10097
10145
|
bounds = application.graphicService.updateLineAABBBounds(attribute, getTheme(this).line, this._AABBBounds, this),
|
|
10098
10146
|
{
|
|
@@ -10157,7 +10205,7 @@
|
|
|
10157
10205
|
}
|
|
10158
10206
|
doUpdateAABBBounds() {
|
|
10159
10207
|
const rectTheme = getTheme(this).rect;
|
|
10160
|
-
this._AABBBounds.
|
|
10208
|
+
this._AABBBounds.clear();
|
|
10161
10209
|
const attribute = this.attribute,
|
|
10162
10210
|
bounds = application.graphicService.updateRectAABBBounds(attribute, getTheme(this).rect, this._AABBBounds, this),
|
|
10163
10211
|
{
|
|
@@ -10327,7 +10375,7 @@
|
|
|
10327
10375
|
}), this;
|
|
10328
10376
|
}
|
|
10329
10377
|
doUpdateAABBBounds() {
|
|
10330
|
-
this._AABBBounds.
|
|
10378
|
+
this._AABBBounds.clear();
|
|
10331
10379
|
const bounds = application.graphicService.updateGlyphAABBBounds(this.attribute, getTheme(this).glyph, this._AABBBounds, this);
|
|
10332
10380
|
return this.clearUpdateBoundTag(), bounds;
|
|
10333
10381
|
}
|
|
@@ -10646,9 +10694,15 @@
|
|
|
10646
10694
|
this.failCallback && this.failCallback();
|
|
10647
10695
|
});
|
|
10648
10696
|
}
|
|
10697
|
+
setAttributes(params, forceUpdateTag, context) {
|
|
10698
|
+
return params.image && this.loadImage(params.image), super.setAttributes(params, forceUpdateTag, context);
|
|
10699
|
+
}
|
|
10700
|
+
setAttribute(key, value, forceUpdateTag, context) {
|
|
10701
|
+
return "image" === key && this.loadImage(value), super.setAttribute(key, value, forceUpdateTag, context);
|
|
10702
|
+
}
|
|
10649
10703
|
doUpdateAABBBounds() {
|
|
10650
10704
|
const imageTheme = getTheme(this).image;
|
|
10651
|
-
this._AABBBounds.
|
|
10705
|
+
this._AABBBounds.clear();
|
|
10652
10706
|
const attribute = this.attribute,
|
|
10653
10707
|
bounds = application.graphicService.updateImageAABBBounds(attribute, getTheme(this).image, this._AABBBounds, this),
|
|
10654
10708
|
{
|
|
@@ -10924,7 +10978,7 @@
|
|
|
10924
10978
|
}
|
|
10925
10979
|
doUpdateAABBBounds() {
|
|
10926
10980
|
const richTextTheme = getTheme(this).richtext;
|
|
10927
|
-
this._AABBBounds.
|
|
10981
|
+
this._AABBBounds.clear();
|
|
10928
10982
|
const attribute = this.attribute,
|
|
10929
10983
|
bounds = application.graphicService.updateRichTextAABBBounds(attribute, getTheme(this).richtext, this._AABBBounds, this),
|
|
10930
10984
|
{
|
|
@@ -10975,10 +11029,13 @@
|
|
|
10975
11029
|
this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.renderNextFrame();
|
|
10976
11030
|
}, icon.richtextId = config.id, paragraphs.push(icon);
|
|
10977
11031
|
}
|
|
10978
|
-
} else
|
|
10979
|
-
const
|
|
10980
|
-
|
|
10981
|
-
|
|
11032
|
+
} else {
|
|
11033
|
+
const richTextConfig = textConfig[i];
|
|
11034
|
+
if (isNumber$3(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text.includes("\n")) {
|
|
11035
|
+
const textParts = richTextConfig.text.split("\n");
|
|
11036
|
+
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));
|
|
11038
|
+
}
|
|
10982
11039
|
const maxWidthFinite = "number" == typeof maxWidth && Number.isFinite(maxWidth) && maxWidth > 0,
|
|
10983
11040
|
maxHeightFinite = "number" == typeof maxHeight && Number.isFinite(maxHeight) && maxHeight > 0,
|
|
10984
11041
|
richTextWidthEnable = "number" == typeof width && Number.isFinite(width) && width > 0 && (!maxWidthFinite || width <= maxWidth),
|
|
@@ -11072,7 +11129,7 @@
|
|
|
11072
11129
|
}
|
|
11073
11130
|
doUpdateAABBBounds() {
|
|
11074
11131
|
const pathTheme = getTheme(this).path;
|
|
11075
|
-
this.doUpdatePathShape(), this._AABBBounds.
|
|
11132
|
+
this.doUpdatePathShape(), this._AABBBounds.clear();
|
|
11076
11133
|
const attribute = this.attribute,
|
|
11077
11134
|
bounds = application.graphicService.updatePathAABBBounds(attribute, getTheme(this).path, this._AABBBounds, this),
|
|
11078
11135
|
{
|
|
@@ -11133,7 +11190,7 @@
|
|
|
11133
11190
|
}
|
|
11134
11191
|
doUpdateAABBBounds() {
|
|
11135
11192
|
const areaTheme = getTheme(this).area;
|
|
11136
|
-
this._AABBBounds.
|
|
11193
|
+
this._AABBBounds.clear();
|
|
11137
11194
|
const attribute = this.attribute,
|
|
11138
11195
|
bounds = application.graphicService.updateAreaAABBBounds(attribute, getTheme(this).area, this._AABBBounds, this),
|
|
11139
11196
|
{
|
|
@@ -11299,7 +11356,7 @@
|
|
|
11299
11356
|
}
|
|
11300
11357
|
doUpdateAABBBounds(full) {
|
|
11301
11358
|
const arcTheme = getTheme(this).arc;
|
|
11302
|
-
this._AABBBounds.
|
|
11359
|
+
this._AABBBounds.clear();
|
|
11303
11360
|
const attribute = this.attribute,
|
|
11304
11361
|
bounds = application.graphicService.updateArcAABBBounds(attribute, getTheme(this).arc, this._AABBBounds, full, this),
|
|
11305
11362
|
{
|
|
@@ -11364,7 +11421,7 @@
|
|
|
11364
11421
|
}
|
|
11365
11422
|
doUpdateAABBBounds() {
|
|
11366
11423
|
const polygonTheme = getTheme(this).arc;
|
|
11367
|
-
this._AABBBounds.
|
|
11424
|
+
this._AABBBounds.clear();
|
|
11368
11425
|
const attribute = this.attribute,
|
|
11369
11426
|
bounds = application.graphicService.updateArc3dAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
|
|
11370
11427
|
{
|
|
@@ -11400,7 +11457,7 @@
|
|
|
11400
11457
|
}
|
|
11401
11458
|
doUpdateAABBBounds() {
|
|
11402
11459
|
const polygonTheme = getTheme(this).polygon;
|
|
11403
|
-
this._AABBBounds.
|
|
11460
|
+
this._AABBBounds.clear();
|
|
11404
11461
|
const attribute = this.attribute,
|
|
11405
11462
|
bounds = application.graphicService.updatePolygonAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
|
|
11406
11463
|
{
|
|
@@ -11449,7 +11506,7 @@
|
|
|
11449
11506
|
}
|
|
11450
11507
|
doUpdateAABBBounds() {
|
|
11451
11508
|
const polygonTheme = getTheme(this).polygon;
|
|
11452
|
-
this._AABBBounds.
|
|
11509
|
+
this._AABBBounds.clear();
|
|
11453
11510
|
const attribute = this.attribute,
|
|
11454
11511
|
bounds = application.graphicService.updatePyramid3dAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
|
|
11455
11512
|
{
|
|
@@ -12216,30 +12273,32 @@
|
|
|
12216
12273
|
}
|
|
12217
12274
|
}
|
|
12218
12275
|
transformAABBBounds(attribute, aabbBounds, theme, miter, graphic) {
|
|
12219
|
-
|
|
12220
|
-
scaleX = theme.scaleX,
|
|
12221
|
-
scaleY = theme.scaleY,
|
|
12222
|
-
stroke = theme.stroke,
|
|
12223
|
-
shadowBlur = theme.shadowBlur,
|
|
12224
|
-
lineWidth = theme.lineWidth,
|
|
12225
|
-
pickStrokeBuffer = theme.pickStrokeBuffer,
|
|
12226
|
-
strokeBoundsBuffer = theme.strokeBoundsBuffer
|
|
12227
|
-
} = attribute,
|
|
12228
|
-
tb1 = this.tempAABBBounds1,
|
|
12229
|
-
tb2 = this.tempAABBBounds2;
|
|
12230
|
-
if (stroke && lineWidth) {
|
|
12231
|
-
const scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
|
|
12232
|
-
boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
12233
|
-
}
|
|
12234
|
-
if (shadowBlur) {
|
|
12276
|
+
if (!aabbBounds.empty()) {
|
|
12235
12277
|
const {
|
|
12236
|
-
|
|
12237
|
-
|
|
12278
|
+
scaleX = theme.scaleX,
|
|
12279
|
+
scaleY = theme.scaleY,
|
|
12280
|
+
stroke = theme.stroke,
|
|
12281
|
+
shadowBlur = theme.shadowBlur,
|
|
12282
|
+
lineWidth = theme.lineWidth,
|
|
12283
|
+
pickStrokeBuffer = theme.pickStrokeBuffer,
|
|
12284
|
+
strokeBoundsBuffer = theme.strokeBoundsBuffer
|
|
12238
12285
|
} = attribute,
|
|
12239
|
-
|
|
12240
|
-
|
|
12286
|
+
tb1 = this.tempAABBBounds1,
|
|
12287
|
+
tb2 = this.tempAABBBounds2;
|
|
12288
|
+
if (stroke && lineWidth) {
|
|
12289
|
+
const scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
|
|
12290
|
+
boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
12291
|
+
}
|
|
12292
|
+
if (shadowBlur) {
|
|
12293
|
+
const {
|
|
12294
|
+
shadowOffsetX = theme.shadowOffsetX,
|
|
12295
|
+
shadowOffsetY = theme.shadowOffsetY
|
|
12296
|
+
} = attribute,
|
|
12297
|
+
shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2;
|
|
12298
|
+
boundStroke(tb1, shadowBlurWidth, !1, strokeBoundsBuffer + 1), tb1.translate(shadowOffsetX, shadowOffsetY), aabbBounds.union(tb1);
|
|
12299
|
+
}
|
|
12241
12300
|
}
|
|
12242
|
-
this.combindShadowAABBBounds(aabbBounds, graphic);
|
|
12301
|
+
if (this.combindShadowAABBBounds(aabbBounds, graphic), aabbBounds.empty()) return;
|
|
12243
12302
|
let updateMatrix = !0;
|
|
12244
12303
|
const m = graphic.transMatrix;
|
|
12245
12304
|
graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)), updateMatrix && transformBoundsWithMatrix(aabbBounds, aabbBounds, m);
|
|
@@ -12271,7 +12330,7 @@
|
|
|
12271
12330
|
|
|
12272
12331
|
let text;
|
|
12273
12332
|
function getTextBounds(params) {
|
|
12274
|
-
return text || (text = graphicCreator.CreateGraphic("text", {})), text.
|
|
12333
|
+
return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
|
|
12275
12334
|
}
|
|
12276
12335
|
|
|
12277
12336
|
const result = {
|
|
@@ -12402,6 +12461,234 @@
|
|
|
12402
12461
|
}
|
|
12403
12462
|
}
|
|
12404
12463
|
|
|
12464
|
+
const parse$3 = function () {
|
|
12465
|
+
const tokens = {
|
|
12466
|
+
linearGradient: /^(linear\-gradient)/i,
|
|
12467
|
+
radialGradient: /^(radial\-gradient)/i,
|
|
12468
|
+
conicGradient: /^(conic\-gradient)/i,
|
|
12469
|
+
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
|
|
12470
|
+
extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
|
|
12471
|
+
positionKeywords: /^(left|center|right|top|bottom)/i,
|
|
12472
|
+
pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
|
|
12473
|
+
percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
|
|
12474
|
+
emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
|
|
12475
|
+
angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
|
|
12476
|
+
fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
|
|
12477
|
+
startCall: /^\(/,
|
|
12478
|
+
endCall: /^\)/,
|
|
12479
|
+
comma: /^,/,
|
|
12480
|
+
hexColor: /(^\#[0-9a-fA-F]+)/,
|
|
12481
|
+
literalColor: /^([a-zA-Z]+)/,
|
|
12482
|
+
rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
|
|
12483
|
+
rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
|
|
12484
|
+
number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
|
|
12485
|
+
};
|
|
12486
|
+
let input = "";
|
|
12487
|
+
function error(msg) {
|
|
12488
|
+
const err = new Error(input + ": " + msg);
|
|
12489
|
+
throw err.source = input, err;
|
|
12490
|
+
}
|
|
12491
|
+
function getAST() {
|
|
12492
|
+
const ast = matchListing(matchDefinition);
|
|
12493
|
+
return input.length > 0 && error("Invalid input not EOF"), ast;
|
|
12494
|
+
}
|
|
12495
|
+
function matchDefinition() {
|
|
12496
|
+
return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
|
|
12497
|
+
}
|
|
12498
|
+
function matchGradient(gradientType, pattern, orientationMatcher) {
|
|
12499
|
+
return function (pattern, callback) {
|
|
12500
|
+
const captures = scan(pattern);
|
|
12501
|
+
if (captures) {
|
|
12502
|
+
scan(tokens.startCall) || error("Missing (");
|
|
12503
|
+
const result = callback(captures);
|
|
12504
|
+
return scan(tokens.endCall) || error("Missing )"), result;
|
|
12505
|
+
}
|
|
12506
|
+
}(pattern, function (captures) {
|
|
12507
|
+
const orientation = orientationMatcher();
|
|
12508
|
+
return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
|
|
12509
|
+
type: gradientType,
|
|
12510
|
+
orientation: orientation,
|
|
12511
|
+
colorStops: matchListing(matchColorStop)
|
|
12512
|
+
};
|
|
12513
|
+
});
|
|
12514
|
+
}
|
|
12515
|
+
function matchLinearOrientation() {
|
|
12516
|
+
return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
|
|
12517
|
+
}
|
|
12518
|
+
function matchConicalOrientation() {
|
|
12519
|
+
return match("angular", tokens.fromAngleValue, 1);
|
|
12520
|
+
}
|
|
12521
|
+
function matchListRadialOrientations() {
|
|
12522
|
+
let radialOrientations,
|
|
12523
|
+
lookaheadCache,
|
|
12524
|
+
radialOrientation = matchRadialOrientation();
|
|
12525
|
+
return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
|
|
12526
|
+
}
|
|
12527
|
+
function matchRadialOrientation() {
|
|
12528
|
+
let radialType = function () {
|
|
12529
|
+
const circle = match("shape", /^(circle)/i, 0);
|
|
12530
|
+
circle && (circle.style = matchLength() || matchExtentKeyword());
|
|
12531
|
+
return circle;
|
|
12532
|
+
}() || function () {
|
|
12533
|
+
const ellipse = match("shape", /^(ellipse)/i, 0);
|
|
12534
|
+
ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
|
|
12535
|
+
return ellipse;
|
|
12536
|
+
}();
|
|
12537
|
+
if (radialType) radialType.at = matchAtPosition();else {
|
|
12538
|
+
const extent = matchExtentKeyword();
|
|
12539
|
+
if (extent) {
|
|
12540
|
+
radialType = extent;
|
|
12541
|
+
const positionAt = matchAtPosition();
|
|
12542
|
+
positionAt && (radialType.at = positionAt);
|
|
12543
|
+
} else {
|
|
12544
|
+
const defaultPosition = matchPositioning();
|
|
12545
|
+
defaultPosition && (radialType = {
|
|
12546
|
+
type: "default-radial",
|
|
12547
|
+
at: defaultPosition
|
|
12548
|
+
});
|
|
12549
|
+
}
|
|
12550
|
+
}
|
|
12551
|
+
return radialType;
|
|
12552
|
+
}
|
|
12553
|
+
function matchExtentKeyword() {
|
|
12554
|
+
return match("extent-keyword", tokens.extentKeywords, 1);
|
|
12555
|
+
}
|
|
12556
|
+
function matchAtPosition() {
|
|
12557
|
+
if (match("position", /^at/, 0)) {
|
|
12558
|
+
const positioning = matchPositioning();
|
|
12559
|
+
return positioning || error("Missing positioning value"), positioning;
|
|
12560
|
+
}
|
|
12561
|
+
}
|
|
12562
|
+
function matchPositioning() {
|
|
12563
|
+
const location = {
|
|
12564
|
+
x: matchDistance(),
|
|
12565
|
+
y: matchDistance()
|
|
12566
|
+
};
|
|
12567
|
+
if (location.x || location.y) return {
|
|
12568
|
+
type: "position",
|
|
12569
|
+
value: location
|
|
12570
|
+
};
|
|
12571
|
+
}
|
|
12572
|
+
function matchListing(matcher) {
|
|
12573
|
+
let captures = matcher();
|
|
12574
|
+
const result = [];
|
|
12575
|
+
if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
|
|
12576
|
+
return result;
|
|
12577
|
+
}
|
|
12578
|
+
function matchColorStop() {
|
|
12579
|
+
const color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
|
|
12580
|
+
return color || error("Expected color definition"), color.length = matchDistance(), color;
|
|
12581
|
+
}
|
|
12582
|
+
function matchDistance() {
|
|
12583
|
+
return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
|
|
12584
|
+
}
|
|
12585
|
+
function matchLength() {
|
|
12586
|
+
return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
|
|
12587
|
+
}
|
|
12588
|
+
function match(type, pattern, captureIndex) {
|
|
12589
|
+
const captures = scan(pattern);
|
|
12590
|
+
if (captures) return {
|
|
12591
|
+
type: type,
|
|
12592
|
+
value: captures[captureIndex]
|
|
12593
|
+
};
|
|
12594
|
+
}
|
|
12595
|
+
function scan(regexp) {
|
|
12596
|
+
const blankCaptures = /^[\n\r\t\s]+/.exec(input);
|
|
12597
|
+
blankCaptures && consume(blankCaptures[0].length);
|
|
12598
|
+
const captures = regexp.exec(input);
|
|
12599
|
+
return captures && consume(captures[0].length), captures;
|
|
12600
|
+
}
|
|
12601
|
+
function consume(size) {
|
|
12602
|
+
input = input.substr(size);
|
|
12603
|
+
}
|
|
12604
|
+
return function (code) {
|
|
12605
|
+
return input = code.toString(), getAST();
|
|
12606
|
+
};
|
|
12607
|
+
}();
|
|
12608
|
+
class GradientParser {
|
|
12609
|
+
static IsGradient(c) {
|
|
12610
|
+
return !("string" == typeof c && c.length < 10);
|
|
12611
|
+
}
|
|
12612
|
+
static IsGradientStr(c) {
|
|
12613
|
+
return "string" == typeof c && c.length > 10;
|
|
12614
|
+
}
|
|
12615
|
+
static Parse(c) {
|
|
12616
|
+
if (GradientParser.IsGradientStr(c)) try {
|
|
12617
|
+
const datum = parse$3(c)[0];
|
|
12618
|
+
if (datum) {
|
|
12619
|
+
if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
|
|
12620
|
+
if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
|
|
12621
|
+
if ("conic" === datum.type) return GradientParser.ParseConic(datum);
|
|
12622
|
+
}
|
|
12623
|
+
} catch (err) {
|
|
12624
|
+
return c;
|
|
12625
|
+
}
|
|
12626
|
+
return c;
|
|
12627
|
+
}
|
|
12628
|
+
static ParseConic(datum) {
|
|
12629
|
+
const {
|
|
12630
|
+
orientation: orientation,
|
|
12631
|
+
colorStops = []
|
|
12632
|
+
} = datum,
|
|
12633
|
+
halfPi = pi / 2,
|
|
12634
|
+
sa = parseFloat(orientation.value) / 180 * pi - halfPi;
|
|
12635
|
+
return {
|
|
12636
|
+
gradient: "conical",
|
|
12637
|
+
x: .5,
|
|
12638
|
+
y: .5,
|
|
12639
|
+
startAngle: sa,
|
|
12640
|
+
endAngle: sa + pi2,
|
|
12641
|
+
stops: colorStops.map(item => ({
|
|
12642
|
+
color: item.value,
|
|
12643
|
+
offset: parseFloat(item.length.value) / 100
|
|
12644
|
+
}))
|
|
12645
|
+
};
|
|
12646
|
+
}
|
|
12647
|
+
static ParseRadial(datum) {
|
|
12648
|
+
const {
|
|
12649
|
+
colorStops = []
|
|
12650
|
+
} = datum;
|
|
12651
|
+
return {
|
|
12652
|
+
gradient: "radial",
|
|
12653
|
+
x0: .5,
|
|
12654
|
+
y0: .5,
|
|
12655
|
+
x1: .5,
|
|
12656
|
+
y1: .5,
|
|
12657
|
+
r0: 0,
|
|
12658
|
+
r1: 1,
|
|
12659
|
+
stops: colorStops.map(item => ({
|
|
12660
|
+
color: item.value,
|
|
12661
|
+
offset: parseFloat(item.length.value) / 100
|
|
12662
|
+
}))
|
|
12663
|
+
};
|
|
12664
|
+
}
|
|
12665
|
+
static ParseLinear(datum) {
|
|
12666
|
+
const {
|
|
12667
|
+
orientation: orientation,
|
|
12668
|
+
colorStops = []
|
|
12669
|
+
} = datum,
|
|
12670
|
+
halfPi = pi / 2;
|
|
12671
|
+
let angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi : 0;
|
|
12672
|
+
for (; angle < 0;) angle += pi2;
|
|
12673
|
+
for (; angle > pi2;) angle -= pi2;
|
|
12674
|
+
let x0 = 0,
|
|
12675
|
+
y0 = 0,
|
|
12676
|
+
x1 = 0,
|
|
12677
|
+
y1 = 0;
|
|
12678
|
+
return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = Math.cos(angle)) : angle < pi ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi), y1 = Math.cos(angle - pi)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi), y1 -= Math.sin(angle - halfPi - pi)), {
|
|
12679
|
+
gradient: "linear",
|
|
12680
|
+
x0: x0,
|
|
12681
|
+
y0: y0,
|
|
12682
|
+
x1: x1,
|
|
12683
|
+
y1: y1,
|
|
12684
|
+
stops: colorStops.map(item => ({
|
|
12685
|
+
color: item.value,
|
|
12686
|
+
offset: parseFloat(item.length.value) / 100
|
|
12687
|
+
}))
|
|
12688
|
+
};
|
|
12689
|
+
}
|
|
12690
|
+
}
|
|
12691
|
+
|
|
12405
12692
|
function getScaledStroke(context, width, dpr) {
|
|
12406
12693
|
let strokeWidth = width;
|
|
12407
12694
|
const {
|
|
@@ -12418,7 +12705,7 @@
|
|
|
12418
12705
|
if (!c || !0 === c) return "black";
|
|
12419
12706
|
let result, color;
|
|
12420
12707
|
if (isArray$1(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
|
|
12421
|
-
return "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
|
|
12708
|
+
return color = GradientParser.Parse(color), "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
|
|
12422
12709
|
}
|
|
12423
12710
|
function createLinearGradient(context, color, params) {
|
|
12424
12711
|
let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
@@ -14262,7 +14549,12 @@
|
|
|
14262
14549
|
const res = graphic.resources.get(background);
|
|
14263
14550
|
if ("success" !== res.state || !res.data) return;
|
|
14264
14551
|
context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
14265
|
-
} else
|
|
14552
|
+
} else {
|
|
14553
|
+
const {
|
|
14554
|
+
backgroundCornerRadius: backgroundCornerRadius
|
|
14555
|
+
} = graphic.attribute;
|
|
14556
|
+
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
14557
|
+
}
|
|
14266
14558
|
shouldReCalBounds && boundsAllocate.free(b);
|
|
14267
14559
|
}
|
|
14268
14560
|
}
|
|
@@ -14631,7 +14923,9 @@
|
|
|
14631
14923
|
image: url
|
|
14632
14924
|
} = image.attribute;
|
|
14633
14925
|
if (!url || !image.resources) return;
|
|
14634
|
-
|
|
14926
|
+
const res = image.resources.get(url);
|
|
14927
|
+
if ("loading" === res.state && isString$2(url)) return void ResourceLoader.improveImageLoading(url);
|
|
14928
|
+
if ("success" !== res.state) return;
|
|
14635
14929
|
const {
|
|
14636
14930
|
context: context
|
|
14637
14931
|
} = renderService.drawParams;
|
|
@@ -14671,6 +14965,197 @@
|
|
|
14671
14965
|
},
|
|
14672
14966
|
__metadata$H = undefined && undefined.__metadata || function (k, v) {
|
|
14673
14967
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
14968
|
+
};
|
|
14969
|
+
const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
|
|
14970
|
+
const tempDirtyBounds = new AABBBounds();
|
|
14971
|
+
class ShadowRootDrawItemInterceptorContribution {
|
|
14972
|
+
constructor() {
|
|
14973
|
+
this.order = 1;
|
|
14974
|
+
}
|
|
14975
|
+
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
14976
|
+
return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
14977
|
+
}
|
|
14978
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
14979
|
+
return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
14980
|
+
}
|
|
14981
|
+
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
14982
|
+
if (!graphic.shadowRoot) return !1;
|
|
14983
|
+
const {
|
|
14984
|
+
context: context
|
|
14985
|
+
} = drawContext;
|
|
14986
|
+
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
14987
|
+
tempDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
14988
|
+
const m = graphic.globalTransMatrix.getInverse();
|
|
14989
|
+
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
|
|
14990
|
+
}
|
|
14991
|
+
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
|
|
14992
|
+
}
|
|
14993
|
+
}
|
|
14994
|
+
class DebugDrawItemInterceptorContribution {
|
|
14995
|
+
constructor() {
|
|
14996
|
+
this.order = 1;
|
|
14997
|
+
}
|
|
14998
|
+
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
14999
|
+
return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
15000
|
+
}
|
|
15001
|
+
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15002
|
+
if (!graphic.attribute._debug_bounds) return !1;
|
|
15003
|
+
const {
|
|
15004
|
+
context: context
|
|
15005
|
+
} = drawContext;
|
|
15006
|
+
context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
|
|
15007
|
+
const b = graphic.AABBBounds;
|
|
15008
|
+
return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
|
|
15009
|
+
}
|
|
15010
|
+
}
|
|
15011
|
+
let CommonDrawItemInterceptorContribution = class {
|
|
15012
|
+
constructor() {
|
|
15013
|
+
this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
|
|
15014
|
+
}
|
|
15015
|
+
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15016
|
+
for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
|
|
15017
|
+
return !1;
|
|
15018
|
+
}
|
|
15019
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15020
|
+
if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
|
|
15021
|
+
for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
|
|
15022
|
+
return !1;
|
|
15023
|
+
}
|
|
15024
|
+
};
|
|
15025
|
+
CommonDrawItemInterceptorContribution = __decorate$Y([injectable(), __metadata$H("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
|
|
15026
|
+
class InteractiveDrawItemInterceptorContribution {
|
|
15027
|
+
constructor() {
|
|
15028
|
+
this.order = 1;
|
|
15029
|
+
}
|
|
15030
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15031
|
+
return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
|
|
15032
|
+
}
|
|
15033
|
+
beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
15034
|
+
let interactiveGraphic = graphic.interactiveGraphic;
|
|
15035
|
+
if (graphic.attribute.globalZIndex) {
|
|
15036
|
+
interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
|
|
15037
|
+
globalZIndex: 0,
|
|
15038
|
+
zIndex: graphic.attribute.globalZIndex
|
|
15039
|
+
}, !1, {
|
|
15040
|
+
skipUpdateCallback: !0
|
|
15041
|
+
}), drawContext.stage.tryInitInteractiveLayer();
|
|
15042
|
+
const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
15043
|
+
if (interactiveLayer) {
|
|
15044
|
+
this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
|
|
15045
|
+
}
|
|
15046
|
+
return !0;
|
|
15047
|
+
}
|
|
15048
|
+
if (interactiveGraphic) {
|
|
15049
|
+
drawContext.stage.tryInitInteractiveLayer();
|
|
15050
|
+
const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
15051
|
+
if (interactiveLayer) {
|
|
15052
|
+
this.getShadowRoot(interactiveLayer).removeChild(interactiveGraphic);
|
|
15053
|
+
}
|
|
15054
|
+
graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
|
|
15055
|
+
}
|
|
15056
|
+
return !1;
|
|
15057
|
+
}
|
|
15058
|
+
beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
15059
|
+
const baseGraphic = graphic.baseGraphic;
|
|
15060
|
+
if (baseGraphic) {
|
|
15061
|
+
this.processing = !0;
|
|
15062
|
+
const {
|
|
15063
|
+
context: context
|
|
15064
|
+
} = drawContext;
|
|
15065
|
+
return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
|
|
15066
|
+
}
|
|
15067
|
+
return !1;
|
|
15068
|
+
}
|
|
15069
|
+
getShadowRoot(interactiveLayer) {
|
|
15070
|
+
var _a;
|
|
15071
|
+
let group = interactiveLayer.getElementById("_interactive_group");
|
|
15072
|
+
return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
|
|
15073
|
+
}
|
|
15074
|
+
}
|
|
15075
|
+
class Canvas3DDrawItemInterceptor {
|
|
15076
|
+
constructor() {
|
|
15077
|
+
this.order = 1;
|
|
15078
|
+
}
|
|
15079
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15080
|
+
if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
|
|
15081
|
+
drawContext.in3dInterceptor = !0;
|
|
15082
|
+
const {
|
|
15083
|
+
context: context,
|
|
15084
|
+
stage: stage
|
|
15085
|
+
} = renderService.drawParams;
|
|
15086
|
+
context.canvas;
|
|
15087
|
+
context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
|
|
15088
|
+
const m = context.currentMatrix;
|
|
15089
|
+
m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
|
|
15090
|
+
const matrix = mat4Allocate.allocate();
|
|
15091
|
+
mat3Tomat4(matrix, m);
|
|
15092
|
+
const lastModelMatrix = context.modelMatrix;
|
|
15093
|
+
if (lastModelMatrix) {
|
|
15094
|
+
if (matrix) {
|
|
15095
|
+
const m = mat4Allocate.allocate();
|
|
15096
|
+
context.modelMatrix = multiplyMat4Mat4(m, lastModelMatrix, matrix);
|
|
15097
|
+
}
|
|
15098
|
+
} else context.modelMatrix = matrix;
|
|
15099
|
+
if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
|
|
15100
|
+
let isPie = !1,
|
|
15101
|
+
is3d = !1;
|
|
15102
|
+
if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
|
|
15103
|
+
const children = graphic.getChildren(),
|
|
15104
|
+
sortedChildren = [...children];
|
|
15105
|
+
sortedChildren.sort((a, b) => {
|
|
15106
|
+
var _a, _b, _c, _d;
|
|
15107
|
+
let angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
|
|
15108
|
+
angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
|
|
15109
|
+
for (; angle1 < 0;) angle1 += pi2;
|
|
15110
|
+
for (; angle2 < 0;) angle2 += pi2;
|
|
15111
|
+
return angle2 - angle1;
|
|
15112
|
+
}), sortedChildren.forEach(c => {
|
|
15113
|
+
c._next = null, c._prev = null;
|
|
15114
|
+
}), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
|
|
15115
|
+
graphic.appendChild(c);
|
|
15116
|
+
});
|
|
15117
|
+
const m = graphic.parent.globalTransMatrix;
|
|
15118
|
+
drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, m), graphic.removeAllChild(), children.forEach(c => {
|
|
15119
|
+
c._next = null, c._prev = null;
|
|
15120
|
+
}), children.forEach(c => {
|
|
15121
|
+
graphic.appendChild(c);
|
|
15122
|
+
});
|
|
15123
|
+
} else if (is3d) {
|
|
15124
|
+
const children = graphic.getChildren(),
|
|
15125
|
+
zChildren = children.map(g => ({
|
|
15126
|
+
ave_z: g.findFace().vertices.map(v => {
|
|
15127
|
+
var _a;
|
|
15128
|
+
return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
|
|
15129
|
+
}).reduce((a, b) => a + b, 0),
|
|
15130
|
+
g: g
|
|
15131
|
+
}));
|
|
15132
|
+
zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
|
|
15133
|
+
i.g._next = null, i.g._prev = null;
|
|
15134
|
+
}), graphic.update(), zChildren.forEach(i => {
|
|
15135
|
+
graphic.add(i.g);
|
|
15136
|
+
}), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), children.forEach(g => {
|
|
15137
|
+
g._next = null, g._prev = null;
|
|
15138
|
+
}), graphic.update(), children.forEach(g => {
|
|
15139
|
+
graphic.add(g);
|
|
15140
|
+
});
|
|
15141
|
+
} else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
|
|
15142
|
+
} else drawContribution.renderItem(graphic, drawContext);
|
|
15143
|
+
return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
|
|
15144
|
+
}
|
|
15145
|
+
initCanvasCtx(context) {
|
|
15146
|
+
context.setTransformForCurrent();
|
|
15147
|
+
}
|
|
15148
|
+
}
|
|
15149
|
+
|
|
15150
|
+
var __decorate$X = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15151
|
+
var d,
|
|
15152
|
+
c = arguments.length,
|
|
15153
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
15154
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
15155
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15156
|
+
},
|
|
15157
|
+
__metadata$G = undefined && undefined.__metadata || function (k, v) {
|
|
15158
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
14674
15159
|
},
|
|
14675
15160
|
__param$u = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
14676
15161
|
return function (target, key) {
|
|
@@ -14709,7 +15194,7 @@
|
|
|
14709
15194
|
this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params);
|
|
14710
15195
|
}
|
|
14711
15196
|
};
|
|
14712
|
-
DefaultRenderService = __decorate$
|
|
15197
|
+
DefaultRenderService = __decorate$X([injectable(), __param$u(0, inject(DrawContribution)), __metadata$G("design:paramtypes", [Object])], DefaultRenderService);
|
|
14713
15198
|
|
|
14714
15199
|
var renderModule$1 = new ContainerModule(bind => {
|
|
14715
15200
|
bind(RenderService).to(DefaultRenderService).inSingletonScope();
|
|
@@ -14718,7 +15203,7 @@
|
|
|
14718
15203
|
const PickerService = Symbol.for("PickerService");
|
|
14719
15204
|
const GlobalPickerService = Symbol.for("GlobalPickerService");
|
|
14720
15205
|
|
|
14721
|
-
var __decorate$
|
|
15206
|
+
var __decorate$W = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14722
15207
|
var d,
|
|
14723
15208
|
c = arguments.length,
|
|
14724
15209
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14751,7 +15236,7 @@
|
|
|
14751
15236
|
return context.highPerformanceRestore(), result;
|
|
14752
15237
|
}
|
|
14753
15238
|
};
|
|
14754
|
-
ShadowRootPickItemInterceptorContribution = __decorate$
|
|
15239
|
+
ShadowRootPickItemInterceptorContribution = __decorate$W([injectable()], ShadowRootPickItemInterceptorContribution);
|
|
14755
15240
|
let InteractivePickItemInterceptorContribution = class {
|
|
14756
15241
|
constructor() {
|
|
14757
15242
|
this.order = 1;
|
|
@@ -14770,7 +15255,7 @@
|
|
|
14770
15255
|
return null;
|
|
14771
15256
|
}
|
|
14772
15257
|
};
|
|
14773
|
-
InteractivePickItemInterceptorContribution = __decorate$
|
|
15258
|
+
InteractivePickItemInterceptorContribution = __decorate$W([injectable()], InteractivePickItemInterceptorContribution);
|
|
14774
15259
|
let Canvas3DPickItemInterceptor = class {
|
|
14775
15260
|
constructor() {
|
|
14776
15261
|
this.order = 1;
|
|
@@ -14830,7 +15315,7 @@
|
|
|
14830
15315
|
context.setTransformForCurrent();
|
|
14831
15316
|
}
|
|
14832
15317
|
};
|
|
14833
|
-
Canvas3DPickItemInterceptor = __decorate$
|
|
15318
|
+
Canvas3DPickItemInterceptor = __decorate$W([injectable()], Canvas3DPickItemInterceptor);
|
|
14834
15319
|
|
|
14835
15320
|
var pickModule = new ContainerModule((bind, unbind, isBound) => {
|
|
14836
15321
|
isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor), bind(ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(ShadowRootPickItemInterceptorContribution), bind(InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
|
|
@@ -14843,14 +15328,14 @@
|
|
|
14843
15328
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
14844
15329
|
const PluginService = Symbol.for("PluginService");
|
|
14845
15330
|
|
|
14846
|
-
var __decorate$
|
|
15331
|
+
var __decorate$V = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14847
15332
|
var d,
|
|
14848
15333
|
c = arguments.length,
|
|
14849
15334
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
14850
15335
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
14851
15336
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14852
15337
|
},
|
|
14853
|
-
__metadata$
|
|
15338
|
+
__metadata$F = undefined && undefined.__metadata || function (k, v) {
|
|
14854
15339
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
14855
15340
|
},
|
|
14856
15341
|
__param$t = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
@@ -14893,7 +15378,7 @@
|
|
|
14893
15378
|
}), this.onRegisterPlugin = [];
|
|
14894
15379
|
}
|
|
14895
15380
|
};
|
|
14896
|
-
DefaultPluginService = __decorate$
|
|
15381
|
+
DefaultPluginService = __decorate$V([injectable(), __param$t(0, inject(ContributionProvider)), __param$t(0, named(AutoEnablePlugins)), __metadata$F("design:paramtypes", [Object])], DefaultPluginService);
|
|
14897
15382
|
|
|
14898
15383
|
var pluginModule = new ContainerModule(bind => {
|
|
14899
15384
|
bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
|
|
@@ -14907,14 +15392,14 @@
|
|
|
14907
15392
|
bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
|
|
14908
15393
|
});
|
|
14909
15394
|
|
|
14910
|
-
var __decorate$
|
|
15395
|
+
var __decorate$U = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14911
15396
|
var d,
|
|
14912
15397
|
c = arguments.length,
|
|
14913
15398
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
14914
15399
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
14915
15400
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14916
15401
|
},
|
|
14917
|
-
__metadata$
|
|
15402
|
+
__metadata$E = undefined && undefined.__metadata || function (k, v) {
|
|
14918
15403
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
14919
15404
|
};
|
|
14920
15405
|
let CanvasLayerHandlerContribution = class {
|
|
@@ -14984,16 +15469,16 @@
|
|
|
14984
15469
|
this.canvas.release();
|
|
14985
15470
|
}
|
|
14986
15471
|
};
|
|
14987
|
-
CanvasLayerHandlerContribution = __decorate$
|
|
15472
|
+
CanvasLayerHandlerContribution = __decorate$U([injectable(), __metadata$E("design:paramtypes", [])], CanvasLayerHandlerContribution);
|
|
14988
15473
|
|
|
14989
|
-
var __decorate$
|
|
15474
|
+
var __decorate$T = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14990
15475
|
var d,
|
|
14991
15476
|
c = arguments.length,
|
|
14992
15477
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
14993
15478
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
14994
15479
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14995
15480
|
},
|
|
14996
|
-
__metadata$
|
|
15481
|
+
__metadata$D = undefined && undefined.__metadata || function (k, v) {
|
|
14997
15482
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
14998
15483
|
};
|
|
14999
15484
|
let EmptyLayerHandlerContribution = class {
|
|
@@ -15028,16 +15513,16 @@
|
|
|
15028
15513
|
}
|
|
15029
15514
|
release() {}
|
|
15030
15515
|
};
|
|
15031
|
-
EmptyLayerHandlerContribution = __decorate$
|
|
15516
|
+
EmptyLayerHandlerContribution = __decorate$T([injectable(), __metadata$D("design:paramtypes", [])], EmptyLayerHandlerContribution);
|
|
15032
15517
|
|
|
15033
|
-
var __decorate$
|
|
15518
|
+
var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15034
15519
|
var d,
|
|
15035
15520
|
c = arguments.length,
|
|
15036
15521
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
15037
15522
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
15038
15523
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15039
15524
|
},
|
|
15040
|
-
__metadata$
|
|
15525
|
+
__metadata$C = undefined && undefined.__metadata || function (k, v) {
|
|
15041
15526
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
15042
15527
|
};
|
|
15043
15528
|
let OffscreenLayerHandlerContribution = class {
|
|
@@ -15099,7 +15584,7 @@
|
|
|
15099
15584
|
}
|
|
15100
15585
|
merge(layerHandlers) {}
|
|
15101
15586
|
};
|
|
15102
|
-
OffscreenLayerHandlerContribution = __decorate$
|
|
15587
|
+
OffscreenLayerHandlerContribution = __decorate$S([injectable(), __metadata$C("design:paramtypes", [])], OffscreenLayerHandlerContribution);
|
|
15103
15588
|
|
|
15104
15589
|
var layerHandlerModules = new ContainerModule(bind => {
|
|
15105
15590
|
bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
|
|
@@ -15215,197 +15700,6 @@
|
|
|
15215
15700
|
return result;
|
|
15216
15701
|
}
|
|
15217
15702
|
|
|
15218
|
-
var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15219
|
-
var d,
|
|
15220
|
-
c = arguments.length,
|
|
15221
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
15222
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
15223
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15224
|
-
},
|
|
15225
|
-
__metadata$C = undefined && undefined.__metadata || function (k, v) {
|
|
15226
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
15227
|
-
};
|
|
15228
|
-
const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
|
|
15229
|
-
const tempDirtyBounds = new AABBBounds();
|
|
15230
|
-
class ShadowRootDrawItemInterceptorContribution {
|
|
15231
|
-
constructor() {
|
|
15232
|
-
this.order = 1;
|
|
15233
|
-
}
|
|
15234
|
-
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15235
|
-
return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
15236
|
-
}
|
|
15237
|
-
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15238
|
-
return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
15239
|
-
}
|
|
15240
|
-
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15241
|
-
if (!graphic.shadowRoot) return !1;
|
|
15242
|
-
const {
|
|
15243
|
-
context: context
|
|
15244
|
-
} = drawContext;
|
|
15245
|
-
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
15246
|
-
tempDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
15247
|
-
const m = graphic.globalTransMatrix.getInverse();
|
|
15248
|
-
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
|
|
15249
|
-
}
|
|
15250
|
-
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
|
|
15251
|
-
}
|
|
15252
|
-
}
|
|
15253
|
-
class DebugDrawItemInterceptorContribution {
|
|
15254
|
-
constructor() {
|
|
15255
|
-
this.order = 1;
|
|
15256
|
-
}
|
|
15257
|
-
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15258
|
-
return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
15259
|
-
}
|
|
15260
|
-
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15261
|
-
if (!graphic.attribute._debug_bounds) return !1;
|
|
15262
|
-
const {
|
|
15263
|
-
context: context
|
|
15264
|
-
} = drawContext;
|
|
15265
|
-
context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
|
|
15266
|
-
const b = graphic.AABBBounds;
|
|
15267
|
-
return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
|
|
15268
|
-
}
|
|
15269
|
-
}
|
|
15270
|
-
let CommonDrawItemInterceptorContribution = class {
|
|
15271
|
-
constructor() {
|
|
15272
|
-
this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
|
|
15273
|
-
}
|
|
15274
|
-
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15275
|
-
for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
|
|
15276
|
-
return !1;
|
|
15277
|
-
}
|
|
15278
|
-
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15279
|
-
if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
|
|
15280
|
-
for (let i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
|
|
15281
|
-
return !1;
|
|
15282
|
-
}
|
|
15283
|
-
};
|
|
15284
|
-
CommonDrawItemInterceptorContribution = __decorate$S([injectable(), __metadata$C("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
|
|
15285
|
-
class InteractiveDrawItemInterceptorContribution {
|
|
15286
|
-
constructor() {
|
|
15287
|
-
this.order = 1;
|
|
15288
|
-
}
|
|
15289
|
-
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15290
|
-
return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
|
|
15291
|
-
}
|
|
15292
|
-
beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
15293
|
-
let interactiveGraphic = graphic.interactiveGraphic;
|
|
15294
|
-
if (graphic.attribute.globalZIndex) {
|
|
15295
|
-
interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
|
|
15296
|
-
globalZIndex: 0,
|
|
15297
|
-
zIndex: graphic.attribute.globalZIndex
|
|
15298
|
-
}, !1, {
|
|
15299
|
-
skipUpdateCallback: !0
|
|
15300
|
-
}), drawContext.stage.tryInitInteractiveLayer();
|
|
15301
|
-
const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
15302
|
-
if (interactiveLayer) {
|
|
15303
|
-
this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
|
|
15304
|
-
}
|
|
15305
|
-
return !0;
|
|
15306
|
-
}
|
|
15307
|
-
if (interactiveGraphic) {
|
|
15308
|
-
drawContext.stage.tryInitInteractiveLayer();
|
|
15309
|
-
const interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
15310
|
-
if (interactiveLayer) {
|
|
15311
|
-
this.getShadowRoot(interactiveLayer).removeChild(interactiveGraphic);
|
|
15312
|
-
}
|
|
15313
|
-
graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
|
|
15314
|
-
}
|
|
15315
|
-
return !1;
|
|
15316
|
-
}
|
|
15317
|
-
beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
15318
|
-
const baseGraphic = graphic.baseGraphic;
|
|
15319
|
-
if (baseGraphic) {
|
|
15320
|
-
this.processing = !0;
|
|
15321
|
-
const {
|
|
15322
|
-
context: context
|
|
15323
|
-
} = drawContext;
|
|
15324
|
-
return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
|
|
15325
|
-
}
|
|
15326
|
-
return !1;
|
|
15327
|
-
}
|
|
15328
|
-
getShadowRoot(interactiveLayer) {
|
|
15329
|
-
var _a;
|
|
15330
|
-
let group = interactiveLayer.getElementById("_interactive_group");
|
|
15331
|
-
return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
|
|
15332
|
-
}
|
|
15333
|
-
}
|
|
15334
|
-
class Canvas3DDrawItemInterceptor {
|
|
15335
|
-
constructor() {
|
|
15336
|
-
this.order = 1;
|
|
15337
|
-
}
|
|
15338
|
-
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
15339
|
-
if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
|
|
15340
|
-
drawContext.in3dInterceptor = !0;
|
|
15341
|
-
const {
|
|
15342
|
-
context: context,
|
|
15343
|
-
stage: stage
|
|
15344
|
-
} = renderService.drawParams;
|
|
15345
|
-
context.canvas;
|
|
15346
|
-
context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
|
|
15347
|
-
const m = context.currentMatrix;
|
|
15348
|
-
m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
|
|
15349
|
-
const matrix = mat4Allocate.allocate();
|
|
15350
|
-
mat3Tomat4(matrix, m);
|
|
15351
|
-
const lastModelMatrix = context.modelMatrix;
|
|
15352
|
-
if (lastModelMatrix) {
|
|
15353
|
-
if (matrix) {
|
|
15354
|
-
const m = mat4Allocate.allocate();
|
|
15355
|
-
context.modelMatrix = multiplyMat4Mat4(m, lastModelMatrix, matrix);
|
|
15356
|
-
}
|
|
15357
|
-
} else context.modelMatrix = matrix;
|
|
15358
|
-
if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
|
|
15359
|
-
let isPie = !1,
|
|
15360
|
-
is3d = !1;
|
|
15361
|
-
if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
|
|
15362
|
-
const children = graphic.getChildren(),
|
|
15363
|
-
sortedChildren = [...children];
|
|
15364
|
-
sortedChildren.sort((a, b) => {
|
|
15365
|
-
var _a, _b, _c, _d;
|
|
15366
|
-
let angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
|
|
15367
|
-
angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
|
|
15368
|
-
for (; angle1 < 0;) angle1 += pi2;
|
|
15369
|
-
for (; angle2 < 0;) angle2 += pi2;
|
|
15370
|
-
return angle2 - angle1;
|
|
15371
|
-
}), sortedChildren.forEach(c => {
|
|
15372
|
-
c._next = null, c._prev = null;
|
|
15373
|
-
}), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
|
|
15374
|
-
graphic.appendChild(c);
|
|
15375
|
-
});
|
|
15376
|
-
const m = graphic.parent.globalTransMatrix;
|
|
15377
|
-
drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, m), graphic.removeAllChild(), children.forEach(c => {
|
|
15378
|
-
c._next = null, c._prev = null;
|
|
15379
|
-
}), children.forEach(c => {
|
|
15380
|
-
graphic.appendChild(c);
|
|
15381
|
-
});
|
|
15382
|
-
} else if (is3d) {
|
|
15383
|
-
const children = graphic.getChildren(),
|
|
15384
|
-
zChildren = children.map(g => ({
|
|
15385
|
-
ave_z: g.findFace().vertices.map(v => {
|
|
15386
|
-
var _a;
|
|
15387
|
-
return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
|
|
15388
|
-
}).reduce((a, b) => a + b, 0),
|
|
15389
|
-
g: g
|
|
15390
|
-
}));
|
|
15391
|
-
zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
|
|
15392
|
-
i.g._next = null, i.g._prev = null;
|
|
15393
|
-
}), graphic.update(), zChildren.forEach(i => {
|
|
15394
|
-
graphic.add(i.g);
|
|
15395
|
-
}), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), children.forEach(g => {
|
|
15396
|
-
g._next = null, g._prev = null;
|
|
15397
|
-
}), graphic.update(), children.forEach(g => {
|
|
15398
|
-
graphic.add(g);
|
|
15399
|
-
});
|
|
15400
|
-
} else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
|
|
15401
|
-
} else drawContribution.renderItem(graphic, drawContext);
|
|
15402
|
-
return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
|
|
15403
|
-
}
|
|
15404
|
-
initCanvasCtx(context) {
|
|
15405
|
-
context.setTransformForCurrent();
|
|
15406
|
-
}
|
|
15407
|
-
}
|
|
15408
|
-
|
|
15409
15703
|
var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15410
15704
|
var d,
|
|
15411
15705
|
c = arguments.length,
|
|
@@ -15455,7 +15749,7 @@
|
|
|
15455
15749
|
const d = context.dpr % 1;
|
|
15456
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), context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
|
|
15457
15751
|
const drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
|
|
15458
|
-
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.
|
|
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.clear(), this.backupDirtyBounds.clear()), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort((a, b) => {
|
|
15459
15753
|
var _a, _b;
|
|
15460
15754
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
15461
15755
|
}).forEach(group => {
|
|
@@ -15513,7 +15807,7 @@
|
|
|
15513
15807
|
}, subLayers.set(group._uid, incrementalLayer));
|
|
15514
15808
|
const incrementalContext = incrementalLayer.layer.getNativeHandler().getContext(),
|
|
15515
15809
|
idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);
|
|
15516
|
-
idc.dirtyBounds.
|
|
15810
|
+
idc.dirtyBounds.clear(), idc.backupDirtyBounds.clear(), idc.draw(this.currentRenderService, Object.assign(Object.assign({}, drawContext), {
|
|
15517
15811
|
drawContribution: idc,
|
|
15518
15812
|
clear: "transparent",
|
|
15519
15813
|
layer: incrementalLayer.layer,
|
|
@@ -15951,11 +16245,10 @@
|
|
|
15951
16245
|
container.load(renderModule);
|
|
15952
16246
|
}
|
|
15953
16247
|
|
|
15954
|
-
let loaded$l = !1;
|
|
15955
16248
|
function preLoadAllModule() {
|
|
15956
|
-
|
|
16249
|
+
preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$1(container), load(container));
|
|
15957
16250
|
}
|
|
15958
|
-
preLoadAllModule();
|
|
16251
|
+
preLoadAllModule.__loaded = !1, preLoadAllModule();
|
|
15959
16252
|
const vglobal = container.get(VGlobal);
|
|
15960
16253
|
application.global = vglobal;
|
|
15961
16254
|
const graphicUtil = container.get(GraphicUtil);
|
|
@@ -16113,7 +16406,7 @@
|
|
|
16113
16406
|
wrapGroup: wrapGroup
|
|
16114
16407
|
} = _ref;
|
|
16115
16408
|
application.global.removeDom(wrapGroup);
|
|
16116
|
-
}),
|
|
16409
|
+
}), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
|
|
16117
16410
|
const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
|
|
16118
16411
|
nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
|
|
16119
16412
|
const wrapGroup = application.global.createDom({
|
|
@@ -18964,10 +19257,11 @@
|
|
|
18964
19257
|
};
|
|
18965
19258
|
DefaultCanvasGroupPicker = __decorate$A([injectable()], DefaultCanvasGroupPicker);
|
|
18966
19259
|
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
loaded$k || (loaded$k = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
|
|
19260
|
+
const m = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
19261
|
+
m.__vloaded || (m.__vloaded = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
|
|
18970
19262
|
});
|
|
19263
|
+
m.__vloaded = !1;
|
|
19264
|
+
var canvasModule = m;
|
|
18971
19265
|
|
|
18972
19266
|
const canvasPickerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
18973
19267
|
isBound(DefaultCanvasPickerService) || bind(DefaultCanvasPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultCanvasPickerService) : bind(PickerService).toService(DefaultCanvasPickerService);
|
|
@@ -19227,7 +19521,7 @@
|
|
|
19227
19521
|
}
|
|
19228
19522
|
getNativeAABBBounds(_dom) {
|
|
19229
19523
|
let dom = _dom;
|
|
19230
|
-
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
|
|
19524
|
+
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild, dom.lastChild && (dom = dom.lastChild.firstChild)), dom.getBoundingClientRect) {
|
|
19231
19525
|
const b = dom.getBoundingClientRect();
|
|
19232
19526
|
return new DynamicB(b);
|
|
19233
19527
|
}
|
|
@@ -19340,15 +19634,15 @@
|
|
|
19340
19634
|
};
|
|
19341
19635
|
BrowserEnvContribution = __decorate$y([injectable(), __metadata$q("design:paramtypes", [])], BrowserEnvContribution);
|
|
19342
19636
|
|
|
19343
|
-
let isBrowserBound = !1;
|
|
19344
19637
|
const browserEnvModule = new ContainerModule(bind => {
|
|
19345
|
-
isBrowserBound || (isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
|
|
19638
|
+
browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
|
|
19346
19639
|
});
|
|
19347
|
-
|
|
19640
|
+
browserEnvModule.isBrowserBound = !1;
|
|
19348
19641
|
function loadBrowserEnv(container) {
|
|
19349
19642
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
19350
|
-
|
|
19643
|
+
loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
|
|
19351
19644
|
}
|
|
19645
|
+
loadBrowserEnv.__loaded = !1;
|
|
19352
19646
|
|
|
19353
19647
|
var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
19354
19648
|
var d,
|
|
@@ -19590,14 +19884,14 @@
|
|
|
19590
19884
|
};
|
|
19591
19885
|
NodeEnvContribution = __decorate$u([injectable()], NodeEnvContribution);
|
|
19592
19886
|
|
|
19593
|
-
let isNodeBound = !1;
|
|
19594
19887
|
const nodeEnvModule = new ContainerModule(bind => {
|
|
19595
|
-
isNodeBound || (isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
|
|
19888
|
+
nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
|
|
19596
19889
|
});
|
|
19597
|
-
|
|
19890
|
+
nodeEnvModule.isNodeBound = !1;
|
|
19598
19891
|
function loadNodeEnv(container) {
|
|
19599
|
-
|
|
19892
|
+
loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
|
|
19600
19893
|
}
|
|
19894
|
+
loadNodeEnv.__loaded = !1;
|
|
19601
19895
|
|
|
19602
19896
|
var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
19603
19897
|
var d,
|
|
@@ -20905,95 +21199,113 @@
|
|
|
20905
21199
|
|
|
20906
21200
|
const browser$1 = isBrowserEnv();
|
|
20907
21201
|
|
|
20908
|
-
|
|
20909
|
-
|
|
20910
|
-
loaded$h || (loaded$h = !0, registerArcGraphic(), container.load(arcModule), container.load(browser$1 ? arcCanvasPickModule : arcMathPickModule));
|
|
21202
|
+
function _registerArc() {
|
|
21203
|
+
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser$1 ? arcCanvasPickModule : arcMathPickModule));
|
|
20911
21204
|
}
|
|
21205
|
+
_registerArc.__loaded = !1;
|
|
21206
|
+
const registerArc = _registerArc;
|
|
20912
21207
|
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
loaded$g || (loaded$g = !0, registerArc3dGraphic(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
21208
|
+
function _registerArc3d() {
|
|
21209
|
+
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
20916
21210
|
}
|
|
21211
|
+
_registerArc3d.__loaded = !1;
|
|
21212
|
+
const registerArc3d = _registerArc3d;
|
|
20917
21213
|
|
|
20918
|
-
|
|
20919
|
-
|
|
20920
|
-
loaded$f || (loaded$f = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser$1 ? areaCanvasPickModule : areaMathPickModule));
|
|
21214
|
+
function _registerArea() {
|
|
21215
|
+
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser$1 ? areaCanvasPickModule : areaMathPickModule));
|
|
20921
21216
|
}
|
|
21217
|
+
_registerArea.__loaded = !1;
|
|
21218
|
+
const registerArea = _registerArea;
|
|
20922
21219
|
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
loaded$e || (loaded$e = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser$1 ? circleCanvasPickModule : circleMathPickModule));
|
|
21220
|
+
function _registerCircle() {
|
|
21221
|
+
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser$1 ? circleCanvasPickModule : circleMathPickModule));
|
|
20926
21222
|
}
|
|
21223
|
+
_registerCircle.__loaded = !1;
|
|
21224
|
+
const registerCircle = _registerCircle;
|
|
20927
21225
|
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
loaded$d || (loaded$d = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser$1 ? glyphCanvasPickModule : glyphMathPickModule));
|
|
21226
|
+
function _registerGlyph() {
|
|
21227
|
+
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser$1 ? glyphCanvasPickModule : glyphMathPickModule));
|
|
20931
21228
|
}
|
|
21229
|
+
_registerGlyph.__loaded = !1;
|
|
21230
|
+
const registerGlyph = _registerGlyph;
|
|
20932
21231
|
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
loaded$c || (loaded$c = !0, registerGroupGraphic());
|
|
21232
|
+
function _registerGroup() {
|
|
21233
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
20936
21234
|
}
|
|
21235
|
+
_registerGroup.__loaded = !1;
|
|
21236
|
+
const registerGroup = _registerGroup;
|
|
20937
21237
|
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
loaded$b || (loaded$b = !0, registerImageGraphic(), container.load(imageModule), container.load(browser$1 ? imageCanvasPickModule : imageMathPickModule));
|
|
21238
|
+
function _registerImage() {
|
|
21239
|
+
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser$1 ? imageCanvasPickModule : imageMathPickModule));
|
|
20941
21240
|
}
|
|
21241
|
+
_registerImage.__loaded = !1;
|
|
21242
|
+
const registerImage = _registerImage;
|
|
20942
21243
|
|
|
20943
|
-
|
|
20944
|
-
|
|
20945
|
-
loaded$a || (loaded$a = !0, registerLineGraphic(), container.load(lineModule), container.load(browser$1 ? lineCanvasPickModule : lineMathPickModule));
|
|
21244
|
+
function _registerLine() {
|
|
21245
|
+
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser$1 ? lineCanvasPickModule : lineMathPickModule));
|
|
20946
21246
|
}
|
|
21247
|
+
_registerLine.__loaded = !1;
|
|
21248
|
+
const registerLine = _registerLine;
|
|
20947
21249
|
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
loaded$9 || (loaded$9 = !0, registerPathGraphic(), container.load(pathModule), container.load(browser$1 ? pathCanvasPickModule : pathMathPickModule));
|
|
21250
|
+
function _registerPath() {
|
|
21251
|
+
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser$1 ? pathCanvasPickModule : pathMathPickModule));
|
|
20951
21252
|
}
|
|
21253
|
+
_registerPath.__loaded = !1;
|
|
21254
|
+
const registerPath = _registerPath;
|
|
20952
21255
|
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
loaded$8 || (loaded$8 = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser$1 ? polygonCanvasPickModule : polygonMathPickModule));
|
|
21256
|
+
function _registerPolygon() {
|
|
21257
|
+
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser$1 ? polygonCanvasPickModule : polygonMathPickModule));
|
|
20956
21258
|
}
|
|
21259
|
+
_registerPolygon.__loaded = !1;
|
|
21260
|
+
const registerPolygon = _registerPolygon;
|
|
20957
21261
|
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
loaded$7 || (loaded$7 = !0, registerPyramid3dGraphic(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
21262
|
+
function _registerPyramid3d() {
|
|
21263
|
+
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
20961
21264
|
}
|
|
21265
|
+
_registerPyramid3d.__loaded = !1;
|
|
21266
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
20962
21267
|
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
loaded$6 || (loaded$6 = !0, registerRectGraphic(), container.load(rectModule), container.load(browser$1 ? rectCanvasPickModule : rectMathPickModule));
|
|
21268
|
+
function _registerRect() {
|
|
21269
|
+
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser$1 ? rectCanvasPickModule : rectMathPickModule));
|
|
20966
21270
|
}
|
|
21271
|
+
_registerRect.__loaded = !1;
|
|
21272
|
+
const registerRect = _registerRect;
|
|
20967
21273
|
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
loaded$5 || (loaded$5 = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
21274
|
+
function _registerRect3d() {
|
|
21275
|
+
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
20971
21276
|
}
|
|
21277
|
+
_registerRect3d.__loaded = !1;
|
|
21278
|
+
const registerRect3d = _registerRect3d;
|
|
20972
21279
|
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
loaded$4 || (loaded$4 = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser$1 ? richtextCanvasPickModule : richTextMathPickModule));
|
|
21280
|
+
function _registerRichtext() {
|
|
21281
|
+
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser$1 ? richtextCanvasPickModule : richTextMathPickModule));
|
|
20976
21282
|
}
|
|
21283
|
+
_registerRichtext.__loaded = !1;
|
|
21284
|
+
const registerRichtext = _registerRichtext;
|
|
20977
21285
|
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
loaded$3 || (loaded$3 = !0, registerShadowRootGraphic());
|
|
21286
|
+
function _registerShadowRoot() {
|
|
21287
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
20981
21288
|
}
|
|
21289
|
+
_registerShadowRoot.__loaded = !1;
|
|
21290
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
20982
21291
|
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
loaded$2 || (loaded$2 = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser$1 ? symbolCanvasPickModule : symbolMathPickModule));
|
|
21292
|
+
function _registerSymbol() {
|
|
21293
|
+
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser$1 ? symbolCanvasPickModule : symbolMathPickModule));
|
|
20986
21294
|
}
|
|
21295
|
+
_registerSymbol.__loaded = !1;
|
|
21296
|
+
const registerSymbol = _registerSymbol;
|
|
20987
21297
|
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
loaded$1 || (loaded$1 = !0, registerTextGraphic(), container.load(textModule), container.load(browser$1 ? textCanvasPickModule : textMathPickModule));
|
|
21298
|
+
function _registerText() {
|
|
21299
|
+
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser$1 ? textCanvasPickModule : textMathPickModule));
|
|
20991
21300
|
}
|
|
21301
|
+
_registerText.__loaded = !1;
|
|
21302
|
+
const registerText = _registerText;
|
|
20992
21303
|
|
|
20993
|
-
|
|
20994
|
-
|
|
20995
|
-
loaded || (loaded = !0, registerWrapTextGraphic());
|
|
21304
|
+
function _registerWrapText() {
|
|
21305
|
+
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
20996
21306
|
}
|
|
21307
|
+
_registerWrapText.__loaded = !1;
|
|
21308
|
+
const registerWrapText = _registerWrapText;
|
|
20997
21309
|
|
|
20998
21310
|
let registed = false;
|
|
20999
21311
|
function registerForVrender() {
|
|
@@ -28635,7 +28947,7 @@
|
|
|
28635
28947
|
}, textStyle);
|
|
28636
28948
|
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
28637
28949
|
} else isValid$1(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
28638
|
-
text: [text]
|
|
28950
|
+
text: isArray$1(text) ? text : [text]
|
|
28639
28951
|
}, textStyle), {
|
|
28640
28952
|
maxLineWidth: null !== (_t = textStyle.maxLineWidth) && void 0 !== _t ? _t : width,
|
|
28641
28953
|
heightLimit: textStyle.heightLimit,
|
|
@@ -28676,7 +28988,7 @@
|
|
|
28676
28988
|
}, subtextStyle);
|
|
28677
28989
|
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
28678
28990
|
} else isValid$1(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
28679
|
-
text: [subtext]
|
|
28991
|
+
text: isArray$1(subtext) ? subtext : [subtext]
|
|
28680
28992
|
}, subtextStyle), {
|
|
28681
28993
|
maxLineWidth: null !== (_12 = subtextStyle.maxLineWidth) && void 0 !== _12 ? _12 : width,
|
|
28682
28994
|
heightLimit: subtextStyle.heightLimit,
|
|
@@ -36208,7 +36520,7 @@
|
|
|
36208
36520
|
}
|
|
36209
36521
|
titleWidth += attribute.title.space ?? 4;
|
|
36210
36522
|
}
|
|
36211
|
-
return tickWidth + labelWidth + titleWidth +
|
|
36523
|
+
return tickWidth + labelWidth + titleWidth + 1;
|
|
36212
36524
|
}
|
|
36213
36525
|
function computeAxisComponentHeight(config, table) {
|
|
36214
36526
|
const attribute = merge({}, commonAxis, config);
|
|
@@ -36280,7 +36592,7 @@
|
|
|
36280
36592
|
}
|
|
36281
36593
|
titleHeight += attribute.title.space ?? 4;
|
|
36282
36594
|
}
|
|
36283
|
-
return tickHeight + labelHeight + titleHeight +
|
|
36595
|
+
return tickHeight + labelHeight + titleHeight + 1;
|
|
36284
36596
|
}
|
|
36285
36597
|
function formatDecimal(number) {
|
|
36286
36598
|
if (typeof number !== 'number') {
|
|
@@ -37818,6 +38130,21 @@
|
|
|
37818
38130
|
this.columnMoverBack.setAttribute('y', backY);
|
|
37819
38131
|
}
|
|
37820
38132
|
}
|
|
38133
|
+
updateStyle() {
|
|
38134
|
+
const columnMoverLineWidth = this.table.theme.dragHeaderSplitLine.lineWidth;
|
|
38135
|
+
const columnMoverLineColor = this.table.theme.dragHeaderSplitLine.lineColor;
|
|
38136
|
+
const columnMoverShadowBlockColor = this.table.theme.dragHeaderSplitLine.shadowBlockColor;
|
|
38137
|
+
this.columnMoverLabel.setAttributes({
|
|
38138
|
+
fill: columnMoverLineColor
|
|
38139
|
+
});
|
|
38140
|
+
this.columnMoverLine.setAttributes({
|
|
38141
|
+
stroke: columnMoverLineColor,
|
|
38142
|
+
lineWidth: columnMoverLineWidth
|
|
38143
|
+
});
|
|
38144
|
+
this.columnMoverBack.setAttributes({
|
|
38145
|
+
fill: columnMoverShadowBlockColor
|
|
38146
|
+
});
|
|
38147
|
+
}
|
|
37821
38148
|
}
|
|
37822
38149
|
|
|
37823
38150
|
function getColX(col, table, isRightFrozen) {
|
|
@@ -38205,6 +38532,78 @@
|
|
|
38205
38532
|
y: bounds.y1
|
|
38206
38533
|
};
|
|
38207
38534
|
}
|
|
38535
|
+
updateStyle() {
|
|
38536
|
+
const theme = this.table.theme;
|
|
38537
|
+
const scrollRailColor = theme.scrollStyle?.scrollRailColor;
|
|
38538
|
+
const scrollSliderColor = theme.scrollStyle?.scrollSliderColor;
|
|
38539
|
+
const width = theme.scrollStyle?.width;
|
|
38540
|
+
this.hScrollBar.setAttributes({
|
|
38541
|
+
height: width,
|
|
38542
|
+
railStyle: {
|
|
38543
|
+
fill: scrollRailColor
|
|
38544
|
+
},
|
|
38545
|
+
sliderStyle: {
|
|
38546
|
+
fill: scrollSliderColor
|
|
38547
|
+
}
|
|
38548
|
+
});
|
|
38549
|
+
this.vScrollBar.setAttributes({
|
|
38550
|
+
width,
|
|
38551
|
+
railStyle: {
|
|
38552
|
+
fill: scrollRailColor
|
|
38553
|
+
},
|
|
38554
|
+
sliderStyle: {
|
|
38555
|
+
fill: scrollSliderColor
|
|
38556
|
+
}
|
|
38557
|
+
});
|
|
38558
|
+
const columnResizeColor = theme.columnResize?.lineColor;
|
|
38559
|
+
const columnResizeWidth = theme.columnResize?.lineWidth;
|
|
38560
|
+
const columnResizeBgColor = theme.columnResize?.bgColor;
|
|
38561
|
+
const columnResizeBgWidth = theme.columnResize?.width;
|
|
38562
|
+
this.columnResizeLine.setAttributes({
|
|
38563
|
+
stroke: columnResizeColor,
|
|
38564
|
+
lineWidth: columnResizeWidth
|
|
38565
|
+
});
|
|
38566
|
+
this.columnResizeBgLine = createLine({
|
|
38567
|
+
stroke: columnResizeBgColor,
|
|
38568
|
+
lineWidth: columnResizeBgWidth
|
|
38569
|
+
});
|
|
38570
|
+
const labelColor = theme.columnResize?.labelColor;
|
|
38571
|
+
const labelFontSize = theme.columnResize?.labelFontSize;
|
|
38572
|
+
const labelFontFamily = theme.columnResize?.labelFontFamily;
|
|
38573
|
+
const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;
|
|
38574
|
+
const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;
|
|
38575
|
+
this.columnResizeLabel.lastChild.setAttributes({
|
|
38576
|
+
fontSize: labelFontSize,
|
|
38577
|
+
fill: labelColor,
|
|
38578
|
+
fontFamily: labelFontFamily,
|
|
38579
|
+
dy: -labelFontSize / 2
|
|
38580
|
+
});
|
|
38581
|
+
this.columnResizeLabel.firstChild.setAttributes({
|
|
38582
|
+
fill: labelBackgroundFill,
|
|
38583
|
+
width: 5 * labelFontSize * 0.8,
|
|
38584
|
+
height: labelFontSize + 8,
|
|
38585
|
+
cornerRadius: labelBackgroundCornerRadius,
|
|
38586
|
+
dy: -labelFontSize / 2 - 4
|
|
38587
|
+
});
|
|
38588
|
+
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
38589
|
+
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
38590
|
+
const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
|
|
38591
|
+
this.frozenShadowLine.setAttributes({
|
|
38592
|
+
width: shadowWidth,
|
|
38593
|
+
fill: {
|
|
38594
|
+
gradient: 'linear',
|
|
38595
|
+
x0: 0,
|
|
38596
|
+
y0: 0,
|
|
38597
|
+
x1: 1,
|
|
38598
|
+
y1: 0,
|
|
38599
|
+
stops: [
|
|
38600
|
+
{ color: shadowStartColor, offset: 0 },
|
|
38601
|
+
{ color: shadowEndColor, offset: 1 }
|
|
38602
|
+
]
|
|
38603
|
+
}
|
|
38604
|
+
});
|
|
38605
|
+
this.cellMover.updateStyle();
|
|
38606
|
+
}
|
|
38208
38607
|
}
|
|
38209
38608
|
|
|
38210
38609
|
function createFrameBorder(group, frameTheme, role, strokeArray, justForXYPosition) {
|
|
@@ -39836,7 +40235,7 @@
|
|
|
39836
40235
|
createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
39837
40236
|
createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', table);
|
|
39838
40237
|
if (table.bottomFrozenRowCount > 0) {
|
|
39839
|
-
createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? 'body' : 'rowHeader', table);
|
|
40238
|
+
createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? (table.transpose ? 'rowHeader' : 'body') : 'rowHeader', table);
|
|
39840
40239
|
distCol - table.rightFrozenColCount >= table.frozenColCount &&
|
|
39841
40240
|
createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
39842
40241
|
}
|
|
@@ -40248,7 +40647,7 @@
|
|
|
40248
40647
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
40249
40648
|
updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
40250
40649
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
40251
|
-
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.
|
|
40650
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.colStart, screenTopRow, true);
|
|
40252
40651
|
const deltaY = screenTopY - (cellGroup.attribute.y + proxy.table.getFrozenRowsHeight() + proxy.table.scenegraph.proxy.deltaY);
|
|
40253
40652
|
proxy.table.scenegraph.proxy.deltaY += deltaY;
|
|
40254
40653
|
}
|
|
@@ -40287,12 +40686,12 @@
|
|
|
40287
40686
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
40288
40687
|
}
|
|
40289
40688
|
if (syncTopRow === proxy.bodyTopRow) {
|
|
40290
|
-
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.
|
|
40689
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.colStart, syncTopRow, true);
|
|
40291
40690
|
const deltaY = cellGroup.attribute.y - y;
|
|
40292
40691
|
proxy.table.scenegraph.proxy.deltaY = deltaY;
|
|
40293
40692
|
}
|
|
40294
40693
|
else if (syncBottomRow === proxy.bodyBottomRow) {
|
|
40295
|
-
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.
|
|
40694
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.colStart, syncBottomRow, true);
|
|
40296
40695
|
const deltaY = cellGroup.attribute.y +
|
|
40297
40696
|
cellGroup.attribute.height -
|
|
40298
40697
|
(proxy.table.tableNoFrameHeight - proxy.table.getFrozenRowsHeight()) -
|
|
@@ -40300,7 +40699,7 @@
|
|
|
40300
40699
|
proxy.table.scenegraph.proxy.deltaY = -deltaY;
|
|
40301
40700
|
}
|
|
40302
40701
|
else {
|
|
40303
|
-
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.
|
|
40702
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.colStart, screenTopRow, true);
|
|
40304
40703
|
const deltaY = screenTopY - (cellGroup.attribute.y + proxy.table.getFrozenRowsHeight() + proxy.table.scenegraph.proxy.deltaY);
|
|
40305
40704
|
proxy.table.scenegraph.proxy.deltaY = deltaY;
|
|
40306
40705
|
}
|
|
@@ -41243,10 +41642,10 @@
|
|
|
41243
41642
|
}
|
|
41244
41643
|
}
|
|
41245
41644
|
function updateCellSelectBorder(scene, newStartCol, newStartRow, newEndCol, newEndRow) {
|
|
41246
|
-
let startCol = Math.min(newEndCol, newStartCol);
|
|
41247
|
-
let startRow = Math.min(newEndRow, newStartRow);
|
|
41248
|
-
let endCol = Math.max(newEndCol, newStartCol);
|
|
41249
|
-
let endRow = Math.max(newEndRow, newStartRow);
|
|
41645
|
+
let startCol = Math.max(Math.min(newEndCol, newStartCol), 0);
|
|
41646
|
+
let startRow = Math.max(Math.min(newEndRow, newStartRow), 0);
|
|
41647
|
+
let endCol = Math.min(Math.max(newEndCol, newStartCol), scene.table.colCount - 1);
|
|
41648
|
+
let endRow = Math.min(Math.max(newEndRow, newStartRow), scene.table.rowCount - 1);
|
|
41250
41649
|
const extendSelectRange = () => {
|
|
41251
41650
|
let isExtend = false;
|
|
41252
41651
|
for (let col = startCol; col <= endCol; col++) {
|
|
@@ -41263,7 +41662,7 @@
|
|
|
41263
41662
|
if (!isExtend && col === endCol) {
|
|
41264
41663
|
for (let row = startRow; row <= endRow; row++) {
|
|
41265
41664
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
41266
|
-
if (mergeInfo && mergeInfo.end.col > endCol) {
|
|
41665
|
+
if (mergeInfo && Math.min(mergeInfo.end.col, scene.table.colCount - 1) > endCol) {
|
|
41267
41666
|
endCol = mergeInfo.end.col;
|
|
41268
41667
|
isExtend = true;
|
|
41269
41668
|
break;
|
|
@@ -41289,7 +41688,7 @@
|
|
|
41289
41688
|
if (!isExtend && row === endRow) {
|
|
41290
41689
|
for (let col = startCol; col <= endCol; col++) {
|
|
41291
41690
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
41292
|
-
if (mergeInfo && mergeInfo.end.row > endRow) {
|
|
41691
|
+
if (mergeInfo && Math.min(mergeInfo.end.row, scene.table.rowCount - 1) > endRow) {
|
|
41293
41692
|
endRow = mergeInfo.end.row;
|
|
41294
41693
|
isExtend = true;
|
|
41295
41694
|
break;
|
|
@@ -43525,6 +43924,9 @@
|
|
|
43525
43924
|
this.selectedRangeComponents = new Map();
|
|
43526
43925
|
this.selectingRangeComponents = new Map();
|
|
43527
43926
|
}
|
|
43927
|
+
updateComponent() {
|
|
43928
|
+
this.component.updateStyle();
|
|
43929
|
+
}
|
|
43528
43930
|
createSceneGraph() {
|
|
43529
43931
|
if (this.table.isPivotChart() || this.table.hasCustomRenderOrLayout()) {
|
|
43530
43932
|
this.stage.pluginService.autoEnablePlugins.getContributions().forEach((p) => {
|
|
@@ -43857,12 +44259,12 @@
|
|
|
43857
44259
|
this.tableGroup.setAttributes({
|
|
43858
44260
|
x: this.table.tableX,
|
|
43859
44261
|
y: this.table.tableY,
|
|
43860
|
-
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) +
|
|
43861
|
-
Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) +
|
|
43862
|
-
this.rightBottomCornerGroup.attribute.width),
|
|
43863
|
-
height: Math.min(this.table.tableNoFrameHeight, Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, 0) +
|
|
43864
|
-
Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, 0) +
|
|
43865
|
-
this.bottomFrozenGroup.attribute.height)
|
|
44262
|
+
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, this.bottomFrozenGroup.attribute.width, 0) +
|
|
44263
|
+
Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, this.leftBottomCornerGroup.attribute.width, 0) +
|
|
44264
|
+
Math.max(this.rightTopCornerGroup.attribute.width, this.rightFrozenGroup.attribute.width, this.rightBottomCornerGroup.attribute.width, 0)),
|
|
44265
|
+
height: Math.min(this.table.tableNoFrameHeight, Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.height, 0) +
|
|
44266
|
+
Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.height, 0) +
|
|
44267
|
+
Math.max(this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.height, 0))
|
|
43866
44268
|
});
|
|
43867
44269
|
if (this.tableGroup.border && this.tableGroup.border.type === 'rect') {
|
|
43868
44270
|
this.tableGroup.border.setAttributes({
|
|
@@ -44002,9 +44404,9 @@
|
|
|
44002
44404
|
return;
|
|
44003
44405
|
}
|
|
44004
44406
|
this.bodyGroup.setAttribute('y', this.colHeaderGroup.attribute.height + y);
|
|
44005
|
-
this.rowHeaderGroup.setAttribute('y', this.
|
|
44407
|
+
this.rowHeaderGroup.setAttribute('y', this.cornerHeaderGroup.attribute.height + y);
|
|
44006
44408
|
if (this.table.rightFrozenColCount > 0) {
|
|
44007
|
-
this.rightFrozenGroup.setAttribute('y', this.
|
|
44409
|
+
this.rightFrozenGroup.setAttribute('y', this.rightTopCornerGroup.attribute.height + y);
|
|
44008
44410
|
}
|
|
44009
44411
|
this.updateNextFrame();
|
|
44010
44412
|
}
|
|
@@ -44088,7 +44490,7 @@
|
|
|
44088
44490
|
});
|
|
44089
44491
|
this.cornerHeaderGroup.setAttribute('width', cornerHeaderWidth);
|
|
44090
44492
|
this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
|
|
44091
|
-
this.rowHeaderGroup.setAttribute('y', this.
|
|
44493
|
+
this.rowHeaderGroup.setAttribute('y', this.cornerHeaderGroup.attribute.height);
|
|
44092
44494
|
this.bodyGroup.setAttributes({
|
|
44093
44495
|
x: this.rowHeaderGroup.attribute.width,
|
|
44094
44496
|
y: this.colHeaderGroup.attribute.height
|
|
@@ -44227,7 +44629,7 @@
|
|
|
44227
44629
|
this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width);
|
|
44228
44630
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width);
|
|
44229
44631
|
this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width);
|
|
44230
|
-
this.bottomFrozenGroup.setDeltaWidth(
|
|
44632
|
+
this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width);
|
|
44231
44633
|
this.rightFrozenGroup.setDeltaWidth(rightX - this.table.getRightFrozenColsWidth());
|
|
44232
44634
|
this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width);
|
|
44233
44635
|
this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width);
|
|
@@ -46832,6 +47234,7 @@
|
|
|
46832
47234
|
const target = e.target;
|
|
46833
47235
|
if (!table.eventManager.isDraging &&
|
|
46834
47236
|
target &&
|
|
47237
|
+
target.isDescendantsOf(table.scenegraph.stage) &&
|
|
46835
47238
|
!target.isDescendantsOf(table.scenegraph.tableGroup)) {
|
|
46836
47239
|
stateManager.updateInteractionState(InteractionState.default);
|
|
46837
47240
|
eventManager.dealTableHover();
|
|
@@ -50628,7 +51031,7 @@
|
|
|
50628
51031
|
return TABLE_EVENT_TYPE;
|
|
50629
51032
|
}
|
|
50630
51033
|
options;
|
|
50631
|
-
version = "0.18.2
|
|
51034
|
+
version = "0.18.2";
|
|
50632
51035
|
pagination;
|
|
50633
51036
|
id = `VTable${Date.now()}`;
|
|
50634
51037
|
headerStyleCache;
|
|
@@ -51757,6 +52160,7 @@
|
|
|
51757
52160
|
internalProps.title?.release();
|
|
51758
52161
|
internalProps.layoutMap.release();
|
|
51759
52162
|
this.scenegraph.clearCells();
|
|
52163
|
+
this.scenegraph.updateComponent();
|
|
51760
52164
|
this.stateManager.updateOptionSetState();
|
|
51761
52165
|
this._updateSize();
|
|
51762
52166
|
this.eventManager.updateEventBinder();
|
|
@@ -52050,6 +52454,7 @@
|
|
|
52050
52454
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
52051
52455
|
this.internalProps.theme = themes.of(theme ?? themes.DEFAULT);
|
|
52052
52456
|
this.options.theme = theme;
|
|
52457
|
+
this.scenegraph.updateComponent();
|
|
52053
52458
|
this.scenegraph.updateStageBackground();
|
|
52054
52459
|
this.scenegraph.clearCells();
|
|
52055
52460
|
this.clearCellStyleCache();
|
|
@@ -55098,14 +55503,14 @@
|
|
|
55098
55503
|
let pasteColEnd = startCol;
|
|
55099
55504
|
let pasteRowEnd = startRow;
|
|
55100
55505
|
for (let i = 0; i < values.length; i++) {
|
|
55101
|
-
if (
|
|
55506
|
+
if (startRow + i > this.rowCount - 1) {
|
|
55102
55507
|
break;
|
|
55103
55508
|
}
|
|
55104
55509
|
pasteRowEnd = startRow + i;
|
|
55105
55510
|
const rowValues = values[i];
|
|
55106
55511
|
let thisRowPasteColEnd = startCol;
|
|
55107
55512
|
for (let j = 0; j < rowValues.length; j++) {
|
|
55108
|
-
if (
|
|
55513
|
+
if (startCol + j > this.colCount - 1) {
|
|
55109
55514
|
break;
|
|
55110
55515
|
}
|
|
55111
55516
|
thisRowPasteColEnd = startCol + j;
|
|
@@ -58829,8 +59234,12 @@
|
|
|
58829
59234
|
}
|
|
58830
59235
|
else if (this.collectValuesBy[field].range) {
|
|
58831
59236
|
const fieldRange = this.collectedValues[field][collectKeys];
|
|
58832
|
-
|
|
58833
|
-
|
|
59237
|
+
const max = Math.max(record[field], fieldRange.max);
|
|
59238
|
+
const min = Math.min(record[field], fieldRange.min);
|
|
59239
|
+
if (!isNaN(max)) {
|
|
59240
|
+
fieldRange.max = max;
|
|
59241
|
+
fieldRange.min = min;
|
|
59242
|
+
}
|
|
58834
59243
|
}
|
|
58835
59244
|
else {
|
|
58836
59245
|
const fieldRange = this.collectedValues[field][collectKeys];
|
|
@@ -60357,14 +60766,14 @@
|
|
|
60357
60766
|
let pasteColEnd = startCol;
|
|
60358
60767
|
let pasteRowEnd = startRow;
|
|
60359
60768
|
for (let i = 0; i < values.length; i++) {
|
|
60360
|
-
if (
|
|
60769
|
+
if (startRow + i > this.rowCount - 1) {
|
|
60361
60770
|
break;
|
|
60362
60771
|
}
|
|
60363
60772
|
pasteRowEnd = startRow + i;
|
|
60364
60773
|
const rowValues = values[i];
|
|
60365
60774
|
let thisRowPasteColEnd = startCol;
|
|
60366
60775
|
for (let j = 0; j < rowValues.length; j++) {
|
|
60367
|
-
if (
|
|
60776
|
+
if (startCol + j > this.colCount - 1) {
|
|
60368
60777
|
break;
|
|
60369
60778
|
}
|
|
60370
60779
|
thisRowPasteColEnd = startCol + j;
|
|
@@ -61874,7 +62283,7 @@
|
|
|
61874
62283
|
}
|
|
61875
62284
|
|
|
61876
62285
|
registerForVrender();
|
|
61877
|
-
const version = "0.18.2
|
|
62286
|
+
const version = "0.18.2";
|
|
61878
62287
|
function getIcons() {
|
|
61879
62288
|
return get$1();
|
|
61880
62289
|
}
|