mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-09 04:07:33 +08:00
fix: scrollbar overflow on zoom
This commit is contained in:
parent
e20abcbbf6
commit
5c6877817c
@ -74,7 +74,13 @@ const Sheet: React.FC<Props> = ({ sheet }) => {
|
||||
placeholderRef.current!
|
||||
)
|
||||
);
|
||||
}, [refs.canvas, setContext]);
|
||||
}, [
|
||||
refs.canvas,
|
||||
setContext,
|
||||
context.rowHeaderWidth,
|
||||
context.columnHeaderHeight,
|
||||
context.devicePixelRatio,
|
||||
]);
|
||||
|
||||
/**
|
||||
* Recalculate freeze data when sheet changes or sheet.frozen changes
|
||||
|
@ -25,7 +25,7 @@ const ScrollBar: React.FC<Props> = ({ axis }) => {
|
||||
axis === "x"
|
||||
? {
|
||||
left: context.rowHeaderWidth,
|
||||
width: context.cellmainWidth,
|
||||
width: `calc(100% - ${context.rowHeaderWidth}px)`,
|
||||
}
|
||||
: { height: "100%" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user