Skip to content

Commit

Permalink
Fixed surveyjs/survey-library#8797 - Advanced Header - The header hei…
Browse files Browse the repository at this point in the history
…ght is decreased on a mobile and a header image is undistinguishable
  • Loading branch information
tsv2013 committed Sep 18, 2024
1 parent 9a69576 commit ec83c75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/survey-creator-core/src/components/tabs/header-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { assign } from "../../utils/utils";

export class HeaderModel extends Base implements IHeader {
height: number;
mobileHeight: number;
inheritWidthFrom: "survey" | "container";
textAreaWidth: number;
overlapEnabled: boolean;
Expand Down Expand Up @@ -176,6 +177,18 @@ Serializer.addClass(
}
}
},
{
type: "spinedit",
name: "mobileHeight",
visibleIf: (obj) => obj.headerView === "advanced",
default: 0,
onPropertyEditorUpdate: function (obj: any, editor: any) {
if (!!editor) {
editor.unit = "px";
editor.min = 0;
}
}
},
{
type: "buttongroup",
name: "inheritWidthFrom",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const themeModelProperties: ISurveyPropertiesDefinition = {
{ name: "surveyTitle" },
{ name: "surveyDescription" },
{ name: "height", tab: "layout" },
{ name: "mobileHeight", tab: "layout" },
{ name: "inheritWidthFrom", tab: "layout" },
{ name: "textAreaWidth", tab: "layout" },

Expand Down

0 comments on commit ec83c75

Please sign in to comment.