mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-09 04:07:33 +08:00
fix: row header and column header not responding to zoom
This commit is contained in:
parent
6f8a77849c
commit
925705b6b3
@ -558,9 +558,6 @@ const Workbook = React.forwardRef<WorkbookInstance, Settings & AdditionalProps>(
|
||||
draftCtx.defaultcolumnNum = mergedSettings.column;
|
||||
draftCtx.defaultrowNum = mergedSettings.row;
|
||||
draftCtx.defaultFontSize = mergedSettings.defaultFontSize;
|
||||
draftCtx.rowHeaderWidth = mergedSettings.rowHeaderWidth || 1.5;
|
||||
draftCtx.columnHeaderHeight =
|
||||
mergedSettings.columnHeaderHeight || 1.5;
|
||||
if (_.isEmpty(draftCtx.luckysheetfile)) {
|
||||
const newData = produce(originalData, (draftData) => {
|
||||
ensureSheetIndex(draftData, mergedSettings.generateSheetId);
|
||||
@ -635,6 +632,10 @@ const Workbook = React.forwardRef<WorkbookInstance, Settings & AdditionalProps>(
|
||||
draftCtx.insertedImgs = sheet.images;
|
||||
|
||||
draftCtx.zoomRatio = _.isNil(sheet.zoomRatio) ? 1 : sheet.zoomRatio;
|
||||
draftCtx.rowHeaderWidth =
|
||||
mergedSettings.rowHeaderWidth * draftCtx.zoomRatio;
|
||||
draftCtx.columnHeaderHeight =
|
||||
mergedSettings.columnHeaderHeight * draftCtx.zoomRatio;
|
||||
|
||||
if (!_.isNil(sheet.defaultRowHeight)) {
|
||||
draftCtx.defaultrowlen = Number(sheet.defaultRowHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user