@visactor/vrender 0.17.9 → 0.17.11-alpha.1

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.11-alpha.1";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,13 +21,14 @@ 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,
25
- vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
26
- vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
27
- (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
28
- (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(), (0, vrender_kits_2.registerImage)(),
29
- (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(), (0, vrender_kits_2.registerPolygon)(),
30
- (0, vrender_kits_2.registerPyramid3d)(), (0, vrender_kits_2.registerRect)(), (0,
31
- vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(), (0, vrender_kits_2.registerShadowRoot)(),
32
- (0, vrender_kits_2.registerSymbol)(), (0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(),
33
- __exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
24
+ exports.version = "0.17.11-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
25
+ vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
26
+ vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
27
+ (0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
28
+ (0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
29
+ (0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
30
+ (0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
31
+ (0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
32
+ (0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
33
+ (0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), __exportStar(require("@visactor/vrender-core"), exports),
34
+ __exportStar(require("@visactor/vrender-kits"), exports);
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,iBAAiB,CAAC;AAEzC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.17.11-alpha.1\";\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,
@@ -13816,10 +13788,12 @@
13816
13788
  get: function get() {
13817
13789
  var textTheme = getTheme(this).text,
13818
13790
  attribute = this.attribute;
13819
- if (!this.isSimplify()) return;
13791
+ if (this.isMultiLine) return;
13820
13792
  var _attribute$maxLineWid2 = attribute.maxLineWidth,
13821
13793
  maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
13822
- return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), null != this.clipedText && this.clipedText !== attribute.text.toString());
13794
+ return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(function (item) {
13795
+ return item.text;
13796
+ }).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString());
13823
13797
  }
13824
13798
  }, {
13825
13799
  key: "multilineLayout",
@@ -18526,6 +18500,7 @@
18526
18500
  return DefaultBaseInteractiveRenderContribution;
18527
18501
  }();
18528
18502
  exports.DefaultBaseInteractiveRenderContribution = __decorate$1w([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(InteractiveSubRenderContribution)), __metadata$19("design:paramtypes", [Object])], exports.DefaultBaseInteractiveRenderContribution);
18503
+
18529
18504
  var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
18530
18505
  function DefaultBaseTextureRenderContribution() {
18531
18506
  _classCallCheck(this, DefaultBaseTextureRenderContribution);
@@ -18626,16 +18601,20 @@
18626
18601
  key: "drawShape",
18627
18602
  value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
18628
18603
  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;
18604
+ var _graphic$attribute = graphic.attribute,
18605
+ _graphic$attribute$te = _graphic$attribute.texture,
18606
+ texture = _graphic$attribute$te === void 0 ? graphicAttribute.texture : _graphic$attribute$te,
18607
+ _graphic$attribute$te2 = _graphic$attribute.textureColor,
18608
+ textureColor = _graphic$attribute$te2 === void 0 ? graphicAttribute.textureColor : _graphic$attribute$te2,
18609
+ _graphic$attribute$te3 = _graphic$attribute.textureSize,
18610
+ textureSize = _graphic$attribute$te3 === void 0 ? graphicAttribute.textureSize : _graphic$attribute$te3,
18611
+ _graphic$attribute$te4 = _graphic$attribute.texturePadding,
18612
+ texturePadding = _graphic$attribute$te4 === void 0 ? graphicAttribute.texturePadding : _graphic$attribute$te4;
18613
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
18614
+ }
18615
+ }, {
18616
+ key: "drawTexture",
18617
+ value: function drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
18639
18618
  var pattern = this.textureMap.get(texture);
18640
18619
  if (!pattern) switch (texture) {
18641
18620
  case "circle":
@@ -19151,6 +19130,37 @@
19151
19130
  var defaultSymbolTextureRenderContribution = defaultBaseTextureRenderContribution;
19152
19131
  var defaultSymbolBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
19153
19132
 
19133
+ var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
19134
+ _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
19135
+ var _super = _createSuper(DefaultAreaTextureRenderContribution);
19136
+ function DefaultAreaTextureRenderContribution() {
19137
+ var _this;
19138
+ _classCallCheck(this, DefaultAreaTextureRenderContribution);
19139
+ _this = _super.apply(this, arguments), _this.time = exports.BaseRenderContributionTime.afterFillStroke;
19140
+ return _this;
19141
+ }
19142
+ _createClass(DefaultAreaTextureRenderContribution, [{
19143
+ key: "drawShape",
19144
+ value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19145
+ var _a, _b, _c, _d;
19146
+ this.textureMap || this.initTextureMap(context, graphic.stage);
19147
+ var _ref = options || {},
19148
+ _ref$attribute = _ref.attribute,
19149
+ attribute = _ref$attribute === void 0 ? graphic.attribute : _ref$attribute,
19150
+ _attribute$texture = attribute.texture,
19151
+ texture = _attribute$texture === void 0 ? null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList(graphicAttribute, "texture") : _attribute$texture,
19152
+ _attribute$textureCol = attribute.textureColor,
19153
+ textureColor = _attribute$textureCol === void 0 ? null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList(graphicAttribute, "textureColor") : _attribute$textureCol,
19154
+ _attribute$textureSiz = attribute.textureSize,
19155
+ textureSize = _attribute$textureSiz === void 0 ? null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList(graphicAttribute, "textureSize") : _attribute$textureSiz,
19156
+ _attribute$texturePad = attribute.texturePadding,
19157
+ texturePadding = _attribute$texturePad === void 0 ? null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList(graphicAttribute, "texturePadding") : _attribute$texturePad;
19158
+ texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
19159
+ }
19160
+ }]);
19161
+ return DefaultAreaTextureRenderContribution;
19162
+ }(DefaultBaseTextureRenderContribution);
19163
+
19154
19164
  var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19155
19165
  var d,
19156
19166
  c = arguments.length,
@@ -19391,6 +19401,26 @@
19391
19401
  }(BaseRender);
19392
19402
  exports.DefaultCanvasCircleRender = __decorate$1t([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(CircleRenderContribution)), __metadata$17("design:paramtypes", [Object])], exports.DefaultCanvasCircleRender);
19393
19403
 
19404
+ function drawSegItem(ctx, curve, endPercent, params) {
19405
+ if (!curve.p1) return;
19406
+ var _ref = params || {},
19407
+ _ref$offsetX = _ref.offsetX,
19408
+ offsetX = _ref$offsetX === void 0 ? 0 : _ref$offsetX,
19409
+ _ref$offsetY = _ref.offsetY,
19410
+ offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
19411
+ _ref$offsetZ = _ref.offsetZ,
19412
+ offsetZ = _ref$offsetZ === void 0 ? 0 : _ref$offsetZ;
19413
+ 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) {
19414
+ var _divideCubic = divideCubic(curve, endPercent),
19415
+ _divideCubic2 = _slicedToArray(_divideCubic, 1),
19416
+ curve1 = _divideCubic2[0];
19417
+ 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);
19418
+ } else {
19419
+ var p = curve.getPointAt(endPercent);
19420
+ ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19421
+ }
19422
+ }
19423
+
19394
19424
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
19395
19425
  var _a;
19396
19426
  var _ref = params || {},
@@ -19433,7 +19463,7 @@
19433
19463
  } else _lastCurve = curve;
19434
19464
  });
19435
19465
  } 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;
19466
+ curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
19437
19467
  });
19438
19468
  return;
19439
19469
  }
@@ -19472,7 +19502,7 @@
19472
19502
  needMoveTo = !0;
19473
19503
  continue;
19474
19504
  }
19475
- needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$1(path, curve, min(_p, 1), params), needMoveTo = !1;
19505
+ needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, min(_p, 1), params), needMoveTo = !1;
19476
19506
  }
19477
19507
  }
19478
19508
  }
@@ -19509,25 +19539,6 @@
19509
19539
  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
19540
  });
19511
19541
  }
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
19542
 
19532
19543
  var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19533
19544
  var d,
@@ -19599,10 +19610,10 @@
19599
19610
  var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
19600
19611
  points = line.attribute.points,
19601
19612
  startP = points[0];
19602
- context.moveTo(startP.x, startP.y, z);
19613
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19603
19614
  for (var i = 1; i < points.length; i++) {
19604
19615
  var p = points[i];
19605
- context.lineTo(p.x, p.y, z);
19616
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
19606
19617
  }
19607
19618
  context.setShadowBlendStyle && context.setShadowBlendStyle(line, line.attribute, lineAttribute);
19608
19619
  var _line$attribute = line.attribute,
@@ -19835,83 +19846,7 @@
19835
19846
  }
19836
19847
  path.closePath();
19837
19848
  }
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
19849
 
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
19850
  var defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
19916
19851
  var defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
19917
19852
 
@@ -19968,39 +19903,43 @@
19968
19903
  var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
19969
19904
  points = area.attribute.points,
19970
19905
  startP = points[0];
19971
- context.moveTo(startP.x, startP.y, z);
19906
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19972
19907
  for (var i = 1; i < points.length; i++) {
19973
19908
  var p = points[i];
19974
- context.lineTo(p.x, p.y, z);
19909
+ context.lineTo(p.x + offsetX, p.y + offsetY, z);
19975
19910
  }
19976
19911
  for (var _i = points.length - 1; _i >= 0; _i--) {
19977
19912
  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);
19913
+ 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
19914
  }
19980
- context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute);
19915
+ context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute), this.beforeRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
19916
+ attribute: area.attribute
19917
+ });
19981
19918
  var _area$attribute = area.attribute,
19982
19919
  _area$attribute$x = _area$attribute.x,
19983
19920
  originX = _area$attribute$x === void 0 ? 0 : _area$attribute$x,
19984
19921
  _area$attribute$x2 = _area$attribute.x,
19985
19922
  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) {
19923
+ 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, {
19924
+ attribute: area.attribute
19925
+ }), stroke) {
19987
19926
  var _area$attribute$strok = area.attribute.stroke,
19988
19927
  _stroke = _area$attribute$strok === void 0 ? areaAttribute && areaAttribute.stroke : _area$attribute$strok;
19989
19928
  if (isArray$1(_stroke) && (_stroke[0] || _stroke[2]) && !1 === _stroke[1]) if (context.beginPath(), _stroke[0]) {
19990
- context.moveTo(startP.x, startP.y, z);
19929
+ context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
19991
19930
  for (var _i2 = 1; _i2 < points.length; _i2++) {
19992
19931
  var _p2 = points[_i2];
19993
- context.lineTo(_p2.x, _p2.y, z);
19932
+ context.lineTo(_p2.x + offsetX, _p2.y + offsetY, z);
19994
19933
  }
19995
19934
  } else if (_stroke[2]) {
19996
19935
  var endP = points[points.length - 1];
19997
- context.moveTo(endP.x, endP.y, z);
19936
+ context.moveTo(endP.x + offsetX, endP.y + offsetY, z);
19998
19937
  for (var _i3 = points.length - 2; _i3 >= 0; _i3--) {
19999
19938
  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);
19939
+ 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
19940
  }
20002
19941
  }
20003
- context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke();
19942
+ strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
20004
19943
  }
20005
19944
  }
20006
19945
  }, {
@@ -23796,7 +23735,7 @@
23796
23735
  }, {
23797
23736
  key: "tryInitInteractiveLayer",
23798
23737
  value: function tryInitInteractiveLayer() {
23799
- this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.nextFrameRenderLayerSet.add(this.interactiveLayer));
23738
+ this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.interactiveLayer.attribute.pickable = !1, this.nextFrameRenderLayerSet.add(this.interactiveLayer));
23800
23739
  }
23801
23740
  }, {
23802
23741
  key: "clearViewBox",
@@ -33374,13 +33313,24 @@
33374
33313
  x = _area$attribute$x === void 0 ? areaAttribute.x : _area$attribute$x,
33375
33314
  _area$attribute$y = _area$attribute.y,
33376
33315
  y = _area$attribute$y === void 0 ? areaAttribute.y : _area$attribute$y;
33316
+ var _area$attribute2 = area.attribute,
33317
+ _area$attribute2$fill = _area$attribute2.fillPickable,
33318
+ fillPickable = _area$attribute2$fill === void 0 ? areaAttribute.fillPickable : _area$attribute2$fill,
33319
+ _area$attribute2$stro = _area$attribute2.strokePickable,
33320
+ strokePickable = _area$attribute2$stro === void 0 ? areaAttribute.strokePickable : _area$attribute2$stro;
33377
33321
  if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
33378
33322
  var _point = area.getOffsetXY(areaAttribute);
33379
33323
  x += _point.x, y += _point.y, pickContext.setTransformForCurrent();
33380
33324
  } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
33381
33325
  var picked = !1;
33382
33326
  return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, function (context) {
33383
- return !!picked || (picked = context.isPointInPath(point.x, point.y), picked);
33327
+ return !!picked || !!fillPickable && (picked = context.isPointInPath(point.x, point.y), picked);
33328
+ }, function (context, areaAttribute, themeAttribute) {
33329
+ if (picked) return !0;
33330
+ if (!strokePickable) return !1;
33331
+ var lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth,
33332
+ pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
33333
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
33384
33334
  }), pickContext.highPerformanceRestore(), picked;
33385
33335
  }
33386
33336
  }]);
@@ -34502,7 +34452,7 @@
34502
34452
 
34503
34453
  var roughModule = _roughModule;
34504
34454
 
34505
- const version = "0.17.9";
34455
+ const version = "0.17.11-alpha.1";
34506
34456
  preLoadAllModule();
34507
34457
  if (isBrowserEnv()) {
34508
34458
  loadBrowserEnv(container);
@@ -34579,6 +34529,7 @@
34579
34529
  exports.DefaultArcRenderContribution = DefaultArcRenderContribution;
34580
34530
  exports.DefaultAreaAllocate = DefaultAreaAllocate;
34581
34531
  exports.DefaultAreaAttribute = DefaultAreaAttribute;
34532
+ exports.DefaultAreaTextureRenderContribution = DefaultAreaTextureRenderContribution;
34582
34533
  exports.DefaultAttribute = DefaultAttribute;
34583
34534
  exports.DefaultBaseBackgroundRenderContribution = DefaultBaseBackgroundRenderContribution;
34584
34535
  exports.DefaultBaseTextureRenderContribution = DefaultBaseTextureRenderContribution;
@@ -34878,9 +34829,9 @@
34878
34829
  exports.genLinearSegments = genLinearSegments;
34879
34830
  exports.genLinearTypeSegments = genLinearTypeSegments;
34880
34831
  exports.genMonotoneXSegments = genMonotoneXSegments;
34832
+ exports.genMonotoneXTypeSegments = genMonotoneXTypeSegments;
34881
34833
  exports.genMonotoneYSegments = genMonotoneYSegments;
34882
- exports.genMonotpneXTypeSegments = genMonotpneXTypeSegments;
34883
- exports.genMonotpneYTypeSegments = genMonotpneYTypeSegments;
34834
+ exports.genMonotoneYTypeSegments = genMonotoneYTypeSegments;
34884
34835
  exports.genNumberType = genNumberType;
34885
34836
  exports.genStepSegments = genStepSegments;
34886
34837
  exports.genStepTypeSegments = genStepTypeSegments;