@visactor/vrender 0.17.23-alpha.1 → 0.17.24-alpha.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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.js +149 -85
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.17.
|
|
24
|
+
exports.version = "0.17.24-alpha.2", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
25
|
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
26
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
27
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.17.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.17.24-alpha.2\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -4784,6 +4784,11 @@
|
|
|
4784
4784
|
value: function clear() {
|
|
4785
4785
|
this.transformCbList = null, this.commandList.length = 0, this.curves.length = 0;
|
|
4786
4786
|
}
|
|
4787
|
+
}, {
|
|
4788
|
+
key: "beginPath",
|
|
4789
|
+
value: function beginPath() {
|
|
4790
|
+
this.clear();
|
|
4791
|
+
}
|
|
4787
4792
|
}, {
|
|
4788
4793
|
key: "toString",
|
|
4789
4794
|
value: function toString() {
|
|
@@ -4803,6 +4808,8 @@
|
|
|
4803
4808
|
var path = "";
|
|
4804
4809
|
for (var i = 0; i < bezierPathList.length; i += 6) path += "C".concat(bezierPathList[i], " ").concat(bezierPathList[i + 1], " ").concat(bezierPathList[i + 2], " ").concat(bezierPathList[i + 3], " ").concat(bezierPathList[i + 4], " ").concat(bezierPathList[i + 5]);
|
|
4805
4810
|
return path;
|
|
4811
|
+
}, _list[enumCommandMap.R] = function (cmd) {
|
|
4812
|
+
return "M".concat(cmd[1], " ").concat(cmd[2], " h").concat(cmd[3], " v").concat(cmd[4], " H").concat(cmd[1], "Z");
|
|
4806
4813
|
}, _list[enumCommandMap.Z] = function (cmd) {
|
|
4807
4814
|
return "Z";
|
|
4808
4815
|
}, this.toStringCbList = _list;
|
|
@@ -5188,6 +5195,7 @@
|
|
|
5188
5195
|
zIndex: 0,
|
|
5189
5196
|
layout: null,
|
|
5190
5197
|
boundsPadding: 0,
|
|
5198
|
+
renderStyle: "default",
|
|
5191
5199
|
pickMode: "accurate",
|
|
5192
5200
|
customPickShape: null,
|
|
5193
5201
|
boundsMode: "accurate",
|
|
@@ -5210,6 +5218,8 @@
|
|
|
5210
5218
|
endAngle: pi2,
|
|
5211
5219
|
innerRadius: 0,
|
|
5212
5220
|
outerRadius: 1,
|
|
5221
|
+
innerPadding: 0,
|
|
5222
|
+
outerPadding: 0,
|
|
5213
5223
|
cornerRadius: 0,
|
|
5214
5224
|
padRadius: 0,
|
|
5215
5225
|
padAngle: 0,
|
|
@@ -6707,7 +6717,7 @@
|
|
|
6707
6717
|
}();
|
|
6708
6718
|
var globalTheme = new Theme();
|
|
6709
6719
|
function getTheme(graphic, theme) {
|
|
6710
|
-
return graphic.glyphHost ? getTheme(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || globalTheme.getTheme();
|
|
6720
|
+
return graphic.glyphHost ? getTheme(graphic.glyphHost) : theme ? (graphic.isContainer, theme) : getThemeFromGroup(graphic) || graphic.attachedThemeGraphic && getTheme(graphic.attachedThemeGraphic) || globalTheme.getTheme();
|
|
6711
6721
|
}
|
|
6712
6722
|
function getThemeFromGroup(graphic) {
|
|
6713
6723
|
var g;
|
|
@@ -6971,12 +6981,12 @@
|
|
|
6971
6981
|
}
|
|
6972
6982
|
}, {
|
|
6973
6983
|
key: "removeAllChild",
|
|
6974
|
-
value: function removeAllChild() {
|
|
6984
|
+
value: function removeAllChild(deep) {
|
|
6975
6985
|
if (!this._idMap) return;
|
|
6976
6986
|
var child = this._firstChild;
|
|
6977
6987
|
for (; child;) {
|
|
6978
6988
|
var next = child._next;
|
|
6979
|
-
child.parent = null, child._prev = null, child._next = null, child = next;
|
|
6989
|
+
child.parent = null, child._prev = null, child._next = null, child = child._next, child = next;
|
|
6980
6990
|
}
|
|
6981
6991
|
this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
|
|
6982
6992
|
}
|
|
@@ -11587,7 +11597,8 @@
|
|
|
11587
11597
|
}, {
|
|
11588
11598
|
key: "tryUpdateGlobalAABBBounds",
|
|
11589
11599
|
value: function tryUpdateGlobalAABBBounds() {
|
|
11590
|
-
|
|
11600
|
+
var b = this.AABBBounds;
|
|
11601
|
+
return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
|
|
11591
11602
|
}
|
|
11592
11603
|
}, {
|
|
11593
11604
|
key: "tryUpdateGlobalTransMatrix",
|
|
@@ -12893,8 +12904,9 @@
|
|
|
12893
12904
|
}, {
|
|
12894
12905
|
key: "removeAllChild",
|
|
12895
12906
|
value: function removeAllChild() {
|
|
12907
|
+
var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
12896
12908
|
this.forEachChildren(function (child) {
|
|
12897
|
-
application.graphicService.onRemove(child);
|
|
12909
|
+
application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
12898
12910
|
}), _get(_getPrototypeOf(Group.prototype), "removeAllChild", this).call(this), this.addUpdateBoundTag();
|
|
12899
12911
|
}
|
|
12900
12912
|
}, {
|
|
@@ -16908,11 +16920,16 @@
|
|
|
16908
16920
|
_this$attribute2 = this.attribute,
|
|
16909
16921
|
_this$attribute2$corn = _this$attribute2.cornerRadius,
|
|
16910
16922
|
cornerRadius = _this$attribute2$corn === void 0 ? arcTheme.cornerRadius : _this$attribute2$corn,
|
|
16911
|
-
_this$attribute2$
|
|
16912
|
-
|
|
16913
|
-
_this$attribute2$
|
|
16914
|
-
|
|
16915
|
-
|
|
16923
|
+
_this$attribute2$inne = _this$attribute2.innerPadding,
|
|
16924
|
+
innerPadding = _this$attribute2$inne === void 0 ? arcTheme.innerPadding : _this$attribute2$inne,
|
|
16925
|
+
_this$attribute2$oute = _this$attribute2.outerPadding,
|
|
16926
|
+
outerPadding = _this$attribute2$oute === void 0 ? arcTheme.outerPadding : _this$attribute2$oute;
|
|
16927
|
+
var _this$attribute3 = this.attribute,
|
|
16928
|
+
_this$attribute3$oute = _this$attribute3.outerRadius,
|
|
16929
|
+
outerRadius = _this$attribute3$oute === void 0 ? arcTheme.outerRadius : _this$attribute3$oute,
|
|
16930
|
+
_this$attribute3$inne = _this$attribute3.innerRadius,
|
|
16931
|
+
innerRadius = _this$attribute3$inne === void 0 ? arcTheme.innerRadius : _this$attribute3$inne;
|
|
16932
|
+
if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
|
|
16916
16933
|
var deltaRadius = Math.abs(outerRadius - innerRadius);
|
|
16917
16934
|
return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
|
|
16918
16935
|
}
|
|
@@ -16920,11 +16937,11 @@
|
|
|
16920
16937
|
key: "getParsedAngle",
|
|
16921
16938
|
value: function getParsedAngle() {
|
|
16922
16939
|
var arcTheme = getTheme(this).arc;
|
|
16923
|
-
var _this$
|
|
16924
|
-
_this$
|
|
16925
|
-
startAngle = _this$
|
|
16926
|
-
_this$
|
|
16927
|
-
endAngle = _this$
|
|
16940
|
+
var _this$attribute4 = this.attribute,
|
|
16941
|
+
_this$attribute4$star = _this$attribute4.startAngle,
|
|
16942
|
+
startAngle = _this$attribute4$star === void 0 ? arcTheme.startAngle : _this$attribute4$star,
|
|
16943
|
+
_this$attribute4$endA = _this$attribute4.endAngle,
|
|
16944
|
+
endAngle = _this$attribute4$endA === void 0 ? arcTheme.endAngle : _this$attribute4$endA;
|
|
16928
16945
|
var _this$attribute$cap = this.attribute.cap,
|
|
16929
16946
|
cap = _this$attribute$cap === void 0 ? arcTheme.cap : _this$attribute$cap,
|
|
16930
16947
|
sign = endAngle - startAngle >= 0 ? 1 : -1,
|
|
@@ -16933,12 +16950,18 @@
|
|
|
16933
16950
|
var startCap = 1,
|
|
16934
16951
|
endCap = 1;
|
|
16935
16952
|
cap.length && (startCap = Number(cap[0]), endCap = Number(cap[1]));
|
|
16936
|
-
var _this$
|
|
16937
|
-
_this$
|
|
16938
|
-
outerRadius = _this$
|
|
16939
|
-
_this$
|
|
16940
|
-
innerRadius = _this$
|
|
16941
|
-
|
|
16953
|
+
var _this$attribute5 = this.attribute,
|
|
16954
|
+
_this$attribute5$oute = _this$attribute5.outerRadius,
|
|
16955
|
+
outerRadius = _this$attribute5$oute === void 0 ? arcTheme.outerRadius : _this$attribute5$oute,
|
|
16956
|
+
_this$attribute5$inne = _this$attribute5.innerRadius,
|
|
16957
|
+
innerRadius = _this$attribute5$inne === void 0 ? arcTheme.innerRadius : _this$attribute5$inne;
|
|
16958
|
+
var _this$attribute6 = this.attribute,
|
|
16959
|
+
_this$attribute6$oute = _this$attribute6.outerPadding,
|
|
16960
|
+
outerPadding = _this$attribute6$oute === void 0 ? arcTheme.outerPadding : _this$attribute6$oute,
|
|
16961
|
+
_this$attribute6$inne = _this$attribute6.innerPadding,
|
|
16962
|
+
innerPadding = _this$attribute6$inne === void 0 ? arcTheme.innerPadding : _this$attribute6$inne;
|
|
16963
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
16964
|
+
var capWidth = Math.abs(outerRadius - innerRadius) / 2,
|
|
16942
16965
|
capAngle = capWidth / outerRadius;
|
|
16943
16966
|
if (capWidth > epsilon && outerRadius > epsilon) return {
|
|
16944
16967
|
startAngle: startAngle - sign * capAngle * startCap,
|
|
@@ -16956,14 +16979,20 @@
|
|
|
16956
16979
|
key: "getParsePadAngle",
|
|
16957
16980
|
value: function getParsePadAngle(startAngle, endAngle) {
|
|
16958
16981
|
var arcTheme = getTheme(this).arc,
|
|
16959
|
-
_this$
|
|
16960
|
-
_this$
|
|
16961
|
-
|
|
16962
|
-
_this$
|
|
16963
|
-
|
|
16964
|
-
_this$
|
|
16965
|
-
padAngle = _this$
|
|
16966
|
-
|
|
16982
|
+
_this$attribute7 = this.attribute,
|
|
16983
|
+
_this$attribute7$inne = _this$attribute7.innerPadding,
|
|
16984
|
+
innerPadding = _this$attribute7$inne === void 0 ? arcTheme.innerPadding : _this$attribute7$inne,
|
|
16985
|
+
_this$attribute7$oute = _this$attribute7.outerPadding,
|
|
16986
|
+
outerPadding = _this$attribute7$oute === void 0 ? arcTheme.outerPadding : _this$attribute7$oute,
|
|
16987
|
+
_this$attribute7$padA = _this$attribute7.padAngle,
|
|
16988
|
+
padAngle = _this$attribute7$padA === void 0 ? arcTheme.padAngle : _this$attribute7$padA;
|
|
16989
|
+
var _this$attribute8 = this.attribute,
|
|
16990
|
+
_this$attribute8$oute = _this$attribute8.outerRadius,
|
|
16991
|
+
outerRadius = _this$attribute8$oute === void 0 ? arcTheme.outerRadius : _this$attribute8$oute,
|
|
16992
|
+
_this$attribute8$inne = _this$attribute8.innerRadius,
|
|
16993
|
+
innerRadius = _this$attribute8$inne === void 0 ? arcTheme.innerRadius : _this$attribute8$inne;
|
|
16994
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
16995
|
+
var _this$attribute$padRa = this.attribute.padRadius,
|
|
16967
16996
|
padRadius = _this$attribute$padRa === void 0 ? sqrt(outerRadius * outerRadius + innerRadius * innerRadius) : _this$attribute$padRa,
|
|
16968
16997
|
deltaAngle = abs(endAngle - startAngle);
|
|
16969
16998
|
var outerStartAngle = startAngle,
|
|
@@ -17034,8 +17063,8 @@
|
|
|
17034
17063
|
_this$getParsedAngle = this.getParsedAngle(),
|
|
17035
17064
|
startAngle = _this$getParsedAngle.startAngle,
|
|
17036
17065
|
endAngle = _this$getParsedAngle.endAngle;
|
|
17037
|
-
var innerRadius = attribute.innerRadius,
|
|
17038
|
-
outerRadius = attribute.outerRadius;
|
|
17066
|
+
var innerRadius = attribute.innerRadius - (attribute.innerPadding || 0),
|
|
17067
|
+
outerRadius = attribute.outerRadius - (attribute.outerPadding || 0);
|
|
17039
17068
|
var deltaAngle = abs(endAngle - startAngle),
|
|
17040
17069
|
clockwise = endAngle > startAngle;
|
|
17041
17070
|
if (outerRadius < innerRadius) {
|
|
@@ -18080,11 +18109,15 @@
|
|
|
18080
18109
|
}, {
|
|
18081
18110
|
key: "updateArcAABBBoundsImprecise",
|
|
18082
18111
|
value: function updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) {
|
|
18083
|
-
var _attribute$innerRadiu = attribute.innerRadius,
|
|
18084
|
-
innerRadius = _attribute$innerRadiu === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu;
|
|
18085
18112
|
var _attribute$outerRadiu2 = attribute.outerRadius,
|
|
18086
|
-
outerRadius = _attribute$outerRadiu2 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu2
|
|
18087
|
-
|
|
18113
|
+
outerRadius = _attribute$outerRadiu2 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu2,
|
|
18114
|
+
_attribute$innerRadiu = attribute.innerRadius,
|
|
18115
|
+
innerRadius = _attribute$innerRadiu === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu;
|
|
18116
|
+
var _attribute$outerPaddi = attribute.outerPadding,
|
|
18117
|
+
outerPadding = _attribute$outerPaddi === void 0 ? arcTheme.outerPadding : _attribute$outerPaddi,
|
|
18118
|
+
_attribute$innerPaddi = attribute.innerPadding,
|
|
18119
|
+
innerPadding = _attribute$innerPaddi === void 0 ? arcTheme.innerPadding : _attribute$innerPaddi;
|
|
18120
|
+
return outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius && (outerRadius = innerRadius), aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
|
|
18088
18121
|
}
|
|
18089
18122
|
}, {
|
|
18090
18123
|
key: "updateArcAABBBoundsAccurate",
|
|
@@ -18093,7 +18126,11 @@
|
|
|
18093
18126
|
outerRadius = _attribute$outerRadiu3 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu3,
|
|
18094
18127
|
_attribute$innerRadiu2 = attribute.innerRadius,
|
|
18095
18128
|
innerRadius = _attribute$innerRadiu2 === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu2;
|
|
18096
|
-
|
|
18129
|
+
var _attribute$outerPaddi2 = attribute.outerPadding,
|
|
18130
|
+
outerPadding = _attribute$outerPaddi2 === void 0 ? arcTheme.outerPadding : _attribute$outerPaddi2,
|
|
18131
|
+
_attribute$innerPaddi2 = attribute.innerPadding,
|
|
18132
|
+
innerPadding = _attribute$innerPaddi2 === void 0 ? arcTheme.innerPadding : _attribute$innerPaddi2;
|
|
18133
|
+
if (outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius) {
|
|
18097
18134
|
var temp = outerRadius;
|
|
18098
18135
|
outerRadius = innerRadius, innerRadius = temp;
|
|
18099
18136
|
}
|
|
@@ -19008,10 +19045,10 @@
|
|
|
19008
19045
|
doInnerBorder = innerBorder && !1 !== innerBorder.visible;
|
|
19009
19046
|
if (!doOuterBorder && !doInnerBorder) return;
|
|
19010
19047
|
var _arc$attribute2 = arc.attribute,
|
|
19011
|
-
_arc$attribute2$inner = _arc$attribute2.
|
|
19012
|
-
|
|
19013
|
-
_arc$attribute2$outer = _arc$attribute2.
|
|
19014
|
-
|
|
19048
|
+
_arc$attribute2$inner = _arc$attribute2.innerPadding,
|
|
19049
|
+
innerPadding = _arc$attribute2$inner === void 0 ? arcAttribute.innerPadding : _arc$attribute2$inner,
|
|
19050
|
+
_arc$attribute2$outer = _arc$attribute2.outerPadding,
|
|
19051
|
+
outerPadding = _arc$attribute2$outer === void 0 ? arcAttribute.outerPadding : _arc$attribute2$outer,
|
|
19015
19052
|
_arc$attribute2$start = _arc$attribute2.startAngle,
|
|
19016
19053
|
startAngle = _arc$attribute2$start === void 0 ? arcAttribute.startAngle : _arc$attribute2$start,
|
|
19017
19054
|
_arc$attribute2$endAn = _arc$attribute2.endAngle,
|
|
@@ -19025,8 +19062,14 @@
|
|
|
19025
19062
|
_arc$attribute2$scale = _arc$attribute2.scaleX,
|
|
19026
19063
|
scaleX = _arc$attribute2$scale === void 0 ? arcAttribute.scaleX : _arc$attribute2$scale,
|
|
19027
19064
|
_arc$attribute2$scale2 = _arc$attribute2.scaleY,
|
|
19028
|
-
scaleY = _arc$attribute2$scale2 === void 0 ? arcAttribute.scaleY : _arc$attribute2$scale2
|
|
19029
|
-
|
|
19065
|
+
scaleY = _arc$attribute2$scale2 === void 0 ? arcAttribute.scaleY : _arc$attribute2$scale2;
|
|
19066
|
+
var _arc$attribute3 = arc.attribute,
|
|
19067
|
+
_arc$attribute3$inner = _arc$attribute3.innerRadius,
|
|
19068
|
+
innerRadius = _arc$attribute3$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute3$inner,
|
|
19069
|
+
_arc$attribute3$outer = _arc$attribute3.outerRadius,
|
|
19070
|
+
outerRadius = _arc$attribute3$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute3$outer;
|
|
19071
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
19072
|
+
var doStrokeOuter = !(!outerBorder || !outerBorder.stroke),
|
|
19030
19073
|
doStrokeInner = !(!innerBorder || !innerBorder.stroke);
|
|
19031
19074
|
if (doOuterBorder) {
|
|
19032
19075
|
var _outerBorder$distance = outerBorder.distance,
|
|
@@ -19630,14 +19673,20 @@
|
|
|
19630
19673
|
doFill = data.doFill,
|
|
19631
19674
|
doStroke = data.doStroke,
|
|
19632
19675
|
_arc$attribute2 = arc.attribute,
|
|
19633
|
-
_arc$attribute2$outer = _arc$attribute2.
|
|
19634
|
-
|
|
19635
|
-
_arc$attribute2$inner = _arc$attribute2.
|
|
19636
|
-
|
|
19676
|
+
_arc$attribute2$outer = _arc$attribute2.outerPadding,
|
|
19677
|
+
outerPadding = _arc$attribute2$outer === void 0 ? arcAttribute.outerPadding : _arc$attribute2$outer,
|
|
19678
|
+
_arc$attribute2$inner = _arc$attribute2.innerPadding,
|
|
19679
|
+
innerPadding = _arc$attribute2$inner === void 0 ? arcAttribute.innerPadding : _arc$attribute2$inner,
|
|
19637
19680
|
_arc$attribute2$cap = _arc$attribute2.cap,
|
|
19638
19681
|
cap = _arc$attribute2$cap === void 0 ? arcAttribute.cap : _arc$attribute2$cap,
|
|
19639
19682
|
_arc$attribute2$force = _arc$attribute2.forceShowCap,
|
|
19640
19683
|
forceShowCap = _arc$attribute2$force === void 0 ? arcAttribute.forceShowCap : _arc$attribute2$force;
|
|
19684
|
+
var _arc$attribute3 = arc.attribute,
|
|
19685
|
+
_arc$attribute3$outer = _arc$attribute3.outerRadius,
|
|
19686
|
+
outerRadius = _arc$attribute3$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute3$outer,
|
|
19687
|
+
_arc$attribute3$inner = _arc$attribute3.innerRadius,
|
|
19688
|
+
innerRadius = _arc$attribute3$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute3$inner;
|
|
19689
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
19641
19690
|
var conicalOffset = 0;
|
|
19642
19691
|
var tempChangeConicalColor = (isBoolean$1(cap) && cap || cap[0]) && "conical" === fill.gradient;
|
|
19643
19692
|
if (tempChangeConicalColor) {
|
|
@@ -19663,11 +19712,11 @@
|
|
|
19663
19712
|
if (abs(ea - sa) >= pi2 - epsilon) {
|
|
19664
19713
|
context.beginPath();
|
|
19665
19714
|
var capAngle = Math.abs(outerRadius - innerRadius) / 2 / outerRadius,
|
|
19666
|
-
_arc$
|
|
19667
|
-
_arc$
|
|
19668
|
-
_endAngle = _arc$
|
|
19669
|
-
_arc$
|
|
19670
|
-
_fill = _arc$
|
|
19715
|
+
_arc$attribute4 = arc.attribute,
|
|
19716
|
+
_arc$attribute4$endAn = _arc$attribute4.endAngle,
|
|
19717
|
+
_endAngle = _arc$attribute4$endAn === void 0 ? arcAttribute.endAngle : _arc$attribute4$endAn,
|
|
19718
|
+
_arc$attribute4$fill = _arc$attribute4.fill,
|
|
19719
|
+
_fill = _arc$attribute4$fill === void 0 ? arcAttribute.fill : _arc$attribute4$fill,
|
|
19671
19720
|
_startAngle = _endAngle;
|
|
19672
19721
|
if (this.drawArcTailCapPath(arc, context, x, y, outerRadius, innerRadius, _startAngle, _startAngle + capAngle), beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), doFill) {
|
|
19673
19722
|
var color = _fill;
|
|
@@ -20248,9 +20297,10 @@
|
|
|
20248
20297
|
key: "drawLinearAreaHighPerformance",
|
|
20249
20298
|
value: function drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
20250
20299
|
var _a, _b, _c, _d, _e;
|
|
20300
|
+
var points = area.attribute.points;
|
|
20301
|
+
if (points.length < 2) return;
|
|
20251
20302
|
context.beginPath();
|
|
20252
20303
|
var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
20253
|
-
points = area.attribute.points,
|
|
20254
20304
|
startP = points[0];
|
|
20255
20305
|
context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
|
|
20256
20306
|
for (var i = 1; i < points.length; i++) {
|
|
@@ -20427,6 +20477,7 @@
|
|
|
20427
20477
|
key: "_drawSegmentItem",
|
|
20428
20478
|
value: function _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, connect, fillCb, strokeCb) {
|
|
20429
20479
|
var _a, _b, _c, _d;
|
|
20480
|
+
if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
|
|
20430
20481
|
var connectedType = attribute.connectedType,
|
|
20431
20482
|
connectedX = attribute.connectedX,
|
|
20432
20483
|
connectedY = attribute.connectedY,
|
|
@@ -20435,7 +20486,6 @@
|
|
|
20435
20486
|
if (connect && (isArray$1(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$1(defaultAttribute) ? defaultAttribute.forEach(function (i) {
|
|
20436
20487
|
return da.push(i);
|
|
20437
20488
|
}) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
|
|
20438
|
-
if (!cache) return;
|
|
20439
20489
|
context.beginPath();
|
|
20440
20490
|
var _area$attribute4 = area.attribute,
|
|
20441
20491
|
points = _area$attribute4.points,
|
|
@@ -22266,7 +22316,7 @@
|
|
|
22266
22316
|
var d = context.dpr % 1;
|
|
22267
22317
|
(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);
|
|
22268
22318
|
var drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
|
|
22269
|
-
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.
|
|
22319
|
+
context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort(function (a, b) {
|
|
22270
22320
|
var _a, _b;
|
|
22271
22321
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
22272
22322
|
}).forEach(function (group) {
|
|
@@ -22329,7 +22379,7 @@
|
|
|
22329
22379
|
}, subLayers.set(group._uid, incrementalLayer));
|
|
22330
22380
|
var incrementalContext = incrementalLayer.layer.getNativeHandler().getContext(),
|
|
22331
22381
|
idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);
|
|
22332
|
-
idc.dirtyBounds.
|
|
22382
|
+
idc.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), idc.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), idc.draw(this.currentRenderService, Object.assign(Object.assign({}, drawContext), {
|
|
22333
22383
|
drawContribution: idc,
|
|
22334
22384
|
clear: "transparent",
|
|
22335
22385
|
layer: incrementalLayer.layer,
|
|
@@ -22359,7 +22409,7 @@
|
|
|
22359
22409
|
key: "getRenderContribution",
|
|
22360
22410
|
value: function getRenderContribution(graphic) {
|
|
22361
22411
|
var renderer;
|
|
22362
|
-
return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
|
|
22412
|
+
return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType, graphic)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
|
|
22363
22413
|
}
|
|
22364
22414
|
}, {
|
|
22365
22415
|
key: "renderItem",
|
|
@@ -22398,8 +22448,13 @@
|
|
|
22398
22448
|
}
|
|
22399
22449
|
}, {
|
|
22400
22450
|
key: "selectRenderByNumberType",
|
|
22401
|
-
value: function selectRenderByNumberType(type) {
|
|
22402
|
-
|
|
22451
|
+
value: function selectRenderByNumberType(type, graphic) {
|
|
22452
|
+
var data;
|
|
22453
|
+
if (graphic.attribute.renderStyle) {
|
|
22454
|
+
var currentRenderMap = this.styleRenderMap.get(graphic.attribute.renderStyle);
|
|
22455
|
+
data = currentRenderMap && currentRenderMap.get(type);
|
|
22456
|
+
}
|
|
22457
|
+
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
22403
22458
|
}
|
|
22404
22459
|
}, {
|
|
22405
22460
|
key: "clearScreen",
|
|
@@ -23207,6 +23262,8 @@
|
|
|
23207
23262
|
var _this = this;
|
|
23208
23263
|
this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, function (stage) {
|
|
23209
23264
|
stage && stage === _this.pluginService.stage && _this.drawHTML(context.stage.renderService);
|
|
23265
|
+
}), application.graphicService.hooks.onRemove.tap(this.key, function (graphic) {
|
|
23266
|
+
_this.removeDom(graphic);
|
|
23210
23267
|
}), application.graphicService.hooks.onRelease.tap(this.key, function (graphic) {
|
|
23211
23268
|
_this.removeDom(graphic);
|
|
23212
23269
|
});
|
|
@@ -23263,26 +23320,27 @@
|
|
|
23263
23320
|
anchorType = _html$anchorType === void 0 ? "boundsLeftTop" : _html$anchorType;
|
|
23264
23321
|
graphic.bindDom || (graphic.bindDom = new Map());
|
|
23265
23322
|
var lastDom = graphic.bindDom.get(dom);
|
|
23266
|
-
|
|
23267
|
-
|
|
23268
|
-
|
|
23269
|
-
|
|
23270
|
-
|
|
23271
|
-
|
|
23272
|
-
|
|
23273
|
-
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
23277
|
-
|
|
23278
|
-
|
|
23279
|
-
|
|
23280
|
-
|
|
23281
|
-
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
}
|
|
23323
|
+
var wrapGroup, nativeContainer;
|
|
23324
|
+
if (!lastDom || container && container !== lastDom.container) {
|
|
23325
|
+
var nativeDom;
|
|
23326
|
+
graphic.bindDom.forEach(function (_ref) {
|
|
23327
|
+
var wrapGroup = _ref.wrapGroup;
|
|
23328
|
+
application.global.removeDom(wrapGroup);
|
|
23329
|
+
}), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
|
|
23330
|
+
var _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
|
|
23331
|
+
nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer(), wrapGroup = application.global.createDom({
|
|
23332
|
+
tagName: "div",
|
|
23333
|
+
width: width,
|
|
23334
|
+
height: height,
|
|
23335
|
+
style: style,
|
|
23336
|
+
parent: nativeContainer
|
|
23337
|
+
}), wrapGroup && (wrapGroup.appendChild(nativeDom), graphic.bindDom.set(dom, {
|
|
23338
|
+
dom: nativeDom,
|
|
23339
|
+
container: container,
|
|
23340
|
+
wrapGroup: wrapGroup
|
|
23341
|
+
}));
|
|
23342
|
+
} else wrapGroup = lastDom.wrapGroup, nativeContainer = wrapGroup.parentNode;
|
|
23343
|
+
wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
|
|
23286
23344
|
var left = 0,
|
|
23287
23345
|
top = 0;
|
|
23288
23346
|
var b = graphic.globalAABBBounds;
|
|
@@ -26011,13 +26069,19 @@
|
|
|
26011
26069
|
doStroke = data.doStroke,
|
|
26012
26070
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
26013
26071
|
_arc$attribute = arc.attribute,
|
|
26014
|
-
_arc$attribute$
|
|
26015
|
-
|
|
26016
|
-
_arc$attribute$
|
|
26017
|
-
|
|
26072
|
+
_arc$attribute$outerP = _arc$attribute.outerPadding,
|
|
26073
|
+
outerPadding = _arc$attribute$outerP === void 0 ? arcAttribute.outerPadding : _arc$attribute$outerP,
|
|
26074
|
+
_arc$attribute$innerP = _arc$attribute.innerPadding,
|
|
26075
|
+
innerPadding = _arc$attribute$innerP === void 0 ? arcAttribute.innerPadding : _arc$attribute$innerP,
|
|
26018
26076
|
_arc$attribute$height = _arc$attribute.height,
|
|
26019
|
-
height = _arc$attribute$height === void 0 ? 10 : _arc$attribute$height
|
|
26020
|
-
|
|
26077
|
+
height = _arc$attribute$height === void 0 ? 10 : _arc$attribute$height;
|
|
26078
|
+
var _arc$attribute2 = arc.attribute,
|
|
26079
|
+
_arc$attribute2$outer = _arc$attribute2.outerRadius,
|
|
26080
|
+
outerRadius = _arc$attribute2$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute2$outer,
|
|
26081
|
+
_arc$attribute2$inner = _arc$attribute2.innerRadius,
|
|
26082
|
+
innerRadius = _arc$attribute2$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute2$inner;
|
|
26083
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
26084
|
+
var rgbArray = ColorStore.Get(fill, exports.ColorType.Color255),
|
|
26021
26085
|
_ref = drawContext.stage || {},
|
|
26022
26086
|
light = _ref.light,
|
|
26023
26087
|
face = drawContext.hack_pieFace,
|
|
@@ -35035,7 +35099,7 @@
|
|
|
35035
35099
|
|
|
35036
35100
|
var roughModule = _roughModule;
|
|
35037
35101
|
|
|
35038
|
-
const version = "0.17.
|
|
35102
|
+
const version = "0.17.24-alpha.2";
|
|
35039
35103
|
preLoadAllModule();
|
|
35040
35104
|
if (isBrowserEnv()) {
|
|
35041
35105
|
loadBrowserEnv(container);
|