Skip to content

Commit

Permalink
survey backgroundImage should not be localized
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Aug 17, 2023
1 parent ad689f6 commit 0e5575c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,6 @@ export class SurveyModel extends SurveyElementCore
this.createHtmlLocString("completedBeforeHtml", "completingSurveyBefore", htmlCallBack, "completed-before");
this.createHtmlLocString("loadingHtml", "loadingSurvey", htmlCallBack, "loading");
this.createLocalizableString("logo", this, false);
this.createLocalizableString("backgroundImage", this, false);
this.createLocalizableString("startSurveyText", this, false, true);
this.createLocalizableString("pagePrevText", this, false, true);
this.createLocalizableString("pageNextText", this, false, true);
Expand Down Expand Up @@ -2025,18 +2024,10 @@ export class SurveyModel extends SurveyElementCore
* An image to display in the background of the survey or form. Accepts a base64 or URL string value.
* @see backgroundOpacity
*/
public get backgroundImage(): string {
return this.getLocalizableStringText("backgroundImage");
}
public set backgroundImage(value: string) {
this.setLocalizableStringText("backgroundImage", value);
}
get locBackgroundImage(): LocalizableString {
return this.getLocalizableString("backgroundImage");
}
@property() backgroundImage: string;
@property() renderBackgroundImage: string;
private updateRenderBackgroundImage(): void {
const path = this.getLocalizableString("backgroundImage").renderedHtml;
const path = this.backgroundImage;
this.renderBackgroundImage = !!path ? ["url(", path, ")"].join("") : "";
}
@property() backgroundImageFit: ImageFit;
Expand Down Expand Up @@ -7455,7 +7446,7 @@ Serializer.addClass("survey", [
choices: ["auto", "static", "responsive"],
},
{ name: "width", visibleIf: (obj: any) => { return obj.widthMode === "static"; } },
{ name: "backgroundImage", serializationProperty: "locBackgroundImage", visible: false },
{ name: "backgroundImage", visible: false },
{ name: "backgroundImageFit", default: "cover", choices: ["auto", "contain", "cover"], visible: false },
{ name: "backgroundImageAttachment", default: "scroll", choices: ["scroll", "fixed"], visible: false },
{ name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
Expand Down

0 comments on commit 0e5575c

Please sign in to comment.