Skip to content

Commit

Permalink
showPanelAsPage refactor (#8123)
Browse files Browse the repository at this point in the history
  • Loading branch information
novikov82 authored Apr 16, 2024
1 parent 8e6cb29 commit 0eac48e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,9 @@ export class PanelModel extends PanelModelBase implements IElement {
return super.getIsNested() && this.parent !== undefined;
}
public get showPanelAsPage(): boolean {
return !!(<any>this).originalPage || (<any>this.survey).isShowingPreview && (<any>this.survey).isSinglePage && !!(<any>this).parent && !!(<any>this).parent.originalPage;
const panel = <any>this;
if (!!panel.originalPage) return true;
return panel.survey.isShowingPreview && panel.survey.isSinglePage && !!panel.parent && !!panel.parent.originalPage;
}
protected getCssRoot(cssClasses: { [index: string]: string }): string {
return new CssClassBuilder()
Expand Down

0 comments on commit 0eac48e

Please sign in to comment.