@visactor/vrender 0.21.9-alpha.1 → 0.21.9

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
@@ -3369,7 +3369,7 @@
3369
3369
  default:
3370
3370
  if (this._t <= 0) this.context.lineTo(this._x, y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p);else {
3371
3371
  const x1 = this._x * (1 - this._t) + x * this._t;
3372
- this.context.lineTo(x1, this._y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x1, y, !1 !== this._lastDefined && !1 !== p.defined, p);
3372
+ .5 === this._t ? this.context.lineTo(x1, this._y, !1 !== this._lastDefined, this.lastPoint) : this.context.lineTo(x1, this._y, !1 !== this._lastDefined && !1 !== p.defined, this.lastPoint), this.context.lineTo(x1, y, !1 !== this._lastDefined && !1 !== p.defined, p);
3373
3373
  }
3374
3374
  }
3375
3375
  this._lastDefined = p.defined, this._x = x, this._y = y, this.lastPoint = p;
@@ -7202,7 +7202,7 @@
7202
7202
  let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
7203
7203
  let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
7204
7204
  let slience = arguments.length > 2 ? arguments[2] : undefined;
7205
- this.id = id, this.timeline = timeline, this.status = exports.AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
7205
+ this.id = id, this.timeline = timeline || defaultTimeline, this.status = exports.AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
7206
7206
  }
7207
7207
  setTimeline(timeline) {
7208
7208
  timeline !== this.timeline && (this.timeline.removeAnimate(this, !1), timeline.addAnimate(this));
@@ -12914,7 +12914,7 @@
12914
12914
  this._draw(line, lineAttribute, !1, drawContext, params);
12915
12915
  }
12916
12916
  drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
12917
- var _a, _b, _c, _d, _e;
12917
+ var _a;
12918
12918
  if (!cache) return;
12919
12919
  context.beginPath();
12920
12920
  const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
@@ -12927,27 +12927,7 @@
12927
12927
  x: originX = 0,
12928
12928
  x: originY = 0
12929
12929
  } = attribute;
12930
- !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke()));
12931
- let {
12932
- connectedType: connectedType,
12933
- connectedX: connectedX,
12934
- connectedY: connectedY,
12935
- connectedStyle: connectedStyle
12936
- } = attribute;
12937
- if (isArray$1(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : 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"), "none" !== connectedType) {
12938
- context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
12939
- offsetX: offsetX,
12940
- offsetY: offsetY,
12941
- offsetZ: z,
12942
- drawConnect: !0,
12943
- mode: connectedType,
12944
- zeroX: connectedX,
12945
- zeroY: connectedY
12946
- });
12947
- const da = [];
12948
- isArray$1(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
12949
- }
12950
- return !1;
12930
+ return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke())), !1;
12951
12931
  }
12952
12932
  drawLinearLineHighPerformance(line, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, lineAttribute, drawContext, params, fillCb, strokeCb) {
12953
12933
  var _a;
@@ -12979,7 +12959,8 @@
12979
12959
  segments: segments,
12980
12960
  points: points,
12981
12961
  closePath: closePath,
12982
- curveTension = lineAttribute.curveTension
12962
+ curveTension = lineAttribute.curveTension,
12963
+ connectedType = lineAttribute.connectedType
12983
12964
  } = line.attribute;
12984
12965
  if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
12985
12966
  let {
@@ -12991,6 +12972,9 @@
12991
12972
  clipRangeByDimension = lineAttribute.clipRangeByDimension
12992
12973
  } = line.attribute;
12993
12974
  if (1 === clipRange && !segments && !points.some(p => !1 === p.defined) && "linear" === curveType) return this.drawLinearLineHighPerformance(line, context, !!fill, !!stroke, fillOpacity, strokeOpacity, x, y, lineAttribute, drawContext, params, fillCb, strokeCb);
12975
+ function parsePoint(points, connectedType) {
12976
+ return "none" === connectedType ? points : points.filter(p => !1 !== p.defined);
12977
+ }
12994
12978
  if (line.shouldUpdateShape()) {
12995
12979
  const {
12996
12980
  points: points,
@@ -13012,7 +12996,7 @@
13012
12996
  y: lastSeg.endY,
13013
12997
  defined: lastSeg.curves[lastSeg.curves.length - 1].defined
13014
12998
  } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
13015
- const data = calcLineCache(seg.points, curveType, {
12999
+ const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
13016
13000
  startPoint: startPoint,
13017
13001
  curveTension: curveTension
13018
13002
  });
@@ -13031,7 +13015,7 @@
13031
13015
  }
13032
13016
  } else {
13033
13017
  if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
13034
- line.cache = calcLineCache(_points, curveType, {
13018
+ line.cache = calcLineCache(parsePoint(_points, connectedType), curveType, {
13035
13019
  curveTension: curveTension
13036
13020
  });
13037
13021
  }
@@ -13063,11 +13047,6 @@
13063
13047
 
13064
13048
  function drawAreaSegments(path, segPath, percent, params) {
13065
13049
  var _a;
13066
- const {
13067
- drawConnect = !1,
13068
- mode = "none"
13069
- } = params || {};
13070
- if (drawConnect && "none" === mode) return;
13071
13050
  const {
13072
13051
  top: top,
13073
13052
  bottom: bottom
@@ -13077,34 +13056,11 @@
13077
13056
  const topList = [],
13078
13057
  bottomList = [];
13079
13058
  let lastDefined = !0;
13080
- if (drawConnect) {
13081
- let lastCurve,
13082
- lastBottomCurve,
13083
- defined0 = !0;
13084
- const n = top.curves.length;
13085
- top.curves.forEach((curve, i) => {
13086
- const bototmCurve = bottom.curves[n - i - 1];
13087
- let currentTopCurve = curve,
13088
- currentBottomCurve = bototmCurve;
13089
- if (curve.originP1 === curve.originP2) return lastCurve = curve, void (lastBottomCurve = bototmCurve);
13090
- if (lastCurve && lastCurve.originP1 === lastCurve.originP2 && (currentTopCurve = lastCurve, currentBottomCurve = lastBottomCurve), curve.defined) defined0 || (topList.push(currentTopCurve), bottomList.push(currentBottomCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0, defined0 = !defined0);else {
13091
- const {
13092
- originP1: originP1,
13093
- originP2: originP2
13094
- } = curve;
13095
- let validTopCurve, validBottomCurve;
13096
- originP1 && !1 !== originP1.defined ? (validTopCurve = currentTopCurve, validBottomCurve = currentBottomCurve) : originP1 && !1 !== originP2.defined && (validTopCurve = curve, validBottomCurve = bototmCurve), defined0 ? (defined0 = !defined0, topList.push(validTopCurve || curve), bottomList.push(validBottomCurve || bototmCurve)) : validTopCurve && (defined0 = !defined0, topList.push(validTopCurve || curve), bottomList.push(validBottomCurve || bototmCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0);
13097
- }
13098
- lastCurve = curve;
13099
- }), drawAreaConnectBlock(path, topList, bottomList, params);
13100
- } else {
13101
- for (let i = 0, n = top.curves.length; i < n; i++) {
13102
- const topCurve = top.curves[i];
13103
- lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1])), lastDefined = !lastDefined) : lastDefined && (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1]));
13104
- }
13105
- drawAreaBlock(path, topList, bottomList, params);
13059
+ for (let i = 0, n = top.curves.length; i < n; i++) {
13060
+ const topCurve = top.curves[i];
13061
+ lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1])), lastDefined = !lastDefined) : lastDefined && (topList.push(topCurve), bottomList.push(bottom.curves[n - i - 1]));
13106
13062
  }
13107
- return;
13063
+ return void drawAreaBlock(path, topList, bottomList, params);
13108
13064
  }
13109
13065
  if (percent <= 0) return;
13110
13066
  let {
@@ -13122,51 +13078,17 @@
13122
13078
  lastDefined = !0;
13123
13079
  const topList = [],
13124
13080
  bottomList = [];
13125
- let lastTopCurve,
13126
- lastBottomCurve,
13127
- defined0 = !0;
13128
13081
  for (let i = 0, n = top.curves.length; i < n; i++) {
13129
13082
  const topCurve = top.curves[i],
13130
13083
  curCurveLength = topCurve.getLength(direction),
13131
13084
  percent = (totalDrawLength - drawedLengthUntilLast) / curCurveLength;
13132
13085
  if (percent < 0) break;
13133
- if (drawedLengthUntilLast += curCurveLength, drawConnect) {
13134
- const bototmCurve = bottom.curves[n - i - 1];
13135
- let currentTopCurve = topCurve,
13136
- currentBottomCurve = bototmCurve;
13137
- if (topCurve.originP1 === topCurve.originP2) {
13138
- lastTopCurve = topCurve, lastBottomCurve = bototmCurve;
13139
- continue;
13140
- }
13141
- if (lastTopCurve && lastTopCurve.originP1 === lastTopCurve.originP2 && (currentTopCurve = lastTopCurve, currentBottomCurve = lastBottomCurve), topCurve.defined) defined0 || (topList.push(currentTopCurve), bottomList.push(currentBottomCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0, defined0 = !defined0);else {
13142
- const {
13143
- originP1: originP1,
13144
- originP2: originP2
13145
- } = topCurve;
13146
- let validTopCurve, validBottomCurve;
13147
- originP1 && !1 !== originP1.defined ? (validTopCurve = currentTopCurve, validBottomCurve = currentBottomCurve) : originP1 && !1 !== originP2.defined && (validTopCurve = topCurve, validBottomCurve = bototmCurve), defined0 ? (defined0 = !defined0, topList.push(validTopCurve || topCurve), bottomList.push(validBottomCurve || bototmCurve)) : validTopCurve && (defined0 = !defined0, topList.push(validTopCurve || topCurve), bottomList.push(validBottomCurve || bototmCurve), drawAreaConnectBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0);
13148
- }
13149
- lastTopCurve = topCurve;
13150
- } else {
13151
- let tc = null,
13152
- bc = null;
13153
- lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (tc = topCurve, bc = bottom.curves[n - i - 1]), lastDefined = !lastDefined) : lastDefined && (tc = topCurve, bc = bottom.curves[n - i - 1]), tc && bc && (percent < 1 && (tc = tc.p2 && tc.p3 ? divideCubic(tc, percent)[0] : divideLinear(tc, percent)[0], bc = bc.p2 && bc.p3 ? divideCubic(bc, 1 - percent)[1] : divideLinear(bc, 1 - percent)[1]), tc.defined = lastDefined, bc.defined = lastDefined, topList.push(tc), bottomList.push(bc)), tc = null, bc = null;
13154
- }
13086
+ drawedLengthUntilLast += curCurveLength;
13087
+ let tc = null,
13088
+ bc = null;
13089
+ lastDefined !== topCurve.defined ? (lastDefined ? (drawAreaBlock(path, topList, bottomList, params), topList.length = 0, bottomList.length = 0) : (tc = topCurve, bc = bottom.curves[n - i - 1]), lastDefined = !lastDefined) : lastDefined && (tc = topCurve, bc = bottom.curves[n - i - 1]), tc && bc && (percent < 1 && (tc = tc.p2 && tc.p3 ? divideCubic(tc, percent)[0] : divideLinear(tc, percent)[0], bc = bc.p2 && bc.p3 ? divideCubic(bc, 1 - percent)[1] : divideLinear(bc, 1 - percent)[1]), tc.defined = lastDefined, bc.defined = lastDefined, topList.push(tc), bottomList.push(bc)), tc = null, bc = null;
13155
13090
  }
13156
- drawConnect ? drawAreaConnectBlock(path, topList, bottomList, params) : drawAreaBlock(path, topList, bottomList, params);
13157
- }
13158
- function drawAreaConnectBlock(path, topList, bottomList, params) {
13159
- if (topList.length < 2) return;
13160
- const {
13161
- offsetX = 0,
13162
- offsetY = 0,
13163
- offsetZ = 0,
13164
- mode: mode
13165
- } = params || {};
13166
- let curve = topList[0];
13167
- path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), curve = topList[topList.length - 1];
13168
- let end = curve.p3 || curve.p1;
13169
- path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ), curve = bottomList[bottomList.length - 1], path.lineTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), curve = bottomList[0], end = curve.p3 || curve.p1, path.lineTo(end.x + offsetX, end.y + offsetY, offsetZ), path.closePath();
13091
+ drawAreaBlock(path, topList, bottomList, params);
13170
13092
  }
13171
13093
  function drawAreaBlock(path, topList, bottomList, params) {
13172
13094
  const {
@@ -13267,7 +13189,8 @@
13267
13189
  fillOpacity = areaAttribute.fillOpacity,
13268
13190
  z = areaAttribute.z,
13269
13191
  strokeOpacity = areaAttribute.strokeOpacity,
13270
- curveTension = areaAttribute.curveTension
13192
+ curveTension = areaAttribute.curveTension,
13193
+ connectedType = areaAttribute.connectedType
13271
13194
  } = area.attribute,
13272
13195
  data = this.valid(area, areaAttribute, fillCb, strokeCb);
13273
13196
  if (!data) return;
@@ -13284,6 +13207,9 @@
13284
13207
  let {
13285
13208
  curveType = areaAttribute.curveType
13286
13209
  } = area.attribute;
13210
+ function parsePoint(points, connectedType) {
13211
+ return "connect" !== connectedType ? points : points.filter(p => !1 !== p.defined);
13212
+ }
13287
13213
  if (closePath && "linear" === curveType && (curveType = "linearClosed"), 1 === clipRange && !segments && !points.some(p => !1 === p.defined) && "linear" === curveType) return this.drawLinearAreaHighPerformance(area, context, !!fill, doStroke, fillOpacity, strokeOpacity, x, y, areaAttribute, drawContext, params, fillCb, strokeCb);
13288
13214
  if (area.shouldUpdateShape()) {
13289
13215
  if (segments && segments.length) {
@@ -13297,7 +13223,7 @@
13297
13223
  x: lastTopSeg.endX,
13298
13224
  y: lastTopSeg.endY
13299
13225
  } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
13300
- const data = calcLineCache(seg.points, curveType, {
13226
+ const data = calcLineCache(parsePoint(seg.points, connectedType), curveType, {
13301
13227
  startPoint: startPoint,
13302
13228
  curveTension: curveTension
13303
13229
  });
@@ -13320,7 +13246,7 @@
13320
13246
  y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
13321
13247
  });
13322
13248
  }
13323
- bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
13249
+ bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(parsePoint(bottomPoints, connectedType), "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
13324
13250
  curveTension: curveTension
13325
13251
  }), bottomCaches.unshift(lastBottomSeg));
13326
13252
  }
@@ -13331,11 +13257,11 @@
13331
13257
  } else {
13332
13258
  if (!points || !points.length) return area.cacheArea = null, void area.clearUpdateShapeTag();
13333
13259
  {
13334
- const topPoints = points,
13260
+ const topPoints = parsePoint(points, connectedType),
13335
13261
  bottomPoints = [];
13336
- for (let i = points.length - 1; i >= 0; i--) bottomPoints.push({
13337
- x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : points[i].x,
13338
- y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : points[i].y
13262
+ for (let i = topPoints.length - 1; i >= 0; i--) bottomPoints.push({
13263
+ x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : topPoints[i].x,
13264
+ y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : topPoints[i].y
13339
13265
  });
13340
13266
  const topCache = calcLineCache(topPoints, curveType, {
13341
13267
  curveTension: curveTension
@@ -13377,20 +13303,10 @@
13377
13303
  this._draw(area, areaAttribute, !1, drawContext, params);
13378
13304
  }
13379
13305
  drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
13380
- let ret = !1;
13381
- return ret = ret || this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, !1, fillCb, strokeCb), ret = ret || this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, !0, fillCb, strokeCb), ret;
13306
+ return this._drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb);
13382
13307
  }
13383
- _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, connect, fillCb, strokeCb) {
13384
- var _a, _b, _c, _d;
13308
+ _drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
13385
13309
  if (!(cache && cache.top && cache.bottom && cache.top.curves && cache.top.curves.length && cache.bottom.curves && cache.bottom.curves.length)) return;
13386
- let {
13387
- connectedType: connectedType,
13388
- connectedX: connectedX,
13389
- connectedY: connectedY,
13390
- connectedStyle: connectedStyle
13391
- } = attribute;
13392
- const da = [];
13393
- 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(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
13394
13310
  context.beginPath();
13395
13311
  const {
13396
13312
  points: points,
@@ -13409,11 +13325,7 @@
13409
13325
  offsetX: offsetX,
13410
13326
  offsetY: offsetY,
13411
13327
  offsetZ: offsetZ,
13412
- direction: direction,
13413
- drawConnect: connect,
13414
- mode: connectedType,
13415
- zeroX: connectedX,
13416
- zeroY: connectedY
13328
+ direction: direction
13417
13329
  }), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
13418
13330
  attribute: attribute
13419
13331
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute);
@@ -13421,7 +13333,7 @@
13421
13333
  x: originX = 0,
13422
13334
  x: originY = 0
13423
13335
  } = attribute;
13424
- return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
13336
+ return !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, defaultAttribute, drawContext, fillCb, null, {
13425
13337
  attribute: attribute
13426
13338
  }), (() => {
13427
13339
  if (!1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
@@ -13431,12 +13343,8 @@
13431
13343
  isArray$1(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === exports.Direction.ROW ? "x" : "y", {
13432
13344
  offsetX: offsetX,
13433
13345
  offsetY: offsetY,
13434
- offsetZ: offsetZ,
13435
- drawConnect: connect,
13436
- mode: connectedType,
13437
- zeroX: connectedX,
13438
- zeroY: connectedY
13439
- })), context.setStrokeStyle(area, connect ? connectedStyle : attribute, originX - offsetX, originY - offsetY, connect ? da : defaultAttribute), context.stroke();
13346
+ offsetZ: offsetZ
13347
+ })), context.setStrokeStyle(area, attribute, originX - offsetX, originY - offsetY, defaultAttribute), context.stroke();
13440
13348
  }
13441
13349
  })(), !1;
13442
13350
  }
@@ -15894,7 +15802,7 @@
15894
15802
  } = attribute,
15895
15803
  b = aabbBounds;
15896
15804
  return points.forEach(p => {
15897
- !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15805
+ !1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
15898
15806
  }), b;
15899
15807
  }
15900
15808
  updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
@@ -15905,7 +15813,7 @@
15905
15813
  b = aabbBounds;
15906
15814
  return segments.forEach(s => {
15907
15815
  s.points.forEach(p => {
15908
- !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15816
+ !1 === p.defined && "connect" !== connectedType || b.add(p.x, p.y);
15909
15817
  });
15910
15818
  }), b;
15911
15819
  }
@@ -26091,7 +25999,13 @@
26091
25999
  measureText(text) {
26092
26000
  let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
26093
26001
  this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
26094
- return super.measureText(text, method);
26002
+ return {
26003
+ width: super.measureText(text, method).width,
26004
+ fontBoundingBoxDescent: void 0,
26005
+ fontBoundingBoxAscent: void 0,
26006
+ actualBoundingBoxAscent: void 0,
26007
+ actualBoundingBoxDescent: void 0
26008
+ };
26095
26009
  }
26096
26010
  createPattern(image, repetition) {
26097
26011
  return null;
@@ -29475,7 +29389,7 @@
29475
29389
 
29476
29390
  const roughModule = _roughModule;
29477
29391
 
29478
- const version = "0.21.9-alpha.1";
29392
+ const version = "0.21.9";
29479
29393
  preLoadAllModule();
29480
29394
  if (isBrowserEnv()) {
29481
29395
  loadBrowserEnv(container);