提交 27058cbc 编写于 作者: P pissang

fix(treemap): fix upper label truncate in zoom animation

上级 1e62b333
......@@ -982,18 +982,20 @@ function renderNode(
});
(textEl as ECElement).disableLabelLayout = true;
}
else {
textEl.beforeUpdate = function () {
const width = Math.max(rectEl.shape.width - textPadding[1] - textPadding[3], 0);
const height = Math.max(rectEl.shape.height - textPadding[0] - textPadding[2], 0);
if (textStyle.width !== width || textStyle.height !== height) {
textEl.setStyle({
width,
height
});
}
};
}
textEl.beforeUpdate = function () {
const width = Math.max(
(upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0
);
const height = Math.max(
(upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0
);
if (textStyle.width !== width || textStyle.height !== height) {
textEl.setStyle({
width,
height
});
}
};
textStyle.truncateMinChar = 2;
textStyle.lineOverflow = 'truncate';
......
......@@ -99,6 +99,7 @@ export function createWrap() {
duration: item.time,
delay: item.delay,
easing: item.easing,
setToFinal: true,
done
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册