Skip to content

Commit 7f87a6e

Browse files
committed
fix: disabling the header and footer through the api is ineffective #1278
1 parent bc76acd commit 7f87a6e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/editor/core/draw/frame/Footer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class Footer {
104104
}
105105

106106
public getHeight(): number {
107+
if (this.options.footer.disabled) return 0
107108
const maxHeight = this.getMaxHeight()
108109
const rowHeight = this.getRowHeight()
109110
return rowHeight > maxHeight ? maxHeight : rowHeight

src/editor/core/draw/frame/Header.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export class Header {
107107
}
108108

109109
public getHeight(): number {
110+
if (this.options.header.disabled) return 0
110111
const maxHeight = this.getMaxHeight()
111112
const rowHeight = this.getRowHeight()
112113
return rowHeight > maxHeight ? maxHeight : rowHeight

0 commit comments

Comments
 (0)