Skip to content

Commit a42592b

Browse files
authored
fix: Tabs flicker in zoom mode (#747)
1 parent 40ac121 commit a42592b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useVisibleRange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function useVisibleRange(
3838
let endIndex = len;
3939
for (let i = 0; i < len; i += 1) {
4040
const offset = tabOffsets.get(tabs[i].key) || DEFAULT_SIZE;
41-
if (offset[position] + offset[charUnit] > transformSize + visibleTabContentValue) {
41+
if (Math.floor(offset[position] + offset[charUnit]) > Math.floor(transformSize + visibleTabContentValue)) {
4242
endIndex = i - 1;
4343
break;
4444
}

0 commit comments

Comments
 (0)