From e626991734985b437d1c8d9fe48e6241c955b896 Mon Sep 17 00:00:00 2001 From: OlgaLarina Date: Mon, 23 Dec 2024 18:06:00 +0300 Subject: [PATCH] hide surface toolbar for small screen --- .../survey-creator-core/src/components/tabs/designer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/survey-creator-core/src/components/tabs/designer.ts b/packages/survey-creator-core/src/components/tabs/designer.ts index a9e1757dd0..ac82592d50 100644 --- a/packages/survey-creator-core/src/components/tabs/designer.ts +++ b/packages/survey-creator-core/src/components/tabs/designer.ts @@ -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; @@ -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) {