Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sheet): header hidden #1954

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/src/slides/main.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading