@visactor/vrender 0.18.0-alpha.4 → 0.18.0-alpha.5

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/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;
@@ -5150,6 +5157,8 @@
5150
5157
  heightLimit: 1 / 0,
5151
5158
  lineClamp: 1 / 0,
5152
5159
  suffixPosition: "end",
5160
+ underlineDash: [],
5161
+ underlineOffset: 0,
5153
5162
  disableAutoClipedPoptip: void 0
5154
5163
  };
5155
5164
  var DefaultPickStyle = {
@@ -5188,6 +5197,7 @@
5188
5197
  zIndex: 0,
5189
5198
  layout: null,
5190
5199
  boundsPadding: 0,
5200
+ renderStyle: "default",
5191
5201
  pickMode: "accurate",
5192
5202
  customPickShape: null,
5193
5203
  boundsMode: "accurate",
@@ -5210,6 +5220,8 @@
5210
5220
  endAngle: pi2,
5211
5221
  innerRadius: 0,
5212
5222
  outerRadius: 1,
5223
+ innerPadding: 0,
5224
+ outerPadding: 0,
5213
5225
  cornerRadius: 0,
5214
5226
  padRadius: 0,
5215
5227
  padAngle: 0,
@@ -5293,7 +5305,7 @@
5293
5305
  strokeBoundsBuffer: 0,
5294
5306
  keepDirIn3d: !0
5295
5307
  });
5296
- var DefaultRichTextAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
5308
+ var DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
5297
5309
  width: 300,
5298
5310
  height: 300,
5299
5311
  ellipsis: !0,
@@ -11370,9 +11382,7 @@
11370
11382
  var data = ResourceLoader.cache.get(svgStr);
11371
11383
  data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(function () {
11372
11384
  mark.imageLoadFail(svgStr);
11373
- }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && application.global.getRequestAnimationFrame()(function () {
11374
- mark.imageLoadSuccess(svgStr, data.data);
11375
- }) : (data = {
11385
+ }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(svgStr, data.data) : (data = {
11376
11386
  type: "image",
11377
11387
  loadState: "init"
11378
11388
  }, ResourceLoader.cache.set(svgStr, data), data.dataPromise = application.global.loadSvg(svgStr), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(function (res) {
@@ -11478,6 +11488,7 @@
11478
11488
  zIndex: 1,
11479
11489
  layout: 1,
11480
11490
  keepDirIn3d: 1,
11491
+ globalZIndex: 1,
11481
11492
  outerBorder: 1,
11482
11493
  innerBorder: 1,
11483
11494
  lineDash: 1,
@@ -11822,7 +11833,7 @@
11822
11833
  value: function animate(params) {
11823
11834
  var _this2 = this;
11824
11835
  this.animates || (this.animates = new Map());
11825
- var animate = new Animate(null == params ? void 0 : params.id).bind(this);
11836
+ var animate = new Animate(null == params ? void 0 : params.id, this.stage && this.stage.getTimeline()).bind(this);
11826
11837
  if (params) {
11827
11838
  var onStart = params.onStart,
11828
11839
  onFrame = params.onFrame,
@@ -14031,17 +14042,25 @@
14031
14042
  key: "updateSingallineAABBBounds",
14032
14043
  value: function updateSingallineAABBBounds(text) {
14033
14044
  var textTheme = getTheme(this).text,
14034
- _this$attribute$direc = this.attribute.direction,
14035
- direction = _this$attribute$direc === void 0 ? textTheme.direction : _this$attribute$direc;
14036
- return "horizontal" === direction ? this.updateHorizontalSinglelineAABBBounds(text) : this.updateVerticalSinglelineAABBBounds(text);
14045
+ _this$attribute2 = this.attribute,
14046
+ _this$attribute2$dire = _this$attribute2.direction,
14047
+ direction = _this$attribute2$dire === void 0 ? textTheme.direction : _this$attribute2$dire,
14048
+ _this$attribute2$unde = _this$attribute2.underlineOffset,
14049
+ underlineOffset = _this$attribute2$unde === void 0 ? textTheme.underlineOffset : _this$attribute2$unde,
14050
+ b = "horizontal" === direction ? this.updateHorizontalSinglelineAABBBounds(text) : this.updateVerticalSinglelineAABBBounds(text);
14051
+ return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
14037
14052
  }
14038
14053
  }, {
14039
14054
  key: "updateMultilineAABBBounds",
14040
14055
  value: function updateMultilineAABBBounds(text) {
14041
14056
  var textTheme = getTheme(this).text,
14042
- _this$attribute$direc2 = this.attribute.direction,
14043
- direction = _this$attribute$direc2 === void 0 ? textTheme.direction : _this$attribute$direc2;
14044
- return "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
14057
+ _this$attribute3 = this.attribute,
14058
+ _this$attribute3$dire = _this$attribute3.direction,
14059
+ direction = _this$attribute3$dire === void 0 ? textTheme.direction : _this$attribute3$dire,
14060
+ _this$attribute3$unde = _this$attribute3.underlineOffset,
14061
+ underlineOffset = _this$attribute3$unde === void 0 ? textTheme.underlineOffset : _this$attribute3$unde,
14062
+ b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
14063
+ return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
14045
14064
  }
14046
14065
  }, {
14047
14066
  key: "updateHorizontalSinglelineAABBBounds",
@@ -14758,7 +14777,7 @@
14758
14777
  function StarSymbol() {
14759
14778
  var _this;
14760
14779
  _classCallCheck(this, StarSymbol);
14761
- _this = _super.apply(this, arguments), _this.type = "star", _this.pathStr = "M4.51351666838205,0A4.51351666838205,4.51351666838205,0,1,1,-4.51351666838205,0A4.51351666838205,4.51351666838205,0,1,1,4.51351666838205,0";
14780
+ _this = _super.apply(this, arguments), _this.type = "star", _this.pathStr = "M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z";
14762
14781
  return _this;
14763
14782
  }
14764
14783
  _createClass(StarSymbol, [{
@@ -14881,7 +14900,7 @@
14881
14900
  function WyeSymbol() {
14882
14901
  var _this;
14883
14902
  _classCallCheck(this, WyeSymbol);
14884
- _this = _super.apply(this, arguments), _this.type = "wye", _this.pathStr = "M4.51351666838205,0A4.51351666838205,4.51351666838205,0,1,1,-4.51351666838205,0A4.51351666838205,4.51351666838205,0,1,1,4.51351666838205,0";
14903
+ _this = _super.apply(this, arguments), _this.type = "wye", _this.pathStr = "M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
14885
14904
  return _this;
14886
14905
  }
14887
14906
  _createClass(WyeSymbol, [{
@@ -16555,28 +16574,47 @@
16555
16574
  value: function getFrameCache() {
16556
16575
  return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
16557
16576
  }
16577
+ }, {
16578
+ key: "combinedStyleToCharacter",
16579
+ value: function combinedStyleToCharacter(config) {
16580
+ var _this$attribute = this.attribute,
16581
+ fill = _this$attribute.fill,
16582
+ stroke = _this$attribute.stroke,
16583
+ fontSize = _this$attribute.fontSize,
16584
+ fontFamily = _this$attribute.fontFamily,
16585
+ fontStyle = _this$attribute.fontStyle,
16586
+ fontWeight = _this$attribute.fontWeight;
16587
+ return Object.assign({
16588
+ fill: fill,
16589
+ stroke: stroke,
16590
+ fontSize: fontSize,
16591
+ fontFamily: fontFamily,
16592
+ fontStyle: fontStyle,
16593
+ fontWeight: fontWeight
16594
+ }, config);
16595
+ }
16558
16596
  }, {
16559
16597
  key: "doUpdateFrameCache",
16560
16598
  value: function doUpdateFrameCache() {
16561
16599
  var _this2 = this;
16562
16600
  var _a;
16563
- var _this$attribute = this.attribute,
16564
- _this$attribute$textC = _this$attribute.textConfig,
16565
- textConfig = _this$attribute$textC === void 0 ? [] : _this$attribute$textC,
16566
- maxWidth = _this$attribute.maxWidth,
16567
- maxHeight = _this$attribute.maxHeight,
16568
- width = _this$attribute.width,
16569
- height = _this$attribute.height,
16570
- ellipsis = _this$attribute.ellipsis,
16571
- wordBreak = _this$attribute.wordBreak,
16572
- verticalDirection = _this$attribute.verticalDirection,
16573
- textAlign = _this$attribute.textAlign,
16574
- textBaseline = _this$attribute.textBaseline,
16575
- layoutDirection = _this$attribute.layoutDirection,
16576
- singleLine = _this$attribute.singleLine,
16601
+ var _this$attribute2 = this.attribute,
16602
+ _this$attribute2$text = _this$attribute2.textConfig,
16603
+ textConfig = _this$attribute2$text === void 0 ? [] : _this$attribute2$text,
16604
+ maxWidth = _this$attribute2.maxWidth,
16605
+ maxHeight = _this$attribute2.maxHeight,
16606
+ width = _this$attribute2.width,
16607
+ height = _this$attribute2.height,
16608
+ ellipsis = _this$attribute2.ellipsis,
16609
+ wordBreak = _this$attribute2.wordBreak,
16610
+ verticalDirection = _this$attribute2.verticalDirection,
16611
+ textAlign = _this$attribute2.textAlign,
16612
+ textBaseline = _this$attribute2.textBaseline,
16613
+ layoutDirection = _this$attribute2.layoutDirection,
16614
+ singleLine = _this$attribute2.singleLine,
16577
16615
  paragraphs = [];
16578
16616
  for (var i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
16579
- var config = textConfig[i],
16617
+ var config = this.combinedStyleToCharacter(textConfig[i]),
16580
16618
  iconCache = config.id && this._frameCache && this._frameCache.icons && this._frameCache.icons.get(config.id);
16581
16619
  if (iconCache) paragraphs.push(iconCache);else {
16582
16620
  var icon = new RichTextIcon(config);
@@ -16586,7 +16624,7 @@
16586
16624
  }, icon.richtextId = config.id, paragraphs.push(icon);
16587
16625
  }
16588
16626
  } else {
16589
- var richTextConfig = textConfig[i];
16627
+ var richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
16590
16628
  if (isNumber$1(richTextConfig.text) && (richTextConfig.text = "".concat(richTextConfig.text)), richTextConfig.text && richTextConfig.text.includes("\n")) {
16591
16629
  var textParts = richTextConfig.text.split("\n");
16592
16630
  for (var j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
@@ -16910,11 +16948,16 @@
16910
16948
  _this$attribute2 = this.attribute,
16911
16949
  _this$attribute2$corn = _this$attribute2.cornerRadius,
16912
16950
  cornerRadius = _this$attribute2$corn === void 0 ? arcTheme.cornerRadius : _this$attribute2$corn,
16913
- _this$attribute2$oute = _this$attribute2.outerRadius,
16914
- outerRadius = _this$attribute2$oute === void 0 ? arcTheme.outerRadius : _this$attribute2$oute,
16915
- _this$attribute2$inne = _this$attribute2.innerRadius,
16916
- innerRadius = _this$attribute2$inne === void 0 ? arcTheme.innerRadius : _this$attribute2$inne;
16917
- if (0 === cornerRadius || "0%" === cornerRadius) return 0;
16951
+ _this$attribute2$inne = _this$attribute2.innerPadding,
16952
+ innerPadding = _this$attribute2$inne === void 0 ? arcTheme.innerPadding : _this$attribute2$inne,
16953
+ _this$attribute2$oute = _this$attribute2.outerPadding,
16954
+ outerPadding = _this$attribute2$oute === void 0 ? arcTheme.outerPadding : _this$attribute2$oute;
16955
+ var _this$attribute3 = this.attribute,
16956
+ _this$attribute3$oute = _this$attribute3.outerRadius,
16957
+ outerRadius = _this$attribute3$oute === void 0 ? arcTheme.outerRadius : _this$attribute3$oute,
16958
+ _this$attribute3$inne = _this$attribute3.innerRadius,
16959
+ innerRadius = _this$attribute3$inne === void 0 ? arcTheme.innerRadius : _this$attribute3$inne;
16960
+ if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
16918
16961
  var deltaRadius = Math.abs(outerRadius - innerRadius);
16919
16962
  return Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
16920
16963
  }
@@ -16922,11 +16965,11 @@
16922
16965
  key: "getParsedAngle",
16923
16966
  value: function getParsedAngle() {
16924
16967
  var arcTheme = getTheme(this).arc;
16925
- var _this$attribute3 = this.attribute,
16926
- _this$attribute3$star = _this$attribute3.startAngle,
16927
- startAngle = _this$attribute3$star === void 0 ? arcTheme.startAngle : _this$attribute3$star,
16928
- _this$attribute3$endA = _this$attribute3.endAngle,
16929
- endAngle = _this$attribute3$endA === void 0 ? arcTheme.endAngle : _this$attribute3$endA;
16968
+ var _this$attribute4 = this.attribute,
16969
+ _this$attribute4$star = _this$attribute4.startAngle,
16970
+ startAngle = _this$attribute4$star === void 0 ? arcTheme.startAngle : _this$attribute4$star,
16971
+ _this$attribute4$endA = _this$attribute4.endAngle,
16972
+ endAngle = _this$attribute4$endA === void 0 ? arcTheme.endAngle : _this$attribute4$endA;
16930
16973
  var _this$attribute$cap = this.attribute.cap,
16931
16974
  cap = _this$attribute$cap === void 0 ? arcTheme.cap : _this$attribute$cap,
16932
16975
  sign = endAngle - startAngle >= 0 ? 1 : -1,
@@ -16935,12 +16978,18 @@
16935
16978
  var startCap = 1,
16936
16979
  endCap = 1;
16937
16980
  cap.length && (startCap = Number(cap[0]), endCap = Number(cap[1]));
16938
- var _this$attribute4 = this.attribute,
16939
- _this$attribute4$oute = _this$attribute4.outerRadius,
16940
- outerRadius = _this$attribute4$oute === void 0 ? arcTheme.outerRadius : _this$attribute4$oute,
16941
- _this$attribute4$inne = _this$attribute4.innerRadius,
16942
- innerRadius = _this$attribute4$inne === void 0 ? arcTheme.innerRadius : _this$attribute4$inne,
16943
- capWidth = Math.abs(outerRadius - innerRadius) / 2,
16981
+ var _this$attribute5 = this.attribute,
16982
+ _this$attribute5$oute = _this$attribute5.outerRadius,
16983
+ outerRadius = _this$attribute5$oute === void 0 ? arcTheme.outerRadius : _this$attribute5$oute,
16984
+ _this$attribute5$inne = _this$attribute5.innerRadius,
16985
+ innerRadius = _this$attribute5$inne === void 0 ? arcTheme.innerRadius : _this$attribute5$inne;
16986
+ var _this$attribute6 = this.attribute,
16987
+ _this$attribute6$oute = _this$attribute6.outerPadding,
16988
+ outerPadding = _this$attribute6$oute === void 0 ? arcTheme.outerPadding : _this$attribute6$oute,
16989
+ _this$attribute6$inne = _this$attribute6.innerPadding,
16990
+ innerPadding = _this$attribute6$inne === void 0 ? arcTheme.innerPadding : _this$attribute6$inne;
16991
+ outerRadius += outerPadding, innerRadius -= innerPadding;
16992
+ var capWidth = Math.abs(outerRadius - innerRadius) / 2,
16944
16993
  capAngle = capWidth / outerRadius;
16945
16994
  if (capWidth > epsilon && outerRadius > epsilon) return {
16946
16995
  startAngle: startAngle - sign * capAngle * startCap,
@@ -16958,14 +17007,20 @@
16958
17007
  key: "getParsePadAngle",
16959
17008
  value: function getParsePadAngle(startAngle, endAngle) {
16960
17009
  var arcTheme = getTheme(this).arc,
16961
- _this$attribute5 = this.attribute,
16962
- _this$attribute5$oute = _this$attribute5.outerRadius,
16963
- outerRadius = _this$attribute5$oute === void 0 ? arcTheme.outerRadius : _this$attribute5$oute,
16964
- _this$attribute5$inne = _this$attribute5.innerRadius,
16965
- innerRadius = _this$attribute5$inne === void 0 ? arcTheme.innerRadius : _this$attribute5$inne,
16966
- _this$attribute5$padA = _this$attribute5.padAngle,
16967
- padAngle = _this$attribute5$padA === void 0 ? arcTheme.padAngle : _this$attribute5$padA,
16968
- _this$attribute$padRa = this.attribute.padRadius,
17010
+ _this$attribute7 = this.attribute,
17011
+ _this$attribute7$inne = _this$attribute7.innerPadding,
17012
+ innerPadding = _this$attribute7$inne === void 0 ? arcTheme.innerPadding : _this$attribute7$inne,
17013
+ _this$attribute7$oute = _this$attribute7.outerPadding,
17014
+ outerPadding = _this$attribute7$oute === void 0 ? arcTheme.outerPadding : _this$attribute7$oute,
17015
+ _this$attribute7$padA = _this$attribute7.padAngle,
17016
+ padAngle = _this$attribute7$padA === void 0 ? arcTheme.padAngle : _this$attribute7$padA;
17017
+ var _this$attribute8 = this.attribute,
17018
+ _this$attribute8$oute = _this$attribute8.outerRadius,
17019
+ outerRadius = _this$attribute8$oute === void 0 ? arcTheme.outerRadius : _this$attribute8$oute,
17020
+ _this$attribute8$inne = _this$attribute8.innerRadius,
17021
+ innerRadius = _this$attribute8$inne === void 0 ? arcTheme.innerRadius : _this$attribute8$inne;
17022
+ outerRadius += outerPadding, innerRadius -= innerPadding;
17023
+ var _this$attribute$padRa = this.attribute.padRadius,
16969
17024
  padRadius = _this$attribute$padRa === void 0 ? sqrt(outerRadius * outerRadius + innerRadius * innerRadius) : _this$attribute$padRa,
16970
17025
  deltaAngle = abs(endAngle - startAngle);
16971
17026
  var outerStartAngle = startAngle,
@@ -17036,8 +17091,8 @@
17036
17091
  _this$getParsedAngle = this.getParsedAngle(),
17037
17092
  startAngle = _this$getParsedAngle.startAngle,
17038
17093
  endAngle = _this$getParsedAngle.endAngle;
17039
- var innerRadius = attribute.innerRadius,
17040
- outerRadius = attribute.outerRadius;
17094
+ var innerRadius = attribute.innerRadius - (attribute.innerPadding || 0),
17095
+ outerRadius = attribute.outerRadius - (attribute.outerPadding || 0);
17041
17096
  var deltaAngle = abs(endAngle - startAngle),
17042
17097
  clockwise = endAngle > startAngle;
17043
17098
  if (outerRadius < innerRadius) {
@@ -18082,11 +18137,15 @@
18082
18137
  }, {
18083
18138
  key: "updateArcAABBBoundsImprecise",
18084
18139
  value: function updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) {
18085
- var _attribute$innerRadiu = attribute.innerRadius,
18086
- innerRadius = _attribute$innerRadiu === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu;
18087
18140
  var _attribute$outerRadiu2 = attribute.outerRadius,
18088
- outerRadius = _attribute$outerRadiu2 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu2;
18089
- return outerRadius < innerRadius && (outerRadius = innerRadius), aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
18141
+ outerRadius = _attribute$outerRadiu2 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu2,
18142
+ _attribute$innerRadiu = attribute.innerRadius,
18143
+ innerRadius = _attribute$innerRadiu === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu;
18144
+ var _attribute$outerPaddi = attribute.outerPadding,
18145
+ outerPadding = _attribute$outerPaddi === void 0 ? arcTheme.outerPadding : _attribute$outerPaddi,
18146
+ _attribute$innerPaddi = attribute.innerPadding,
18147
+ innerPadding = _attribute$innerPaddi === void 0 ? arcTheme.innerPadding : _attribute$innerPaddi;
18148
+ return outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius && (outerRadius = innerRadius), aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
18090
18149
  }
18091
18150
  }, {
18092
18151
  key: "updateArcAABBBoundsAccurate",
@@ -18095,7 +18154,11 @@
18095
18154
  outerRadius = _attribute$outerRadiu3 === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu3,
18096
18155
  _attribute$innerRadiu2 = attribute.innerRadius,
18097
18156
  innerRadius = _attribute$innerRadiu2 === void 0 ? arcTheme.innerRadius : _attribute$innerRadiu2;
18098
- if (outerRadius < innerRadius) {
18157
+ var _attribute$outerPaddi2 = attribute.outerPadding,
18158
+ outerPadding = _attribute$outerPaddi2 === void 0 ? arcTheme.outerPadding : _attribute$outerPaddi2,
18159
+ _attribute$innerPaddi2 = attribute.innerPadding,
18160
+ innerPadding = _attribute$innerPaddi2 === void 0 ? arcTheme.innerPadding : _attribute$innerPaddi2;
18161
+ if (outerRadius += outerPadding, innerRadius -= innerPadding, outerRadius < innerRadius) {
18099
18162
  var temp = outerRadius;
18100
18163
  outerRadius = innerRadius, innerRadius = temp;
18101
18164
  }
@@ -18564,12 +18627,12 @@
18564
18627
  _createClass(GradientParser, null, [{
18565
18628
  key: "IsGradient",
18566
18629
  value: function IsGradient(c) {
18567
- return !("string" == typeof c && c.length < 10);
18630
+ return !("string" == typeof c && !c.includes("gradient"));
18568
18631
  }
18569
18632
  }, {
18570
18633
  key: "IsGradientStr",
18571
18634
  value: function IsGradientStr(c) {
18572
- return "string" == typeof c && c.length > 10;
18635
+ return "string" == typeof c && c.includes("gradient");
18573
18636
  }
18574
18637
  }, {
18575
18638
  key: "Parse",
@@ -19010,10 +19073,10 @@
19010
19073
  doInnerBorder = innerBorder && !1 !== innerBorder.visible;
19011
19074
  if (!doOuterBorder && !doInnerBorder) return;
19012
19075
  var _arc$attribute2 = arc.attribute,
19013
- _arc$attribute2$inner = _arc$attribute2.innerRadius,
19014
- innerRadius = _arc$attribute2$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute2$inner,
19015
- _arc$attribute2$outer = _arc$attribute2.outerRadius,
19016
- outerRadius = _arc$attribute2$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute2$outer,
19076
+ _arc$attribute2$inner = _arc$attribute2.innerPadding,
19077
+ innerPadding = _arc$attribute2$inner === void 0 ? arcAttribute.innerPadding : _arc$attribute2$inner,
19078
+ _arc$attribute2$outer = _arc$attribute2.outerPadding,
19079
+ outerPadding = _arc$attribute2$outer === void 0 ? arcAttribute.outerPadding : _arc$attribute2$outer,
19017
19080
  _arc$attribute2$start = _arc$attribute2.startAngle,
19018
19081
  startAngle = _arc$attribute2$start === void 0 ? arcAttribute.startAngle : _arc$attribute2$start,
19019
19082
  _arc$attribute2$endAn = _arc$attribute2.endAngle,
@@ -19027,8 +19090,14 @@
19027
19090
  _arc$attribute2$scale = _arc$attribute2.scaleX,
19028
19091
  scaleX = _arc$attribute2$scale === void 0 ? arcAttribute.scaleX : _arc$attribute2$scale,
19029
19092
  _arc$attribute2$scale2 = _arc$attribute2.scaleY,
19030
- scaleY = _arc$attribute2$scale2 === void 0 ? arcAttribute.scaleY : _arc$attribute2$scale2,
19031
- doStrokeOuter = !(!outerBorder || !outerBorder.stroke),
19093
+ scaleY = _arc$attribute2$scale2 === void 0 ? arcAttribute.scaleY : _arc$attribute2$scale2;
19094
+ var _arc$attribute3 = arc.attribute,
19095
+ _arc$attribute3$inner = _arc$attribute3.innerRadius,
19096
+ innerRadius = _arc$attribute3$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute3$inner,
19097
+ _arc$attribute3$outer = _arc$attribute3.outerRadius,
19098
+ outerRadius = _arc$attribute3$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute3$outer;
19099
+ outerRadius += outerPadding, innerRadius -= innerPadding;
19100
+ var doStrokeOuter = !(!outerBorder || !outerBorder.stroke),
19032
19101
  doStrokeInner = !(!innerBorder || !innerBorder.stroke);
19033
19102
  if (doOuterBorder) {
19034
19103
  var _outerBorder$distance = outerBorder.distance,
@@ -19632,14 +19701,20 @@
19632
19701
  doFill = data.doFill,
19633
19702
  doStroke = data.doStroke,
19634
19703
  _arc$attribute2 = arc.attribute,
19635
- _arc$attribute2$outer = _arc$attribute2.outerRadius,
19636
- outerRadius = _arc$attribute2$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute2$outer,
19637
- _arc$attribute2$inner = _arc$attribute2.innerRadius,
19638
- innerRadius = _arc$attribute2$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute2$inner,
19704
+ _arc$attribute2$outer = _arc$attribute2.outerPadding,
19705
+ outerPadding = _arc$attribute2$outer === void 0 ? arcAttribute.outerPadding : _arc$attribute2$outer,
19706
+ _arc$attribute2$inner = _arc$attribute2.innerPadding,
19707
+ innerPadding = _arc$attribute2$inner === void 0 ? arcAttribute.innerPadding : _arc$attribute2$inner,
19639
19708
  _arc$attribute2$cap = _arc$attribute2.cap,
19640
19709
  cap = _arc$attribute2$cap === void 0 ? arcAttribute.cap : _arc$attribute2$cap,
19641
19710
  _arc$attribute2$force = _arc$attribute2.forceShowCap,
19642
19711
  forceShowCap = _arc$attribute2$force === void 0 ? arcAttribute.forceShowCap : _arc$attribute2$force;
19712
+ var _arc$attribute3 = arc.attribute,
19713
+ _arc$attribute3$outer = _arc$attribute3.outerRadius,
19714
+ outerRadius = _arc$attribute3$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute3$outer,
19715
+ _arc$attribute3$inner = _arc$attribute3.innerRadius,
19716
+ innerRadius = _arc$attribute3$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute3$inner;
19717
+ outerRadius += outerPadding, innerRadius -= innerPadding;
19643
19718
  var conicalOffset = 0;
19644
19719
  var tempChangeConicalColor = (isBoolean$1(cap) && cap || cap[0]) && "conical" === fill.gradient;
19645
19720
  if (tempChangeConicalColor) {
@@ -19665,11 +19740,11 @@
19665
19740
  if (abs(ea - sa) >= pi2 - epsilon) {
19666
19741
  context.beginPath();
19667
19742
  var capAngle = Math.abs(outerRadius - innerRadius) / 2 / outerRadius,
19668
- _arc$attribute3 = arc.attribute,
19669
- _arc$attribute3$endAn = _arc$attribute3.endAngle,
19670
- _endAngle = _arc$attribute3$endAn === void 0 ? arcAttribute.endAngle : _arc$attribute3$endAn,
19671
- _arc$attribute3$fill = _arc$attribute3.fill,
19672
- _fill = _arc$attribute3$fill === void 0 ? arcAttribute.fill : _arc$attribute3$fill,
19743
+ _arc$attribute4 = arc.attribute,
19744
+ _arc$attribute4$endAn = _arc$attribute4.endAngle,
19745
+ _endAngle = _arc$attribute4$endAn === void 0 ? arcAttribute.endAngle : _arc$attribute4$endAn,
19746
+ _arc$attribute4$fill = _arc$attribute4.fill,
19747
+ _fill = _arc$attribute4$fill === void 0 ? arcAttribute.fill : _arc$attribute4$fill,
19673
19748
  _startAngle = _endAngle;
19674
19749
  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) {
19675
19750
  var color = _fill;
@@ -20250,9 +20325,10 @@
20250
20325
  key: "drawLinearAreaHighPerformance",
20251
20326
  value: function drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
20252
20327
  var _a, _b, _c, _d, _e;
20328
+ var points = area.attribute.points;
20329
+ if (points.length < 2) return;
20253
20330
  context.beginPath();
20254
20331
  var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
20255
- points = area.attribute.points,
20256
20332
  startP = points[0];
20257
20333
  context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
20258
20334
  for (var i = 1; i < points.length; i++) {
@@ -20429,6 +20505,7 @@
20429
20505
  key: "_drawSegmentItem",
20430
20506
  value: function _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, connect, fillCb, strokeCb) {
20431
20507
  var _a, _b, _c, _d;
20508
+ if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
20432
20509
  var connectedType = attribute.connectedType,
20433
20510
  connectedX = attribute.connectedX,
20434
20511
  connectedY = attribute.connectedY,
@@ -20437,7 +20514,6 @@
20437
20514
  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) {
20438
20515
  return da.push(i);
20439
20516
  }) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
20440
- if (!cache) return;
20441
20517
  context.beginPath();
20442
20518
  var _area$attribute4 = area.attribute,
20443
20519
  points = _area$attribute4.points,
@@ -20789,7 +20865,15 @@
20789
20865
  _h2 = b.height();
20790
20866
  b.set((null !== (_h = background.x) && void 0 !== _h ? _h : 0) + (null !== (_j = background.dx) && void 0 !== _j ? _j : 0), (null !== (_k = background.y) && void 0 !== _k ? _k : 0) + (null !== (_l = background.dy) && void 0 !== _l ? _l : 0), _w, _h2);
20791
20867
  }
20792
- } else b = graphic.AABBBounds, onlyTranslate || b.set(0, 0, b.width(), b.height());
20868
+ } else b = graphic.AABBBounds, onlyTranslate || (b = getTextBounds(Object.assign(Object.assign({}, graphic.attribute), {
20869
+ angle: 0,
20870
+ scaleX: 1,
20871
+ scaleY: 1,
20872
+ x: 0,
20873
+ y: 0,
20874
+ dx: 0,
20875
+ dy: 0
20876
+ })).clone());
20793
20877
  if (graphic.backgroundImg && graphic.resources) {
20794
20878
  var res = graphic.resources.get(background);
20795
20879
  if ("success" !== res.state || !res.data) return;
@@ -20894,7 +20978,7 @@
20894
20978
  doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(function (line) {
20895
20979
  context.strokeText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z);
20896
20980
  }))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), multilineLayout.lines.forEach(function (line) {
20897
- context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z), _this2.drawMultiUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + x, (line.topOffset || 0) + yOffset + y, z, line.width, textAttribute, context);
20981
+ context.fillText(line.str, (line.leftOffset || 0) + xOffset + x, (line.topOffset || 0) + yOffset + y, z), _this2.drawMultiUnderLine(underline, lineThrough, text, (line.leftOffset || 0) + x, (line.topOffset || 0) + yOffset + y - textDrawOffsetY("bottom", fontSize) - .05 * fontSize, z, line.width, textAttribute, context);
20898
20982
  })));
20899
20983
  } else {
20900
20984
  text.tryUpdateAABBBounds();
@@ -20975,6 +21059,10 @@
20975
21059
  fill = _text$attribute3$fill === void 0 ? textAttribute.fill : _text$attribute3$fill,
20976
21060
  _text$attribute3$opac = _text$attribute3.opacity,
20977
21061
  opacity = _text$attribute3$opac === void 0 ? textAttribute.opacity : _text$attribute3$opac,
21062
+ _text$attribute3$unde = _text$attribute3.underlineOffset,
21063
+ underlineOffset = _text$attribute3$unde === void 0 ? textAttribute.underlineOffset : _text$attribute3$unde,
21064
+ _text$attribute3$unde2 = _text$attribute3.underlineDash,
21065
+ underlineDash = _text$attribute3$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute3$unde2,
20978
21066
  _text$attribute3$fill2 = _text$attribute3.fillOpacity,
20979
21067
  fillOpacity = _text$attribute3$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute3$fill2,
20980
21068
  w = text.clipedWidth,
@@ -20987,8 +21075,8 @@
20987
21075
  strokeOpacity: fillOpacity
20988
21076
  };
20989
21077
  if (underline) {
20990
- attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
20991
- var dy = y + offsetY + fontSize;
21078
+ attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
21079
+ var dy = y + offsetY + fontSize + underlineOffset;
20992
21080
  context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
20993
21081
  }
20994
21082
  if (lineThrough) {
@@ -21010,6 +21098,10 @@
21010
21098
  fill = _text$attribute4$fill === void 0 ? textAttribute.fill : _text$attribute4$fill,
21011
21099
  _text$attribute4$opac = _text$attribute4.opacity,
21012
21100
  opacity = _text$attribute4$opac === void 0 ? textAttribute.opacity : _text$attribute4$opac,
21101
+ _text$attribute4$unde = _text$attribute4.underlineOffset,
21102
+ underlineOffset = _text$attribute4$unde === void 0 ? textAttribute.underlineOffset : _text$attribute4$unde,
21103
+ _text$attribute4$unde2 = _text$attribute4.underlineDash,
21104
+ underlineDash = _text$attribute4$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute4$unde2,
21013
21105
  _text$attribute4$fill2 = _text$attribute4.fillOpacity,
21014
21106
  fillOpacity = _text$attribute4$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute4$fill2,
21015
21107
  offsetX = textDrawOffsetX(textAlign, w),
@@ -21022,8 +21114,8 @@
21022
21114
  };
21023
21115
  var deltaY = -3;
21024
21116
  if (underline) {
21025
- attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
21026
- var dy = y + offsetY + fontSize + deltaY;
21117
+ attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
21118
+ var dy = y + offsetY + fontSize + deltaY + underlineOffset;
21027
21119
  context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
21028
21120
  }
21029
21121
  if (deltaY = -1, lineThrough) {
@@ -22361,7 +22453,7 @@
22361
22453
  key: "getRenderContribution",
22362
22454
  value: function getRenderContribution(graphic) {
22363
22455
  var renderer;
22364
- return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
22456
+ return renderer || (renderer = this.selectRenderByNumberType(graphic.numberType, graphic)), renderer || (renderer = this.selectRenderByType(graphic.type)), renderer;
22365
22457
  }
22366
22458
  }, {
22367
22459
  key: "renderItem",
@@ -22400,8 +22492,13 @@
22400
22492
  }
22401
22493
  }, {
22402
22494
  key: "selectRenderByNumberType",
22403
- value: function selectRenderByNumberType(type) {
22404
- return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
22495
+ value: function selectRenderByNumberType(type, graphic) {
22496
+ var data;
22497
+ if (graphic.attribute.renderStyle) {
22498
+ var currentRenderMap = this.styleRenderMap.get(graphic.attribute.renderStyle);
22499
+ data = currentRenderMap && currentRenderMap.get(type);
22500
+ }
22501
+ return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
22405
22502
  }
22406
22503
  }, {
22407
22504
  key: "clearScreen",
@@ -26048,13 +26145,19 @@
26048
26145
  doStroke = data.doStroke,
26049
26146
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
26050
26147
  _arc$attribute = arc.attribute,
26051
- _arc$attribute$outerR = _arc$attribute.outerRadius,
26052
- outerRadius = _arc$attribute$outerR === void 0 ? arcAttribute.outerRadius : _arc$attribute$outerR,
26053
- _arc$attribute$innerR = _arc$attribute.innerRadius,
26054
- innerRadius = _arc$attribute$innerR === void 0 ? arcAttribute.innerRadius : _arc$attribute$innerR,
26148
+ _arc$attribute$outerP = _arc$attribute.outerPadding,
26149
+ outerPadding = _arc$attribute$outerP === void 0 ? arcAttribute.outerPadding : _arc$attribute$outerP,
26150
+ _arc$attribute$innerP = _arc$attribute.innerPadding,
26151
+ innerPadding = _arc$attribute$innerP === void 0 ? arcAttribute.innerPadding : _arc$attribute$innerP,
26055
26152
  _arc$attribute$height = _arc$attribute.height,
26056
- height = _arc$attribute$height === void 0 ? 10 : _arc$attribute$height,
26057
- rgbArray = ColorStore.Get(fill, exports.ColorType.Color255),
26153
+ height = _arc$attribute$height === void 0 ? 10 : _arc$attribute$height;
26154
+ var _arc$attribute2 = arc.attribute,
26155
+ _arc$attribute2$outer = _arc$attribute2.outerRadius,
26156
+ outerRadius = _arc$attribute2$outer === void 0 ? arcAttribute.outerRadius : _arc$attribute2$outer,
26157
+ _arc$attribute2$inner = _arc$attribute2.innerRadius,
26158
+ innerRadius = _arc$attribute2$inner === void 0 ? arcAttribute.innerRadius : _arc$attribute2$inner;
26159
+ outerRadius += outerPadding, innerRadius -= innerPadding;
26160
+ var rgbArray = ColorStore.Get(fill, exports.ColorType.Color255),
26058
26161
  _ref = drawContext.stage || {},
26059
26162
  light = _ref.light,
26060
26163
  face = drawContext.hack_pieFace,
@@ -29096,9 +29199,11 @@
29096
29199
  function jsx(type, config) {
29097
29200
  var _a = config || {};
29098
29201
  _a.key;
29202
+ _a.name;
29203
+ _a.id;
29099
29204
  var attribute = _a.attribute,
29100
29205
  stateProxy = _a.stateProxy,
29101
- props = __rest(_a, ["key", "attribute", "stateProxy"]);
29206
+ props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy"]);
29102
29207
  var c = type;
29103
29208
  isString$1(type) && (c = graphicCreator[type]);
29104
29209
  var childrenList = [];
@@ -29142,14 +29247,21 @@
29142
29247
  attribute = _dom$props.attribute,
29143
29248
  children = _dom$props.children,
29144
29249
  stateProxy = _dom$props.stateProxy,
29250
+ id = _dom$props.id,
29251
+ name = _dom$props.name,
29145
29252
  g = type({
29146
29253
  attribute: attribute
29147
29254
  }),
29148
29255
  out = parseToGraphic(g, dom.props, children);
29149
- return out || (stateProxy && (g.stateProxy = stateProxy), g.id = attribute.id, g.name = attribute.name, isArray$1(children) ? children.forEach(function (item) {
29150
- var c = decodeReactDom(item);
29151
- c && c.type && g.add(c);
29152
- }) : children && g.add(decodeReactDom(children)), g);
29256
+ return out || (stateProxy && (g.stateProxy = stateProxy), g.id = id, g.name = name, parseChildren(children, g), g);
29257
+ }
29258
+ function parseChildren(children, g) {
29259
+ isArray$1(children) ? children.forEach(function (item) {
29260
+ if (isArray$1(item)) parseChildren(item, g);else {
29261
+ var c = decodeReactDom(item);
29262
+ c && c.type && g.add(c);
29263
+ }
29264
+ }) : children && g.add(decodeReactDom(children));
29153
29265
  }
29154
29266
  function parseToGraphic(g, props, childrenList) {
29155
29267
  var out,
@@ -31734,7 +31846,7 @@
31734
31846
  }, {
31735
31847
  key: "getTitle",
31736
31848
  value: function getTitle() {
31737
- return this.canvas.id.toString();
31849
+ return this.canvas.id && this.canvas.id.toString();
31738
31850
  }
31739
31851
  }, {
31740
31852
  key: "getWH",
@@ -31898,11 +32010,11 @@
31898
32010
  try {
31899
32011
  ng = !!lynx.createCanvasNG;
31900
32012
  } catch (err) {}
31901
- function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
32013
+ function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, offscreen, pixelRatio) {
31902
32014
  var dpr = null != pixelRatio ? pixelRatio : SystemInfo.pixelRatio;
31903
32015
  canvasIdLists.forEach(function (id, i) {
31904
- var _canvas = ng ? lynx.createCanvasNG(id) : lynx.createCanvas(id);
31905
- _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr, ng && _canvas.attachToCanvasView(id);
32016
+ var _canvas;
32017
+ offscreen ? _canvas = lynx.createOffscreenCanvas() : (_canvas = ng ? lynx.createCanvasNG(id) : lynx.createCanvas(id), ng && _canvas.attachToCanvasView(id)), _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr;
31906
32018
  var ctx = _canvas.getContext("2d"),
31907
32019
  canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, domref.width, domref.height, id);
31908
32020
  canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
@@ -31938,7 +32050,7 @@
31938
32050
  _createClass(LynxEnvContribution, [{
31939
32051
  key: "configure",
31940
32052
  value: function configure(service, params) {
31941
- service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.pixelRatio));
32053
+ service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, !!params.offscreen, params.pixelRatio));
31942
32054
  }
31943
32055
  }, {
31944
32056
  key: "getDynamicCanvasCount",
@@ -35072,7 +35184,7 @@
35072
35184
 
35073
35185
  var roughModule = _roughModule;
35074
35186
 
35075
- const version = "0.18.0-alpha.4";
35187
+ const version = "0.18.0-alpha.5";
35076
35188
  preLoadAllModule();
35077
35189
  if (isBrowserEnv()) {
35078
35190
  loadBrowserEnv(container);