Skip to content

Commit

Permalink
fix(sheet): header hidden (#1954)
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer committed Apr 17, 2024
1 parent 2564456 commit e3dc9ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions examples/src/slides/main.ts
Expand Up @@ -21,6 +21,7 @@ import { UniverSlidesPlugin } from '@univerjs/slides';
import { UniverSlidesUIPlugin } from '@univerjs/slides-ui';
import { UniverUIPlugin } from '@univerjs/ui';

import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { DEFAULT_SLIDE_DATA } from '../data';

// univer
Expand All @@ -31,6 +32,7 @@ const univer = new Univer({

// base-render
univer.registerPlugin(UniverRenderEnginePlugin);
univer.registerPlugin(UniverFormulaEnginePlugin);
univer.registerPlugin(UniverUIPlugin, {
container: 'univer-container',
header: true,
Expand Down
Expand Up @@ -35,7 +35,7 @@ export class ColumnHeaderLayout extends SheetExtension {
const { rowColumnSegment, columnHeaderHeight = 0 } = spreadsheetSkeleton;
const { startColumn, endColumn } = rowColumnSegment;

if (!spreadsheetSkeleton) {
if (!spreadsheetSkeleton || columnHeaderHeight === 0) {
return;
}

Expand Down
Expand Up @@ -31,9 +31,9 @@ export class RowHeaderLayout extends SheetExtension {
override Z_INDEX = 10;

override draw(ctx: UniverRenderingContext, parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton) {
const { rowColumnSegment, rowHeaderWidth = 0, columnHeaderHeight = 0 } = spreadsheetSkeleton;
const { startRow, endRow, startColumn, endColumn } = rowColumnSegment;
if (!spreadsheetSkeleton) {
const { rowColumnSegment, rowHeaderWidth = 0 } = spreadsheetSkeleton;
const { startRow, endRow } = rowColumnSegment;
if (!spreadsheetSkeleton || rowHeaderWidth === 0) {
return;
}

Expand Down

0 comments on commit e3dc9ce

Please sign in to comment.