From 853afacd3220028a23fda7cc091473c288f675d3 Mon Sep 17 00:00:00 2001 From: CodeMak1r Date: Fri, 13 Dec 2024 12:06:01 +0800 Subject: [PATCH] fix: ui bounce in short time --- src/tooltip.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tooltip.js b/src/tooltip.js index 3098692..7d924f8 100644 --- a/src/tooltip.js +++ b/src/tooltip.js @@ -243,7 +243,9 @@ class Tooltip extends Component { measureContent = e => { const { width, height } = e.nativeEvent.layout; - const contentSize = new Size(width, height); + const contentMeasureWidth = Math.round(width); + const contentMeasureHeight = Math.round(height); + const contentSize = new Size(contentMeasureWidth, contentMeasureHeight); this.setState({ contentSize }, () => { this.computeGeometry(); });