@visactor/vrender 0.16.15 → 0.16.16

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,3 +1,3 @@
1
- export declare const version = "0.16.15";
1
+ export declare const version = "0.16.16";
2
2
  export * from '@visactor/vrender-core';
3
3
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,5 +21,5 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.16.15", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
24
+ exports.version = "0.16.16", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
25
25
  __exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.15\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.16\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.js CHANGED
@@ -15861,32 +15861,37 @@
15861
15861
  }(BaseSymbol);
15862
15862
  var close$1 = new CloseSymbol();
15863
15863
 
15864
- function rect(ctx, size, x, y) {
15864
+ function rectSizeArray(ctx, size, x, y) {
15865
15865
  return ctx.rect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]), !1;
15866
15866
  }
15867
+ function rectSize(ctx, size, x, y) {
15868
+ var w = size,
15869
+ h = size / 2;
15870
+ return ctx.rect(x - w / 2, y - h / 2, w, h), !1;
15871
+ }
15867
15872
  var RectSymbol = /*#__PURE__*/function (_BaseSymbol) {
15868
15873
  _inherits(RectSymbol, _BaseSymbol);
15869
15874
  var _super = _createSuper(RectSymbol);
15870
15875
  function RectSymbol() {
15871
15876
  var _this;
15872
15877
  _classCallCheck(this, RectSymbol);
15873
- _this = _super.apply(this, arguments), _this.type = "rect", _this.pathStr = "M-0.5,-0.5h1v1h-1Z";
15878
+ _this = _super.apply(this, arguments), _this.type = "rect", _this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
15874
15879
  return _this;
15875
15880
  }
15876
15881
  _createClass(RectSymbol, [{
15877
15882
  key: "draw",
15878
15883
  value: function draw(ctx, size, x, y) {
15879
- return rect(ctx, isNumber$2(size) ? [size, size] : size, x, y);
15884
+ return isNumber$2(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
15880
15885
  }
15881
15886
  }, {
15882
15887
  key: "drawOffset",
15883
15888
  value: function drawOffset(ctx, size, x, y, offset) {
15884
- return rect(ctx, isNumber$2(size) ? [size + 2 * offset, size + 2 * offset] : [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
15889
+ return isNumber$2(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
15885
15890
  }
15886
15891
  }]);
15887
15892
  return RectSymbol;
15888
15893
  }(BaseSymbol);
15889
- var rect$1 = new RectSymbol();
15894
+ var rect = new RectSymbol();
15890
15895
 
15891
15896
  var tempBounds = new AABBBounds();
15892
15897
  var CustomSymbolClass = /*#__PURE__*/function () {
@@ -15925,7 +15930,7 @@
15925
15930
  return CustomSymbolClass;
15926
15931
  }();
15927
15932
 
15928
- var builtinSymbols = [circle$1, cross$1, diamond$1, square$1, thinTriangle$1, triangle, star$1, arrow$1, wedge$1, stroke$1, wye$1, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left$1, arrow2Right$1, arrow2Up$1, arrow2Down$1, rect$1, lineV$1, lineH$1, close$1];
15933
+ var builtinSymbols = [circle$1, cross$1, diamond$1, square$1, thinTriangle$1, triangle, star$1, arrow$1, wedge$1, stroke$1, wye$1, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left$1, arrow2Right$1, arrow2Up$1, arrow2Down$1, rect, lineV$1, lineH$1, close$1];
15929
15934
  var builtinSymbolsMap = {};
15930
15935
  builtinSymbols.forEach(function (symbol) {
15931
15936
  builtinSymbolsMap[symbol.type] = symbol;
@@ -15933,7 +15938,6 @@
15933
15938
  var builtInSymbolStrMap = {
15934
15939
  arrowLeft: "M 0.25 -0.5 L -0.25 0 l 0.5 0.5",
15935
15940
  arrowRight: "M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",
15936
- rect: "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z",
15937
15941
  rectRound: "M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",
15938
15942
  roundLine: "M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"
15939
15943
  };
@@ -34642,7 +34646,7 @@
34642
34646
 
34643
34647
  var roughModule = _roughModule;
34644
34648
 
34645
- const version = "0.16.15";
34649
+ const version = "0.16.16";
34646
34650
  loadAllModule(container);
34647
34651
 
34648
34652
  exports.ACustomAnimate = ACustomAnimate;