Skip to content

Commit ac3537b

Browse files
authored
Merge pull request #3501 from VisActor/sync/main-1.12.15
[Auto Sync] Sync the code from branch main to branch develop after release 1.12.15
2 parents f4e5b9c + 2476b1d commit ac3537b

File tree

26 files changed

+109
-98
lines changed

26 files changed

+109
-98
lines changed

common/changes/@visactor/vchart/fix-upgrade-vrender-0.20.18_2024-12-05-08-55.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

common/changes/@visactor/vchart/fix-upgrade-vrender-0.20.18_2024-12-05-08-59.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

common/config/rush/pnpm-lock.yaml

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.12.14","mainProject":"@visactor/vchart","nextBump":"patch"}]
1+
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.12.15","mainProject":"@visactor/vchart","nextBump":"patch"}]

docs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
},
1313
"dependencies": {
1414
"@arco-design/web-react": "2.46.1",
15-
"@visactor/openinula-vchart": "workspace:1.12.14",
16-
"@visactor/react-vchart": "workspace:1.12.14",
17-
"@visactor/vchart": "workspace:1.12.14",
18-
"@visactor/vchart-extension": "workspace:1.12.14",
15+
"@visactor/openinula-vchart": "workspace:1.12.15",
16+
"@visactor/react-vchart": "workspace:1.12.15",
17+
"@visactor/vchart": "workspace:1.12.15",
18+
"@visactor/vchart-extension": "workspace:1.12.15",
1919
"@visactor/vchart-theme": "~1.6.6",
2020
"@visactor/vmind": "1.2.4-alpha.5",
2121
"@visactor/vutils": "~0.19.2",
@@ -59,4 +59,4 @@
5959
"react-device-detect": "^2.2.2",
6060
"minimist": "1.2.8"
6161
}
62-
}
62+
}

packages/block-vchart/block/vchart/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/harmony_vchart/library/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
name: '@visactor/harmony-vchart',
3-
version: '1.12.14',
3+
version: '1.12.15',
44
description: '@visactor/vchart 针对 harmonyOS 打造的图表库,拥有非常酷炫的动画能力,近20种图表类型,以及原生的渲染性能',
55
main: 'Index.ets',
66
author: {

packages/harmony_vchart/library/src/main/ets/vchart_dist.js

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31737,10 +31737,11 @@ function placeToCandidates($, bitmap, text) {
3173731737
let candidates = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
3173831738
let clampForce = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
3173931739
let pad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
31740+
let changePosition = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
3174031741
const validCandidates = candidates.filter(candidate => isValid$1(candidate));
3174131742
for (let i = 0; i < validCandidates.length; i++) {
31742-
const tempText = text.clone();
31743-
if (tempText.setAttributes(validCandidates[i]), tempText.update(), canPlace($, bitmap, tempText.AABBBounds, clampForce, pad)) return bitmap.setRange(boundToRange($, tempText.AABBBounds, !0)), validCandidates[i];
31743+
let measureText;
31744+
if (measureText = changePosition ? text : text.clone(), measureText.setAttributes(validCandidates[i]), canPlace($, bitmap, measureText.AABBBounds, clampForce, pad)) return bitmap.setRange(boundToRange($, measureText.AABBBounds, !0)), validCandidates[i];
3174431745
}
3174531746
return !1;
3174631747
}
@@ -31750,8 +31751,9 @@ function place$2($, bitmap, s, attrs, text, bounds, labeling) {
3175031751
overlapPadding = null === (_b = attrs.overlap) || void 0 === _b ? void 0 : _b.overlapPadding;
3175131752
if ("bound" === s.type || "position" === s.type) {
3175231753
if (isFunction$1(labeling)) {
31753-
const candidates = ((isFunction$1(s.position) ? s.position(text.attribute) : s.position) || defaultLabelPosition(attrs.type)).map(p => labeling(text.AABBBounds, bounds, p, attrs.offset));
31754-
return placeToCandidates($, bitmap, text, candidates, clampForce, overlapPadding);
31754+
const candidates = ((isFunction$1(s.position) ? s.position(text.attribute) : s.position) || defaultLabelPosition(attrs.type)).map(p => labeling(text.AABBBounds, bounds, p, attrs.offset)),
31755+
shouldClone = !1 === s.restorePosition;
31756+
return placeToCandidates($, bitmap, text, candidates, clampForce, overlapPadding, shouldClone);
3175531757
}
3175631758
return !1;
3175731759
}
@@ -32135,18 +32137,18 @@ function shiftY(texts, option) {
3213532137
textInformation.get(text).attempts = attempts;
3213632138
};
3213732139
function adjustPositionInOneGroup(texts) {
32138-
var text;
32139-
if (1 !== texts.length) for (let i = texts.length - 1; i > 0; i--) {
32140+
for (let i = texts.length - 1; i >= 0; i--) {
3214032141
const curText = texts[i],
3214132142
upperText = texts[i - 1],
3214232143
lowerText = texts[i + 1];
32143-
if (isIntersect(getY1(upperText) + getHeight(upperText), getY1(curText))) {
32144+
if (upperText && isIntersect(getY1(upperText) + getHeight(upperText), getY1(curText)) || 0 === getY1(curText) && curText._isClamped) {
3214432145
const {
3214532146
y: y
3214632147
} = labelling(curText);
3214732148
lowerText && isIntersect(y + getHeight(curText) / 2, getY1(lowerText)) || y + getHeight(curText) / 2 <= maxY && setY1(curText, getY1(curText) + y - (text = curText, textInformation.get(text).y));
3214832149
}
3214932150
}
32151+
var text;
3215032152
}
3215132153
texts.sort((a, b) => a.attribute.x - b.attribute.x);
3215232154
for (const text of texts) {
@@ -32510,12 +32512,35 @@ class LabelBase extends AbstractComponent {
3251032512
const text = result[i],
3251132513
bounds = text.AABBBounds,
3251232514
range = boundToRange(bmpTool, bounds, !0);
32513-
canPlace(bmpTool, bitmap, bounds, clampForce, text._isClamped ? 0 : overlapPadding) ? bitmap.setRange(range) : hideOnHit ? text.setAttributes({
32514-
visible: !1
32515-
}) : bitmap.setRange(range);
32515+
if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) bitmap.setRange(range);else {
32516+
if (clampForce) {
32517+
if (this._processClampForce(text, bmpTool, bitmap)) continue;
32518+
}
32519+
hideOnHit ? text.setAttributes({
32520+
visible: !1
32521+
}) : bitmap.setRange(range);
32522+
}
3251632523
}
3251732524
return result;
3251832525
}
32526+
_processClampForce(text, bmpTool, bitmap) {
32527+
const {
32528+
dy = 0,
32529+
dx = 0
32530+
} = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
32531+
if (0 === dx && 0 === dy) {
32532+
if (canPlace(bmpTool, bitmap, text.AABBBounds)) return bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
32533+
} else if (canPlace(bmpTool, bitmap, {
32534+
x1: text.AABBBounds.x1 + dx,
32535+
x2: text.AABBBounds.x2 + dx,
32536+
y1: text.AABBBounds.y1 + dy,
32537+
y2: text.AABBBounds.y2 + dy
32538+
})) return text.setAttributes({
32539+
x: text.attribute.x + dx,
32540+
y: text.attribute.y + dy
32541+
}), bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), !0;
32542+
return !1;
32543+
}
3251932544
_overlapByStrategy(labels, option, bmpTool, bitmap) {
3252032545
var _a;
3252132546
const {
@@ -32564,25 +32589,8 @@ class LabelBase extends AbstractComponent {
3256432589
break;
3256532590
}
3256632591
if (!hasPlace && clampForce) {
32567-
const {
32568-
dx = 0,
32569-
dy = 0
32570-
} = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
32571-
if (0 === dx && 0 === dy) {
32572-
if (canPlace(bmpTool, bitmap, text.AABBBounds)) {
32573-
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
32574-
continue;
32575-
}
32576-
} else if (canPlace(bmpTool, bitmap, {
32577-
x1: text.AABBBounds.x1 + dx,
32578-
x2: text.AABBBounds.x2 + dx,
32579-
y1: text.AABBBounds.y1 + dy,
32580-
y2: text.AABBBounds.y2 + dy
32581-
})) {
32582-
text.setAttributes({
32583-
x: text.attribute.x + dx,
32584-
y: text.attribute.y + dy
32585-
}), bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
32592+
if (this._processClampForce(text, bmpTool, bitmap)) {
32593+
result.push(text);
3258632594
continue;
3258732595
}
3258832596
}
@@ -61920,7 +61928,7 @@ const registerVChartCore = () => {
6192061928
};
6192161929
registerVChartCore();
6192261930

61923-
const version = "1.12.14";
61931+
const version = "1.12.15";
6192461932

6192561933
const addVChartProperty = (data, op) => {
6192661934
const context = op.beforeCall();

packages/lark-vchart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visactor/lark-vchart",
3-
"version": "1.12.14",
3+
"version": "1.12.15",
44
"description": "VChart 飞书小程序组件",
55
"main": "index.js",
66
"files": [

packages/lark-vchart/src/vchart/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)