Skip to content

Commit 876f48b

Browse files
committed
fix: global shiftY sort by initialY
1 parent 8e022ee commit 876f48b

File tree

1 file changed

+1
-1
lines changed
  • packages/vrender-components/src/label/overlap

1 file changed

+1
-1
lines changed

packages/vrender-components/src/label/overlap/shiftY.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export function shiftY(texts: IText[], option: IShiftYOption) {
185185
deltaYTolerance = Number.MAX_VALUE
186186
} = globalShiftY;
187187
for (let iter = 0; iter < maxIterations; iter++) {
188-
texts.sort((a, b) => getY1(a) - getY1(b));
188+
texts.sort((a, b) => getY1Initial(a) - getY1Initial(b));
189189
let error = 0;
190190
for (let i = 0; i < n - 1; i++) {
191191
const curText = texts[i];

0 commit comments

Comments
 (0)