@visactor/vchart 1.12.16 → 1.12.18
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/build/es5/index.js +1 -1
- package/build/index.js +53 -52
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compilable-base.js +2 -1
- package/cjs/compile/util.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +2 -1
- package/cjs/data/register.js +1 -2
- package/esm/compile/compilable-base.js +2 -1
- package/esm/compile/util.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +2 -1
- package/esm/data/register.js +1 -2
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -18756,10 +18756,7 @@
|
|
|
18756
18756
|
const {
|
|
18757
18757
|
context: context
|
|
18758
18758
|
} = drawContext;
|
|
18759
|
-
context.highPerformanceSave()
|
|
18760
|
-
const t1 = graphic.parent.globalTransMatrix,
|
|
18761
|
-
t2 = graphic.stage.window.getViewBoxTransform().clone().multiply(t1.a, t1.b, t1.c, t1.d, t1.e, t1.f);
|
|
18762
|
-
if (graphic.parent && context.setTransformFromMatrix(t2, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
18759
|
+
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
18763
18760
|
tempDirtyBounds.copy(drawContribution.dirtyBounds), tempBackupDirtyBounds.copy(drawContribution.backupDirtyBounds);
|
|
18764
18761
|
const m = graphic.globalTransMatrix.getInverse();
|
|
18765
18762
|
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
@@ -33994,6 +33991,52 @@
|
|
|
33994
33991
|
zIndex: 1
|
|
33995
33992
|
};
|
|
33996
33993
|
|
|
33994
|
+
function genNormalBounds(item) {
|
|
33995
|
+
const bounds = item.AABBBounds;
|
|
33996
|
+
return {
|
|
33997
|
+
x1: bounds.x1,
|
|
33998
|
+
x2: bounds.x2,
|
|
33999
|
+
y1: bounds.y1,
|
|
34000
|
+
y2: bounds.y2,
|
|
34001
|
+
centerX: item.attribute.x,
|
|
34002
|
+
centerY: item.attribute.y,
|
|
34003
|
+
angle: item.attribute.angle
|
|
34004
|
+
};
|
|
34005
|
+
}
|
|
34006
|
+
function genRotateBounds(items) {
|
|
34007
|
+
items.forEach(item => {
|
|
34008
|
+
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
34009
|
+
const bounds = genNormalBounds(item),
|
|
34010
|
+
rotatedCenter = rotatePoint({
|
|
34011
|
+
x: item.attribute.x,
|
|
34012
|
+
y: item.attribute.y
|
|
34013
|
+
}, bounds.angle, {
|
|
34014
|
+
x: bounds.centerX,
|
|
34015
|
+
y: bounds.centerY
|
|
34016
|
+
}),
|
|
34017
|
+
deltaX = rotatedCenter.x - bounds.centerX,
|
|
34018
|
+
deltaY = rotatedCenter.y - bounds.centerY;
|
|
34019
|
+
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
34020
|
+
});
|
|
34021
|
+
}
|
|
34022
|
+
function itemIntersect(item1, item2) {
|
|
34023
|
+
var _a, _b;
|
|
34024
|
+
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
34025
|
+
}
|
|
34026
|
+
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
34027
|
+
function isAngleVertical(angle) {
|
|
34028
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
34029
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34030
|
+
cos = hasAngle ? Math.cos(angle) : 1;
|
|
34031
|
+
return hasAngle && Math.abs(cos) <= delta;
|
|
34032
|
+
}
|
|
34033
|
+
function isAngleHorizontal(angle) {
|
|
34034
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
34035
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34036
|
+
sin = hasAngle ? Math.sin(angle) : 0;
|
|
34037
|
+
return !hasAngle || Math.abs(sin) <= delta;
|
|
34038
|
+
}
|
|
34039
|
+
|
|
33997
34040
|
function getCircleLabelPosition(tickPosition, tickVector) {
|
|
33998
34041
|
return {
|
|
33999
34042
|
x: tickPosition.x + tickVector[0],
|
|
@@ -34064,9 +34107,11 @@
|
|
|
34064
34107
|
}), closed && (path += "Z")), path;
|
|
34065
34108
|
}
|
|
34066
34109
|
function textIntersect(textA, textB, sep) {
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34110
|
+
var _a;
|
|
34111
|
+
let a, b;
|
|
34112
|
+
const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
|
|
34113
|
+
isAABBIntersects = (textA, textB, sep) => (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
|
|
34114
|
+
return isAngleHorizontal(angle, Number.EPSILON) ? isAABBIntersects(textA, textB, sep) : (a = textA.OBBBounds, b = textB.OBBBounds, !a || !b || a.empty() || b.empty() ? isAABBIntersects(textA, textB, sep) : a.intersects(b));
|
|
34070
34115
|
}
|
|
34071
34116
|
function hasOverlap$1(items, pad) {
|
|
34072
34117
|
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
|
|
@@ -34450,50 +34495,6 @@
|
|
|
34450
34495
|
});
|
|
34451
34496
|
}
|
|
34452
34497
|
|
|
34453
|
-
function genNormalBounds(item) {
|
|
34454
|
-
const bounds = item.AABBBounds;
|
|
34455
|
-
return {
|
|
34456
|
-
x1: bounds.x1,
|
|
34457
|
-
x2: bounds.x2,
|
|
34458
|
-
y1: bounds.y1,
|
|
34459
|
-
y2: bounds.y2,
|
|
34460
|
-
centerX: item.attribute.x,
|
|
34461
|
-
centerY: item.attribute.y,
|
|
34462
|
-
angle: item.attribute.angle
|
|
34463
|
-
};
|
|
34464
|
-
}
|
|
34465
|
-
function genRotateBounds(items) {
|
|
34466
|
-
items.forEach(item => {
|
|
34467
|
-
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
34468
|
-
const bounds = genNormalBounds(item),
|
|
34469
|
-
rotatedCenter = rotatePoint({
|
|
34470
|
-
x: item.attribute.x,
|
|
34471
|
-
y: item.attribute.y
|
|
34472
|
-
}, bounds.angle, {
|
|
34473
|
-
x: bounds.centerX,
|
|
34474
|
-
y: bounds.centerY
|
|
34475
|
-
}),
|
|
34476
|
-
deltaX = rotatedCenter.x - bounds.centerX,
|
|
34477
|
-
deltaY = rotatedCenter.y - bounds.centerY;
|
|
34478
|
-
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
34479
|
-
});
|
|
34480
|
-
}
|
|
34481
|
-
function itemIntersect(item1, item2) {
|
|
34482
|
-
var _a, _b;
|
|
34483
|
-
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
34484
|
-
}
|
|
34485
|
-
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
34486
|
-
function isAngleVertical(angle) {
|
|
34487
|
-
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34488
|
-
cos = hasAngle ? Math.cos(angle) : 1;
|
|
34489
|
-
return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
|
|
34490
|
-
}
|
|
34491
|
-
function isAngleHorizontal(angle) {
|
|
34492
|
-
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
34493
|
-
sin = hasAngle ? Math.sin(angle) : 0;
|
|
34494
|
-
return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
|
|
34495
|
-
}
|
|
34496
|
-
|
|
34497
34498
|
function autoRotate(items, rotateConfig) {
|
|
34498
34499
|
if (isEmpty(items)) return;
|
|
34499
34500
|
const {
|
|
@@ -61934,7 +61935,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61934
61935
|
};
|
|
61935
61936
|
registerVChartCore();
|
|
61936
61937
|
|
|
61937
|
-
const version = "1.12.
|
|
61938
|
+
const version = "1.12.18";
|
|
61938
61939
|
|
|
61939
61940
|
const addVChartProperty = (data, op) => {
|
|
61940
61941
|
const context = op.beforeCall();
|