@visactor/vrender-components 0.17.0-alpha.5 → 0.17.0-alpha.6
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 +50 -47
- 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.0-alpha.
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.17.0-alpha.6", __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.0-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.0-alpha.6\";\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
|
@@ -3269,12 +3269,16 @@
|
|
|
3269
3269
|
var DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
3270
3270
|
width: 0,
|
|
3271
3271
|
height: 0,
|
|
3272
|
+
x1: 0,
|
|
3273
|
+
y1: 0,
|
|
3272
3274
|
strokeBoundsBuffer: 0,
|
|
3273
3275
|
cornerRadius: 0
|
|
3274
3276
|
});
|
|
3275
3277
|
var DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
3276
3278
|
width: 0,
|
|
3277
3279
|
height: 0,
|
|
3280
|
+
x1: 0,
|
|
3281
|
+
y1: 0,
|
|
3278
3282
|
cornerRadius: 0,
|
|
3279
3283
|
length: 0
|
|
3280
3284
|
});
|
|
@@ -8345,13 +8349,13 @@
|
|
|
8345
8349
|
return fill && opacity * fillOpacity > 0;
|
|
8346
8350
|
}
|
|
8347
8351
|
function rectFillVisible(opacity, fillOpacity, width, height, fill) {
|
|
8348
|
-
return fill && opacity * fillOpacity > 0 && width
|
|
8352
|
+
return fill && opacity * fillOpacity > 0 && 0 !== width && 0 !== height;
|
|
8349
8353
|
}
|
|
8350
8354
|
function strokeVisible(opacity, strokeOpacity) {
|
|
8351
8355
|
return opacity * strokeOpacity > 0;
|
|
8352
8356
|
}
|
|
8353
8357
|
function rectStrokeVisible(opacity, strokeOpacity, width, height) {
|
|
8354
|
-
return opacity * strokeOpacity > 0 && width
|
|
8358
|
+
return opacity * strokeOpacity > 0 && 0 !== width && 0 !== height;
|
|
8355
8359
|
}
|
|
8356
8360
|
function drawPathProxy(graphic, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
8357
8361
|
if (!graphic.pathProxy) return !1;
|
|
@@ -10405,7 +10409,7 @@
|
|
|
10405
10409
|
curveType: 1
|
|
10406
10410
|
}, NOWORK_ANIMATE_ATTR);
|
|
10407
10411
|
|
|
10408
|
-
var RECT_UPDATE_TAG_KEY = ["width", "height", "cornerRadius"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
10412
|
+
var RECT_UPDATE_TAG_KEY = ["width", "x1", "y1", "height", "cornerRadius"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
10409
10413
|
var Rect = /*#__PURE__*/function (_Graphic) {
|
|
10410
10414
|
_inherits(Rect, _Graphic);
|
|
10411
10415
|
var _super = _createSuper(Rect);
|
|
@@ -10423,10 +10427,7 @@
|
|
|
10423
10427
|
}, {
|
|
10424
10428
|
key: "_isValid",
|
|
10425
10429
|
value: function _isValid() {
|
|
10426
|
-
|
|
10427
|
-
width = _this$attribute.width,
|
|
10428
|
-
height = _this$attribute.height;
|
|
10429
|
-
return this._validNumber(width) && this._validNumber(height);
|
|
10430
|
+
return !0;
|
|
10430
10431
|
}
|
|
10431
10432
|
}, {
|
|
10432
10433
|
key: "doUpdateAABBBounds",
|
|
@@ -10463,11 +10464,7 @@
|
|
|
10463
10464
|
}, {
|
|
10464
10465
|
key: "toCustomPath",
|
|
10465
10466
|
value: function toCustomPath() {
|
|
10466
|
-
|
|
10467
|
-
width = attribute.width,
|
|
10468
|
-
height = attribute.height,
|
|
10469
|
-
path = new CustomPath2D();
|
|
10470
|
-
return path.moveTo(0, 0), path.rect(0, 0, width, height), path;
|
|
10467
|
+
throw new Error("暂不支持");
|
|
10471
10468
|
}
|
|
10472
10469
|
}, {
|
|
10473
10470
|
key: "clone",
|
|
@@ -12196,11 +12193,13 @@
|
|
|
12196
12193
|
key: "updateRectAABBBounds",
|
|
12197
12194
|
value: function updateRectAABBBounds(attribute, rectTheme, aabbBounds, graphic) {
|
|
12198
12195
|
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
12199
|
-
var
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12196
|
+
var width = attribute.width,
|
|
12197
|
+
height = attribute.height;
|
|
12198
|
+
var x1 = attribute.x1,
|
|
12199
|
+
y1 = attribute.y1,
|
|
12200
|
+
x = attribute.x,
|
|
12201
|
+
y = attribute.y;
|
|
12202
|
+
width = null != width ? width : x1 - x, height = null != height ? height : y1 - y, aabbBounds.set(0, 0, width || 0, height || 0);
|
|
12204
12203
|
}
|
|
12205
12204
|
var tb1 = this.tempAABBBounds1,
|
|
12206
12205
|
tb2 = this.tempAABBBounds2;
|
|
@@ -12236,10 +12235,10 @@
|
|
|
12236
12235
|
key: "updateRichTextAABBBounds",
|
|
12237
12236
|
value: function updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
|
|
12238
12237
|
if (!graphic) return aabbBounds;
|
|
12239
|
-
var _attribute$
|
|
12240
|
-
width = _attribute$
|
|
12241
|
-
_attribute$
|
|
12242
|
-
height = _attribute$
|
|
12238
|
+
var _attribute$width = attribute.width,
|
|
12239
|
+
width = _attribute$width === void 0 ? richtextTheme.width : _attribute$width,
|
|
12240
|
+
_attribute$height = attribute.height,
|
|
12241
|
+
height = _attribute$height === void 0 ? richtextTheme.height : _attribute$height,
|
|
12243
12242
|
_attribute$maxWidth = attribute.maxWidth,
|
|
12244
12243
|
maxWidth = _attribute$maxWidth === void 0 ? richtextTheme.maxWidth : _attribute$maxWidth,
|
|
12245
12244
|
_attribute$maxHeight = attribute.maxHeight,
|
|
@@ -12351,8 +12350,8 @@
|
|
|
12351
12350
|
if (!stage || !stage.camera) return aabbBounds;
|
|
12352
12351
|
var _attribute$outerRadiu = attribute.outerRadius,
|
|
12353
12352
|
outerRadius = _attribute$outerRadiu === void 0 ? arcTheme.outerRadius : _attribute$outerRadiu,
|
|
12354
|
-
_attribute$
|
|
12355
|
-
height = _attribute$
|
|
12353
|
+
_attribute$height2 = attribute.height,
|
|
12354
|
+
height = _attribute$height2 === void 0 ? 0 : _attribute$height2,
|
|
12356
12355
|
r = outerRadius + height;
|
|
12357
12356
|
aabbBounds.setValue(-r, -r, r, r);
|
|
12358
12357
|
var tb1 = this.tempAABBBounds1,
|
|
@@ -12552,10 +12551,10 @@
|
|
|
12552
12551
|
key: "updateImageAABBBounds",
|
|
12553
12552
|
value: function updateImageAABBBounds(attribute, imageTheme, aabbBounds, graphic) {
|
|
12554
12553
|
if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
|
|
12555
|
-
var _attribute$
|
|
12556
|
-
width = _attribute$
|
|
12557
|
-
_attribute$
|
|
12558
|
-
height = _attribute$
|
|
12554
|
+
var _attribute$width2 = attribute.width,
|
|
12555
|
+
width = _attribute$width2 === void 0 ? imageTheme.width : _attribute$width2,
|
|
12556
|
+
_attribute$height3 = attribute.height,
|
|
12557
|
+
height = _attribute$height3 === void 0 ? imageTheme.height : _attribute$height3;
|
|
12559
12558
|
aabbBounds.set(0, 0, width, height);
|
|
12560
12559
|
}
|
|
12561
12560
|
var tb1 = this.tempAABBBounds1,
|
|
@@ -13353,7 +13352,7 @@
|
|
|
13353
13352
|
var halfPi = vutils.pi / 2;
|
|
13354
13353
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
13355
13354
|
var cornerRadius;
|
|
13356
|
-
if (vutils.isNumber(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius, rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
13355
|
+
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), vutils.isNumber(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius, rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
13357
13356
|
var cornerRadiusArr = rectCornerRadius;
|
|
13358
13357
|
switch (cornerRadiusArr.length) {
|
|
13359
13358
|
case 0:
|
|
@@ -13497,10 +13496,6 @@
|
|
|
13497
13496
|
doInnerBorder = innerBorder && !1 !== innerBorder.visible;
|
|
13498
13497
|
if (!doOuterBorder && !doInnerBorder) return;
|
|
13499
13498
|
var _rect$attribute2 = rect.attribute,
|
|
13500
|
-
_rect$attribute2$widt = _rect$attribute2.width,
|
|
13501
|
-
width = _rect$attribute2$widt === void 0 ? rectAttribute.width : _rect$attribute2$widt,
|
|
13502
|
-
_rect$attribute2$heig = _rect$attribute2.height,
|
|
13503
|
-
height = _rect$attribute2$heig === void 0 ? rectAttribute.height : _rect$attribute2$heig,
|
|
13504
13499
|
_rect$attribute2$corn = _rect$attribute2.cornerRadius,
|
|
13505
13500
|
cornerRadius = _rect$attribute2$corn === void 0 ? rectAttribute.cornerRadius : _rect$attribute2$corn,
|
|
13506
13501
|
_rect$attribute2$opac = _rect$attribute2.opacity,
|
|
@@ -13513,7 +13508,13 @@
|
|
|
13513
13508
|
scaleX = _rect$attribute2$scal === void 0 ? rectAttribute.scaleX : _rect$attribute2$scal,
|
|
13514
13509
|
_rect$attribute2$scal2 = _rect$attribute2.scaleY,
|
|
13515
13510
|
scaleY = _rect$attribute2$scal2 === void 0 ? rectAttribute.scaleY : _rect$attribute2$scal2,
|
|
13516
|
-
|
|
13511
|
+
x1 = _rect$attribute2.x1,
|
|
13512
|
+
y1 = _rect$attribute2.y1;
|
|
13513
|
+
var _rect$attribute3 = rect.attribute,
|
|
13514
|
+
width = _rect$attribute3.width,
|
|
13515
|
+
height = _rect$attribute3.height;
|
|
13516
|
+
width = (null != width ? width : x1 - x) || 0, height = (null != height ? height : y1 - y) || 0;
|
|
13517
|
+
var doStrokeOuter = !(!outerBorder || !outerBorder.stroke),
|
|
13517
13518
|
doStrokeInner = !(!innerBorder || !innerBorder.stroke);
|
|
13518
13519
|
if (doOuterBorder) {
|
|
13519
13520
|
var _outerBorder$distance = outerBorder.distance,
|
|
@@ -13572,13 +13573,13 @@
|
|
|
13572
13573
|
_createClass(SplitRectAfterRenderContribution, [{
|
|
13573
13574
|
key: "drawShape",
|
|
13574
13575
|
value: function drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
13575
|
-
var _rect$
|
|
13576
|
-
_rect$
|
|
13577
|
-
width = _rect$
|
|
13578
|
-
_rect$
|
|
13579
|
-
height = _rect$
|
|
13580
|
-
_rect$
|
|
13581
|
-
stroke = _rect$
|
|
13576
|
+
var _rect$attribute4 = rect.attribute,
|
|
13577
|
+
_rect$attribute4$widt = _rect$attribute4.width,
|
|
13578
|
+
width = _rect$attribute4$widt === void 0 ? groupAttribute.width : _rect$attribute4$widt,
|
|
13579
|
+
_rect$attribute4$heig = _rect$attribute4.height,
|
|
13580
|
+
height = _rect$attribute4$heig === void 0 ? groupAttribute.height : _rect$attribute4$heig,
|
|
13581
|
+
_rect$attribute4$stro = _rect$attribute4.stroke,
|
|
13582
|
+
stroke = _rect$attribute4$stro === void 0 ? groupAttribute.stroke : _rect$attribute4$stro;
|
|
13582
13583
|
if (Array.isArray(stroke) && stroke.some(function (s) {
|
|
13583
13584
|
return !1 === s;
|
|
13584
13585
|
})) {
|
|
@@ -14796,10 +14797,6 @@
|
|
|
14796
14797
|
background = _rect$attribute.background,
|
|
14797
14798
|
_rect$attribute$strok = _rect$attribute.stroke,
|
|
14798
14799
|
stroke = _rect$attribute$strok === void 0 ? rectAttribute.stroke : _rect$attribute$strok,
|
|
14799
|
-
_rect$attribute$width = _rect$attribute.width,
|
|
14800
|
-
width = _rect$attribute$width === void 0 ? rectAttribute.width : _rect$attribute$width,
|
|
14801
|
-
_rect$attribute$heigh = _rect$attribute.height,
|
|
14802
|
-
height = _rect$attribute$heigh === void 0 ? rectAttribute.height : _rect$attribute$heigh,
|
|
14803
14800
|
_rect$attribute$corne = _rect$attribute.cornerRadius,
|
|
14804
14801
|
cornerRadius = _rect$attribute$corne === void 0 ? rectAttribute.cornerRadius : _rect$attribute$corne,
|
|
14805
14802
|
_rect$attribute$opaci = _rect$attribute.opacity,
|
|
@@ -14812,11 +14809,17 @@
|
|
|
14812
14809
|
strokeOpacity = _rect$attribute$strok2 === void 0 ? rectAttribute.strokeOpacity : _rect$attribute$strok2,
|
|
14813
14810
|
_rect$attribute$visib = _rect$attribute.visible,
|
|
14814
14811
|
visible = _rect$attribute$visib === void 0 ? rectAttribute.visible : _rect$attribute$visib,
|
|
14812
|
+
x1 = _rect$attribute.x1,
|
|
14813
|
+
y1 = _rect$attribute.y1,
|
|
14815
14814
|
_rect$attribute$x = _rect$attribute.x,
|
|
14816
14815
|
originX = _rect$attribute$x === void 0 ? rectAttribute.x : _rect$attribute$x,
|
|
14817
14816
|
_rect$attribute$y = _rect$attribute.y,
|
|
14818
|
-
originY = _rect$attribute$y === void 0 ? rectAttribute.y : _rect$attribute$y
|
|
14819
|
-
|
|
14817
|
+
originY = _rect$attribute$y === void 0 ? rectAttribute.y : _rect$attribute$y;
|
|
14818
|
+
var _rect$attribute2 = rect.attribute,
|
|
14819
|
+
width = _rect$attribute2.width,
|
|
14820
|
+
height = _rect$attribute2.height;
|
|
14821
|
+
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
14822
|
+
var fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
14820
14823
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
14821
14824
|
doFill = runFill(fill, background),
|
|
14822
14825
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -30274,7 +30277,7 @@
|
|
|
30274
30277
|
}
|
|
30275
30278
|
};
|
|
30276
30279
|
|
|
30277
|
-
const version = "0.17.0-alpha.
|
|
30280
|
+
const version = "0.17.0-alpha.6";
|
|
30278
30281
|
|
|
30279
30282
|
exports.AbstractComponent = AbstractComponent;
|
|
30280
30283
|
exports.ArcInfo = ArcInfo;
|