@visactor/vrender 0.17.9 → 0.17.10

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 CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@visactor/vrender-core';
2
- export declare const version = "0.17.9";
2
+ export declare const version = "0.17.10";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
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.9", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
24
+ exports.version = "0.17.10", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
25
25
  vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
26
26
  vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
27
27
  (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
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,QAAQ,CAAC;AAEhC,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.9\";\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"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,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.10\";\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
@@ -4278,6 +4278,10 @@
4278
4278
  var defined0 = !1;
4279
4279
  for (var i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
4280
4280
  }
4281
+ function genSegContext(curveType, direction, points) {
4282
+ var curveDirection = null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN;
4283
+ return "monotoneY" === curveType ? new ReflectSegContext(curveType, curveDirection) : new SegContext(curveType, curveDirection);
4284
+ }
4281
4285
 
4282
4286
  var Linear = /*#__PURE__*/function () {
4283
4287
  function Linear(context, startPoint) {
@@ -4333,7 +4337,7 @@
4333
4337
  var direction = params.direction,
4334
4338
  startPoint = params.startPoint;
4335
4339
  if (points.length < 2 - Number(!!startPoint)) return null;
4336
- var segContext = new SegContext("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4340
+ var segContext = genSegContext("linear", direction, points);
4337
4341
  return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
4338
4342
  }
4339
4343
  function genLinearTypeSegments(path, points) {
@@ -4403,7 +4407,7 @@
4403
4407
  startPoint = params.startPoint;
4404
4408
  if (points.length < 2 - Number(!!startPoint)) return null;
4405
4409
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4406
- var segContext = new SegContext("basis", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4410
+ var segContext = genSegContext("basis", direction, points);
4407
4411
  return genBasisTypeSegments(new Basis(segContext, startPoint), points), segContext;
4408
4412
  }
4409
4413
 
@@ -4510,7 +4514,7 @@
4510
4514
  }]);
4511
4515
  return MonotoneY;
4512
4516
  }(MonotoneX);
4513
- function genMonotpneXTypeSegments(path, points) {
4517
+ function genMonotoneXTypeSegments(path, points) {
4514
4518
  return genCurveSegments(path, points);
4515
4519
  }
4516
4520
  function genMonotoneXSegments(points) {
@@ -4519,10 +4523,10 @@
4519
4523
  startPoint = params.startPoint;
4520
4524
  if (points.length < 2 - Number(!!startPoint)) return null;
4521
4525
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4522
- var segContext = new SegContext("monotoneX", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4523
- return genMonotpneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
4526
+ var segContext = genSegContext("monotoneX", direction, points);
4527
+ return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
4524
4528
  }
4525
- function genMonotpneYTypeSegments(path, points) {
4529
+ function genMonotoneYTypeSegments(path, points) {
4526
4530
  return genCurveSegments(path, points);
4527
4531
  }
4528
4532
  function genMonotoneYSegments(points) {
@@ -4531,8 +4535,8 @@
4531
4535
  startPoint = params.startPoint;
4532
4536
  if (points.length < 2 - Number(!!startPoint)) return null;
4533
4537
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4534
- var segContext = new ReflectSegContext("monotoneY", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4535
- return genMonotpneYTypeSegments(new MonotoneY(segContext, startPoint), points), segContext;
4538
+ var segContext = genSegContext("monotoneY", direction, points);
4539
+ return genMonotoneYTypeSegments(new MonotoneY(segContext, startPoint), points), segContext;
4536
4540
  }
4537
4541
 
4538
4542
  var Step$1 = /*#__PURE__*/function () {
@@ -4601,61 +4605,27 @@
4601
4605
  return genCurveSegments(path, points);
4602
4606
  }
4603
4607
 
4604
- var LinearClosed = /*#__PURE__*/function () {
4605
- function LinearClosed(context, startPoint) {
4608
+ var LinearClosed = /*#__PURE__*/function (_Linear) {
4609
+ _inherits(LinearClosed, _Linear);
4610
+ var _super = _createSuper(LinearClosed);
4611
+ function LinearClosed() {
4606
4612
  _classCallCheck(this, LinearClosed);
4607
- this.context = context, startPoint && (this.startPoint = startPoint);
4613
+ return _super.apply(this, arguments);
4608
4614
  }
4609
4615
  _createClass(LinearClosed, [{
4610
- key: "areaStart",
4611
- value: function areaStart() {
4612
- this._line = 0;
4613
- }
4614
- }, {
4615
- key: "areaEnd",
4616
- value: function areaEnd() {
4617
- this._line = NaN;
4618
- }
4619
- }, {
4620
- key: "lineStart",
4621
- value: function lineStart() {
4622
- this._point = 0, this.startPoint && this.point(this.startPoint);
4623
- }
4624
- }, {
4625
4616
  key: "lineEnd",
4626
4617
  value: function lineEnd() {
4627
4618
  this.context.closePath();
4628
4619
  }
4629
- }, {
4630
- key: "point",
4631
- value: function point(p) {
4632
- var x = p.x,
4633
- y = p.y;
4634
- switch (this._point) {
4635
- case 0:
4636
- this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p) : this.context.moveTo(x, y, p);
4637
- break;
4638
- case 1:
4639
- this._point = 2;
4640
- default:
4641
- this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p);
4642
- }
4643
- this._lastDefined = p.defined;
4644
- }
4645
- }, {
4646
- key: "tryUpdateLength",
4647
- value: function tryUpdateLength() {
4648
- return this.context.tryUpdateLength();
4649
- }
4650
4620
  }]);
4651
4621
  return LinearClosed;
4652
- }();
4622
+ }(Linear);
4653
4623
  function genLinearClosedSegments(points) {
4654
4624
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4655
4625
  var direction = params.direction,
4656
4626
  startPoint = params.startPoint;
4657
4627
  if (points.length < 2 - Number(!!startPoint)) return null;
4658
- var segContext = new SegContext("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4628
+ var segContext = genSegContext("linear", direction, points);
4659
4629
  return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
4660
4630
  }
4661
4631
  function genLinearClosedTypeSegments(path, points) {
@@ -5210,6 +5180,8 @@
5210
5180
  strokeSeg: null,
5211
5181
  pickable: !0,
5212
5182
  childrenPickable: !0,
5183
+ fillPickable: !0,
5184
+ strokePickable: !0,
5213
5185
  visible: !0,
5214
5186
  zIndex: 0,
5215
5187
  layout: null,
@@ -18526,6 +18498,7 @@
18526
18498
  return DefaultBaseInteractiveRenderContribution;
18527
18499
  }();
18528
18500
  exports.DefaultBaseInteractiveRenderContribution = __decorate$1w([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(InteractiveSubRenderContribution)), __metadata$19("design:paramtypes", [Object])], exports.DefaultBaseInteractiveRenderContribution);
18501
+
18529
18502
  var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
18530
18503
  function DefaultBaseTextureRenderContribution() {
18531
18504
  _classCallCheck(this, DefaultBaseTextureRenderContribution);
@@ -18626,16 +18599,20 @@
18626
18599
  key: "drawShape",
18627
18600
  value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
18628
18601
  this.textureMap || this.initTextureMap(context, graphic.stage);
18629
- var _graphic$attribute2 = graphic.attribute,
18630
- _graphic$attribute2$t = _graphic$attribute2.texture,
18631
- texture = _graphic$attribute2$t === void 0 ? graphicAttribute.texture : _graphic$attribute2$t,
18632
- _graphic$attribute2$t2 = _graphic$attribute2.textureColor,
18633
- textureColor = _graphic$attribute2$t2 === void 0 ? graphicAttribute.textureColor : _graphic$attribute2$t2,
18634
- _graphic$attribute2$t3 = _graphic$attribute2.textureSize,
18635
- textureSize = _graphic$attribute2$t3 === void 0 ? graphicAttribute.textureSize : _graphic$attribute2$t3,
18636
- _graphic$attribute2$t4 = _graphic$attribute2.texturePadding,
18637
- texturePadding = _graphic$attribute2$t4 === void 0 ? graphicAttribute.texturePadding : _graphic$attribute2$t4;
18638
- if (!texture) return;
18602
+ var _graphic$attribute = graphic.attribute,
18603
+ _graphic$attribute$te = _graphic$attribute.texture,
18604
+ texture = _graphic$attribute$te === void 0 ? graphicAttribute.texture : _graphic$attribute$te,
18605
+ _graphic$attribute$te2 = _graphic$attribute.textureColor,
18606
+ textureColor = _graphic$attribute$te2 === void 0 ? graphicAttribute.textureColor : _graphic$attribute$te2,
18607
+ _graphic$attribute$te3 = _graphic$attribute.textureSize,
18608
+ textureSize = _graphic$attribute$te3 === void 0 ? graphicAttribute.textureSize : _graphic$attribute$te3,
18609
+ _graphic$attribute$te4 = _graphic$attribute.texturePadding,
18610
+ texturePadding = _graphic$attribute$te4 === void 0 ? graphicAttribute.texturePadding : _graphic$attribute$te4;
18611
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
18612
+ }
18613
+ }, {
18614
+ key: "drawTexture",
18615
+ value: function drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
18639
18616
  var pattern = this.textureMap.get(texture);
18640
18617
  if (!pattern) switch (texture) {
18641
18618
  case "circle":
@@ -19151,6 +19128,37 @@
19151
19128
  var defaultSymbolTextureRenderContribution = defaultBaseTextureRenderContribution;
19152
19129
  var defaultSymbolBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
19153
19130
 
19131
+ var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
19132
+ _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
19133
+ var _super = _createSuper(DefaultAreaTextureRenderContribution);
19134
+ function DefaultAreaTextureRenderContribution() {
19135
+ var _this;
19136
+ _classCallCheck(this, DefaultAreaTextureRenderContribution);
19137
+ _this = _super.apply(this, arguments), _this.time = exports.BaseRenderContributionTime.afterFillStroke;
19138
+ return _this;
19139
+ }
19140
+ _createClass(DefaultAreaTextureRenderContribution, [{
19141
+ key: "drawShape",
19142
+ value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19143
+ var _a, _b, _c, _d;
19144
+ this.textureMap || this.initTextureMap(context, graphic.stage);
19145
+ var _ref = options || {},
19146
+ _ref$attribute = _ref.attribute,
19147
+ attribute = _ref$attribute === void 0 ? graphic.attribute : _ref$attribute,
19148
+ _attribute$texture = attribute.texture,
19149
+ texture = _attribute$texture === void 0 ? null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList(graphicAttribute, "texture") : _attribute$texture,
19150
+ _attribute$textureCol = attribute.textureColor,
19151
+ textureColor = _attribute$textureCol === void 0 ? null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList(graphicAttribute, "textureColor") : _attribute$textureCol,
19152
+ _attribute$textureSiz = attribute.textureSize,
19153
+ textureSize = _attribute$textureSiz === void 0 ? null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList(graphicAttribute, "textureSize") : _attribute$textureSiz,
19154
+ _attribute$texturePad = attribute.texturePadding,
19155
+ texturePadding = _attribute$texturePad === void 0 ? null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList(graphicAttribute, "texturePadding") : _attribute$texturePad;
19156
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
19157
+ }
19158
+ }]);
19159
+ return DefaultAreaTextureRenderContribution;
19160
+ }(DefaultBaseTextureRenderContribution);
19161
+
19154
19162
  var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19155
19163
  var d,
19156
19164
  c = arguments.length,
@@ -19391,6 +19399,26 @@
19391
19399
  }(BaseRender);
19392
19400
  exports.DefaultCanvasCircleRender = __decorate$1t([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(CircleRenderContribution)), __metadata$17("design:paramtypes", [Object])], exports.DefaultCanvasCircleRender);
19393
19401
 
19402
+ function drawSegItem(ctx, curve, endPercent, params) {
19403
+ if (!curve.p1) return;
19404
+ var _ref = params || {},
19405
+ _ref$offsetX = _ref.offsetX,
19406
+ offsetX = _ref$offsetX === void 0 ? 0 : _ref$offsetX,
19407
+ _ref$offsetY = _ref.offsetY,
19408
+ offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
19409
+ _ref$offsetZ = _ref.offsetZ,
19410
+ offsetZ = _ref$offsetZ === void 0 ? 0 : _ref$offsetZ;
19411
+ if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19412
+ var _divideCubic = divideCubic(curve, endPercent),
19413
+ _divideCubic2 = _slicedToArray(_divideCubic, 1),
19414
+ curve1 = _divideCubic2[0];
19415
+ ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19416
+ } else {
19417
+ var p = curve.getPointAt(endPercent);
19418
+ ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19419
+ }
19420
+ }
19421
+
19394
19422
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
19395
19423
  var _a;
19396
19424
  var _ref = params || {},
@@ -19433,7 +19461,7 @@
19433
19461
  } else _lastCurve = curve;
19434
19462
  });
19435
19463
  } else curves.forEach(function (curve) {
19436
- curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$1(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
19464
+ curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
19437
19465
  });
19438
19466
  return;
19439
19467
  }
@@ -19472,7 +19500,7 @@
19472
19500
  needMoveTo = !0;
19473
19501
  continue;
19474
19502
  }
19475
- needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$1(path, curve, min(_p, 1), params), needMoveTo = !1;
19503
+ needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, min(_p, 1), params), needMoveTo = !1;
19476
19504
  }
19477
19505
  }
19478
19506
  }
@@ -19509,25 +19537,6 @@
19509
19537
  path.lineTo(null !== (_c = startP.x1) && void 0 !== _c ? _c : startP.x, null !== (_d = startP.y1) && void 0 !== _d ? _d : startP.y), path.closePath();
19510
19538
  });
19511
19539
  }
19512
- function drawSegItem$1(ctx, curve, endPercent, params) {
19513
- if (!curve.p1) return;
19514
- var _ref4 = params || {},
19515
- _ref4$offsetX = _ref4.offsetX,
19516
- offsetX = _ref4$offsetX === void 0 ? 0 : _ref4$offsetX,
19517
- _ref4$offsetY = _ref4.offsetY,
19518
- offsetY = _ref4$offsetY === void 0 ? 0 : _ref4$offsetY,
19519
- _ref4$offsetZ = _ref4.offsetZ,
19520
- offsetZ = _ref4$offsetZ === void 0 ? 0 : _ref4$offsetZ;
19521
- if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19522
- var _divideCubic = divideCubic(curve, endPercent),
19523
- _divideCubic2 = _slicedToArray(_divideCubic, 1),
19524
- curve1 = _divideCubic2[0];
19525
- ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19526
- } else {
19527
- var p = curve.getPointAt(endPercent);
19528
- ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19529
- }
19530
- }
19531
19540
 
19532
19541
  var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19533
19542
  var d,
@@ -19599,10 +19608,10 @@
19599
19608
  var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
19600
19609
  points = line.attribute.points,
19601
19610
  startP = points[0];
19602
- context.moveTo(startP.x, startP.y, z);
19611
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19603
19612
  for (var i = 1; i < points.length; i++) {
19604
19613
  var p = points[i];
19605
- context.lineTo(p.x, p.y, z);
19614
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
19606
19615
  }
19607
19616
  context.setShadowBlendStyle && context.setShadowBlendStyle(line, line.attribute, lineAttribute);
19608
19617
  var _line$attribute = line.attribute,
@@ -19835,83 +19844,7 @@
19835
19844
  }
19836
19845
  path.closePath();
19837
19846
  }
19838
- function drawSegItem(ctx, curve, endPercent, params) {
19839
- if (!curve.p1) return;
19840
- var _ref5 = params || {},
19841
- _ref5$offsetX = _ref5.offsetX,
19842
- offsetX = _ref5$offsetX === void 0 ? 0 : _ref5$offsetX,
19843
- _ref5$offsetY = _ref5.offsetY,
19844
- offsetY = _ref5$offsetY === void 0 ? 0 : _ref5$offsetY,
19845
- _ref5$offsetZ = _ref5.offsetZ,
19846
- offsetZ = _ref5$offsetZ === void 0 ? 0 : _ref5$offsetZ;
19847
- if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19848
- var _divideCubic = divideCubic(curve, endPercent),
19849
- _divideCubic2 = _slicedToArray(_divideCubic, 1),
19850
- curve1 = _divideCubic2[0];
19851
- ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19852
- } else {
19853
- var p = curve.getPointAt(endPercent);
19854
- ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19855
- }
19856
- }
19857
19847
 
19858
- var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
19859
- _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
19860
- var _super = _createSuper(DefaultAreaTextureRenderContribution);
19861
- function DefaultAreaTextureRenderContribution() {
19862
- var _this;
19863
- _classCallCheck(this, DefaultAreaTextureRenderContribution);
19864
- _this = _super.apply(this, arguments), _this.time = exports.BaseRenderContributionTime.afterFillStroke;
19865
- return _this;
19866
- }
19867
- _createClass(DefaultAreaTextureRenderContribution, [{
19868
- key: "drawShape",
19869
- value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19870
- var _a, _b, _c, _d;
19871
- this.textureMap || this.initTextureMap(context, graphic.stage);
19872
- var _ref = options || {},
19873
- _ref$attribute = _ref.attribute,
19874
- attribute = _ref$attribute === void 0 ? graphic.attribute : _ref$attribute,
19875
- _attribute$texture = attribute.texture,
19876
- texture = _attribute$texture === void 0 ? null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList(graphicAttribute, "texture") : _attribute$texture,
19877
- _attribute$textureCol = attribute.textureColor,
19878
- textureColor = _attribute$textureCol === void 0 ? null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList(graphicAttribute, "textureColor") : _attribute$textureCol,
19879
- _attribute$textureSiz = attribute.textureSize,
19880
- textureSize = _attribute$textureSiz === void 0 ? null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList(graphicAttribute, "textureSize") : _attribute$textureSiz,
19881
- _attribute$texturePad = attribute.texturePadding,
19882
- texturePadding = _attribute$texturePad === void 0 ? null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList(graphicAttribute, "texturePadding") : _attribute$texturePad;
19883
- if (!texture) return;
19884
- var pattern = this.textureMap.get(texture);
19885
- if (!pattern) switch (texture) {
19886
- case "circle":
19887
- pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
19888
- break;
19889
- case "diamond":
19890
- pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
19891
- break;
19892
- case "rect":
19893
- pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
19894
- break;
19895
- case "vertical-line":
19896
- pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
19897
- break;
19898
- case "horizontal-line":
19899
- pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
19900
- break;
19901
- case "bias-lr":
19902
- pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
19903
- break;
19904
- case "bias-rl":
19905
- pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
19906
- break;
19907
- case "grid":
19908
- pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
19909
- }
19910
- pattern && (context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore());
19911
- }
19912
- }]);
19913
- return DefaultAreaTextureRenderContribution;
19914
- }(DefaultBaseTextureRenderContribution);
19915
19848
  var defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
19916
19849
  var defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
19917
19850
 
@@ -19968,39 +19901,43 @@
19968
19901
  var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
19969
19902
  points = area.attribute.points,
19970
19903
  startP = points[0];
19971
- context.moveTo(startP.x, startP.y, z);
19904
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19972
19905
  for (var i = 1; i < points.length; i++) {
19973
19906
  var p = points[i];
19974
- context.lineTo(p.x, p.y, z);
19907
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
19975
19908
  }
19976
19909
  for (var _i = points.length - 1; _i >= 0; _i--) {
19977
19910
  var _p = points[_i];
19978
- context.lineTo(null !== (_b = _p.x1) && void 0 !== _b ? _b : _p.x, null !== (_c = _p.y1) && void 0 !== _c ? _c : _p.y, z);
19911
+ context.lineTo((null !== (_b = _p.x1) && void 0 !== _b ? _b : _p.x) + offsetX, (null !== (_c = _p.y1) && void 0 !== _c ? _c : _p.y) + offsetY, z);
19979
19912
  }
19980
- context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute);
19913
+ context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
19914
+ attribute: area.attribute
19915
+ });
19981
19916
  var _area$attribute = area.attribute,
19982
19917
  _area$attribute$x = _area$attribute.x,
19983
19918
  originX = _area$attribute$x === void 0 ? 0 : _area$attribute$x,
19984
19919
  _area$attribute$x2 = _area$attribute.x,
19985
19920
  originY = _area$attribute$x2 === void 0 ? 0 : _area$attribute$x2;
19986
- if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), stroke) {
19921
+ if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
19922
+ attribute: area.attribute
19923
+ }), stroke) {
19987
19924
  var _area$attribute$strok = area.attribute.stroke,
19988
19925
  _stroke = _area$attribute$strok === void 0 ? areaAttribute && areaAttribute.stroke : _area$attribute$strok;
19989
19926
  if (isArray$1(_stroke) && (_stroke[0] || _stroke[2]) && !1 === _stroke[1]) if (context.beginPath(), _stroke[0]) {
19990
- context.moveTo(startP.x, startP.y, z);
19927
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19991
19928
  for (var _i2 = 1; _i2 < points.length; _i2++) {
19992
19929
  var _p2 = points[_i2];
19993
- context.lineTo(_p2.x, _p2.y, z);
19930
+ context.lineTo(_p2.x + offsetX, _p2.y + offsetY, z);
19994
19931
  }
19995
19932
  } else if (_stroke[2]) {
19996
19933
  var endP = points[points.length - 1];
19997
- context.moveTo(endP.x, endP.y, z);
19934
+ context.moveTo(endP.x + offsetX, endP.y + offsetY, z);
19998
19935
  for (var _i3 = points.length - 2; _i3 >= 0; _i3--) {
19999
19936
  var _p3 = points[_i3];
20000
- context.lineTo(null !== (_d = _p3.x1) && void 0 !== _d ? _d : _p3.x, null !== (_e = _p3.y1) && void 0 !== _e ? _e : _p3.y, z);
19937
+ context.lineTo((null !== (_d = _p3.x1) && void 0 !== _d ? _d : _p3.x) + offsetX, (null !== (_e = _p3.y1) && void 0 !== _e ? _e : _p3.y) + offsetY, z);
20001
19938
  }
20002
19939
  }
20003
- context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke();
19940
+ strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
20004
19941
  }
20005
19942
  }
20006
19943
  }, {
@@ -23796,7 +23733,7 @@
23796
23733
  }, {
23797
23734
  key: "tryInitInteractiveLayer",
23798
23735
  value: function tryInitInteractiveLayer() {
23799
- this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.nextFrameRenderLayerSet.add(this.interactiveLayer));
23736
+ this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.interactiveLayer.attribute.pickable = !1, this.nextFrameRenderLayerSet.add(this.interactiveLayer));
23800
23737
  }
23801
23738
  }, {
23802
23739
  key: "clearViewBox",
@@ -33374,13 +33311,24 @@
33374
33311
  x = _area$attribute$x === void 0 ? areaAttribute.x : _area$attribute$x,
33375
33312
  _area$attribute$y = _area$attribute.y,
33376
33313
  y = _area$attribute$y === void 0 ? areaAttribute.y : _area$attribute$y;
33314
+ var _area$attribute2 = area.attribute,
33315
+ _area$attribute2$fill = _area$attribute2.fillPickable,
33316
+ fillPickable = _area$attribute2$fill === void 0 ? areaAttribute.fillPickable : _area$attribute2$fill,
33317
+ _area$attribute2$stro = _area$attribute2.strokePickable,
33318
+ strokePickable = _area$attribute2$stro === void 0 ? areaAttribute.strokePickable : _area$attribute2$stro;
33377
33319
  if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
33378
33320
  var _point = area.getOffsetXY(areaAttribute);
33379
33321
  x += _point.x, y += _point.y, pickContext.setTransformForCurrent();
33380
33322
  } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
33381
33323
  var picked = !1;
33382
33324
  return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, function (context) {
33383
- return !!picked || (picked = context.isPointInPath(point.x, point.y), picked);
33325
+ return !!picked || !!fillPickable && (picked = context.isPointInPath(point.x, point.y), picked);
33326
+ }, function (context, areaAttribute, themeAttribute) {
33327
+ if (picked) return !0;
33328
+ if (!strokePickable) return !1;
33329
+ var lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth,
33330
+ pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
33331
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
33384
33332
  }), pickContext.highPerformanceRestore(), picked;
33385
33333
  }
33386
33334
  }]);
@@ -34502,7 +34450,7 @@
34502
34450
 
34503
34451
  var roughModule = _roughModule;
34504
34452
 
34505
- const version = "0.17.9";
34453
+ const version = "0.17.10";
34506
34454
  preLoadAllModule();
34507
34455
  if (isBrowserEnv()) {
34508
34456
  loadBrowserEnv(container);
@@ -34579,6 +34527,7 @@
34579
34527
  exports.DefaultArcRenderContribution = DefaultArcRenderContribution;
34580
34528
  exports.DefaultAreaAllocate = DefaultAreaAllocate;
34581
34529
  exports.DefaultAreaAttribute = DefaultAreaAttribute;
34530
+ exports.DefaultAreaTextureRenderContribution = DefaultAreaTextureRenderContribution;
34582
34531
  exports.DefaultAttribute = DefaultAttribute;
34583
34532
  exports.DefaultBaseBackgroundRenderContribution = DefaultBaseBackgroundRenderContribution;
34584
34533
  exports.DefaultBaseTextureRenderContribution = DefaultBaseTextureRenderContribution;
@@ -34878,9 +34827,9 @@
34878
34827
  exports.genLinearSegments = genLinearSegments;
34879
34828
  exports.genLinearTypeSegments = genLinearTypeSegments;
34880
34829
  exports.genMonotoneXSegments = genMonotoneXSegments;
34830
+ exports.genMonotoneXTypeSegments = genMonotoneXTypeSegments;
34881
34831
  exports.genMonotoneYSegments = genMonotoneYSegments;
34882
- exports.genMonotpneXTypeSegments = genMonotpneXTypeSegments;
34883
- exports.genMonotpneYTypeSegments = genMonotpneYTypeSegments;
34832
+ exports.genMonotoneYTypeSegments = genMonotoneYTypeSegments;
34884
34833
  exports.genNumberType = genNumberType;
34885
34834
  exports.genStepSegments = genStepSegments;
34886
34835
  exports.genStepTypeSegments = genStepTypeSegments;