Skip to content

Commit a2014e0

Browse files
committed
fix: Fix floating point error
1 parent 717fd74 commit a2014e0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Chart.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ export default function Chart({
136136
return { uri }
137137
}, [])
138138

139-
const textZoom = Math.min(MAX_TEXT_ZOOM, PixelRatio.getFontScale() * 100)
139+
const textZoom = Math.min(
140+
MAX_TEXT_ZOOM,
141+
Math.round(PixelRatio.getFontScale() * 100)
142+
)
140143

141144
return (
142145
<View style={{ width, height }}>

0 commit comments

Comments
 (0)