Skip to content

Commit

Permalink
hide surface toolbar for small screen
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Dec 23, 2024
1 parent 06c5f78 commit e626991
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/survey-creator-core/src/components/tabs/designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ export class TabDesignerViewModel extends Base {
return getLocString("ed.surveyPlaceholderDescription");
}
public get showSurfaceToolbar(): boolean {
return this.creator.allowShowSurfaceToolbar;
return this.creator.allowShowSurfaceToolbar && !this.surfaceToolbar.isEmpty;
}
public get showSurfaceTools(): boolean {
return !this.creator.isMobileView && (this.showSurfaceToolbar || this.creator.showPageNavigator);
return !this.creator.isMobileView && (this.showSurfaceToolbar || (this.creator.showPageNavigator && this.survey.pageCount > 1));
}

private isUpdatingNewPage: boolean;
Expand Down Expand Up @@ -384,7 +384,7 @@ export class TabDesignerViewModel extends Base {
}
public getRootCss(): string {
let rootCss = this.survey.css.root;
if (this.creator.showPageNavigator || (this.showSurfaceToolbar && !this.surfaceToolbar.isEmpty)) {
if (this.showSurfaceTools) {
rootCss += " svc-tab-designer--with-surface-tools";
}
if (this.showPlaceholder) {
Expand Down

0 comments on commit e626991

Please sign in to comment.