@visactor/vrender-components 0.17.2-alpha.2 → 0.17.2-alpha.3
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 +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.js +114 -2
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "0.17.2-alpha.
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.17.2-alpha.3", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
|
|
22
22
|
__exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
|
|
23
23
|
__exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.17.2-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.17.2-alpha.3\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -10896,6 +10896,114 @@
|
|
|
10896
10896
|
return new Path(attributes);
|
|
10897
10897
|
}
|
|
10898
10898
|
|
|
10899
|
+
var AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
10900
|
+
var Area = /*#__PURE__*/function (_Graphic) {
|
|
10901
|
+
_inherits(Area, _Graphic);
|
|
10902
|
+
var _super = _createSuper(Area);
|
|
10903
|
+
function Area(params) {
|
|
10904
|
+
var _this;
|
|
10905
|
+
_classCallCheck(this, Area);
|
|
10906
|
+
_this = _super.call(this, params), _this.type = "area", _this.numberType = AREA_NUMBER_TYPE;
|
|
10907
|
+
return _this;
|
|
10908
|
+
}
|
|
10909
|
+
_createClass(Area, [{
|
|
10910
|
+
key: "isValid",
|
|
10911
|
+
value: function isValid() {
|
|
10912
|
+
return _get(_getPrototypeOf(Area.prototype), "isValid", this).call(this) && this._isValid();
|
|
10913
|
+
}
|
|
10914
|
+
}, {
|
|
10915
|
+
key: "_isValid",
|
|
10916
|
+
value: function _isValid() {
|
|
10917
|
+
if (this.pathProxy) return !0;
|
|
10918
|
+
var _this$attribute = this.attribute,
|
|
10919
|
+
points = _this$attribute.points,
|
|
10920
|
+
segments = _this$attribute.segments;
|
|
10921
|
+
return segments ? 0 !== segments.length : !!points && 0 !== points.length;
|
|
10922
|
+
}
|
|
10923
|
+
}, {
|
|
10924
|
+
key: "doUpdateAABBBounds",
|
|
10925
|
+
value: function doUpdateAABBBounds() {
|
|
10926
|
+
var areaTheme = getTheme(this).area;
|
|
10927
|
+
this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
|
|
10928
|
+
var attribute = this.attribute,
|
|
10929
|
+
bounds = application.graphicService.updateAreaAABBBounds(attribute, getTheme(this).area, this._AABBBounds, this),
|
|
10930
|
+
_attribute$boundsPadd = attribute.boundsPadding,
|
|
10931
|
+
boundsPadding = _attribute$boundsPadd === void 0 ? areaTheme.boundsPadding : _attribute$boundsPadd,
|
|
10932
|
+
paddingArray = parsePadding(boundsPadding);
|
|
10933
|
+
return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
|
|
10934
|
+
}
|
|
10935
|
+
}, {
|
|
10936
|
+
key: "tryUpdateOBBBounds",
|
|
10937
|
+
value: function tryUpdateOBBBounds() {
|
|
10938
|
+
throw new Error("暂不支持");
|
|
10939
|
+
}
|
|
10940
|
+
}, {
|
|
10941
|
+
key: "_interpolate",
|
|
10942
|
+
value: function _interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
10943
|
+
"points" === key && (nextAttributes.points = pointsInterpolation(lastStepVal, nextStepVal, ratio));
|
|
10944
|
+
}
|
|
10945
|
+
}, {
|
|
10946
|
+
key: "getDefaultAttribute",
|
|
10947
|
+
value: function getDefaultAttribute(name) {
|
|
10948
|
+
return getTheme(this).area[name];
|
|
10949
|
+
}
|
|
10950
|
+
}, {
|
|
10951
|
+
key: "needUpdateTags",
|
|
10952
|
+
value: function needUpdateTags(keys) {
|
|
10953
|
+
return _get(_getPrototypeOf(Area.prototype), "needUpdateTags", this).call(this, keys, AREA_UPDATE_TAG_KEY);
|
|
10954
|
+
}
|
|
10955
|
+
}, {
|
|
10956
|
+
key: "needUpdateTag",
|
|
10957
|
+
value: function needUpdateTag(key) {
|
|
10958
|
+
return _get(_getPrototypeOf(Area.prototype), "needUpdateTag", this).call(this, key, AREA_UPDATE_TAG_KEY);
|
|
10959
|
+
}
|
|
10960
|
+
}, {
|
|
10961
|
+
key: "toCustomPath",
|
|
10962
|
+
value: function toCustomPath() {
|
|
10963
|
+
var path = new CustomPath2D(),
|
|
10964
|
+
attribute = this.attribute,
|
|
10965
|
+
segments = attribute.segments,
|
|
10966
|
+
parsePoints = function parsePoints(points) {
|
|
10967
|
+
if (points && points.length) {
|
|
10968
|
+
var isFirst = !0;
|
|
10969
|
+
var basePoints = [];
|
|
10970
|
+
if (points.forEach(function (point) {
|
|
10971
|
+
var _a, _b;
|
|
10972
|
+
!1 !== point.defined && (isFirst ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y), basePoints.push({
|
|
10973
|
+
x: null !== (_a = point.x1) && void 0 !== _a ? _a : point.x,
|
|
10974
|
+
y: null !== (_b = point.y1) && void 0 !== _b ? _b : point.y
|
|
10975
|
+
}), isFirst = !1);
|
|
10976
|
+
}), basePoints.length) {
|
|
10977
|
+
for (var i = basePoints.length - 1; i >= 0; i--) path.lineTo(basePoints[i].x, basePoints[i].y);
|
|
10978
|
+
path.closePath();
|
|
10979
|
+
}
|
|
10980
|
+
}
|
|
10981
|
+
};
|
|
10982
|
+
return attribute.points ? parsePoints(attribute.points) : segments && segments.length && segments.forEach(function (seg) {
|
|
10983
|
+
parsePoints(seg.points);
|
|
10984
|
+
}), path;
|
|
10985
|
+
}
|
|
10986
|
+
}, {
|
|
10987
|
+
key: "clone",
|
|
10988
|
+
value: function clone() {
|
|
10989
|
+
return new Area(Object.assign({}, this.attribute));
|
|
10990
|
+
}
|
|
10991
|
+
}, {
|
|
10992
|
+
key: "getNoWorkAnimateAttr",
|
|
10993
|
+
value: function getNoWorkAnimateAttr() {
|
|
10994
|
+
return Area.NOWORK_ANIMATE_ATTR;
|
|
10995
|
+
}
|
|
10996
|
+
}]);
|
|
10997
|
+
return Area;
|
|
10998
|
+
}(Graphic);
|
|
10999
|
+
Area.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
11000
|
+
segments: 1,
|
|
11001
|
+
curveType: 1
|
|
11002
|
+
}, NOWORK_ANIMATE_ATTR);
|
|
11003
|
+
function createArea(attributes) {
|
|
11004
|
+
return new Area(attributes);
|
|
11005
|
+
}
|
|
11006
|
+
|
|
10899
11007
|
var ARC_UPDATE_TAG_KEY = ["innerRadius", "outerRadius", "startAngle", "endAngle", "cornerRadius", "padAngle", "padRadius", "cap"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
10900
11008
|
var Arc = /*#__PURE__*/function (_Graphic) {
|
|
10901
11009
|
_inherits(Arc, _Graphic);
|
|
@@ -16676,6 +16784,10 @@
|
|
|
16676
16784
|
graphicCreator.RegisterGraphicCreator("arc", createArc);
|
|
16677
16785
|
}
|
|
16678
16786
|
|
|
16787
|
+
function registerAreaGraphic() {
|
|
16788
|
+
graphicCreator.RegisterGraphicCreator("area", createArea);
|
|
16789
|
+
}
|
|
16790
|
+
|
|
16679
16791
|
function registerCircleGraphic() {
|
|
16680
16792
|
graphicCreator.RegisterGraphicCreator("circle", createCircle);
|
|
16681
16793
|
}
|
|
@@ -18330,7 +18442,7 @@
|
|
|
18330
18442
|
|
|
18331
18443
|
var loaded$b = !1;
|
|
18332
18444
|
function registerArea() {
|
|
18333
|
-
loaded$b || (loaded$b = !0, container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
18445
|
+
loaded$b || (loaded$b = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
18334
18446
|
}
|
|
18335
18447
|
|
|
18336
18448
|
var loaded$a = !1;
|
|
@@ -29777,7 +29889,7 @@
|
|
|
29777
29889
|
}
|
|
29778
29890
|
};
|
|
29779
29891
|
|
|
29780
|
-
const version = "0.17.2-alpha.
|
|
29892
|
+
const version = "0.17.2-alpha.3";
|
|
29781
29893
|
|
|
29782
29894
|
exports.AbstractComponent = AbstractComponent;
|
|
29783
29895
|
exports.ArcInfo = ArcInfo;
|