Skip to content

Commit

Permalink
Reset default logoHeight and logoWidth for survey (#9215)
Browse files Browse the repository at this point in the history
* Reset default logoHeight and logoWidth for survey
Fixes #4569

* Reset default logoHeight and logoWidth for survey
Fixes #4569 - Updated etalons

* Update descriptions

---------

Co-authored-by: tsv2013 <[email protected]>
Co-authored-by: RomanTsukanov <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2025
1 parent 9c48117 commit a1325a2
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions packages/survey-core/src/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2246,10 +2246,9 @@ export class SurveyModel extends SurveyElementCore
/**
* A logo width in CSS-accepted values.
*
* Default value: `300px`
* Default value: `auto` (the width is calculated automatically based on the [`logoHeight`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#logoHeight) value to keep the original aspect ratio)
*
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
* @see logoHeight
* @see logo
* @see logoPosition
* @see logoFit
Expand All @@ -2271,10 +2270,10 @@ export class SurveyModel extends SurveyElementCore
/**
* A logo height in CSS-accepted values.
*
* Default value: `200px`
* Default value: `40px`
*
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
* @see logoHeight
* @see logoWidth
* @see logo
* @see logoPosition
* @see logoFit
Expand Down Expand Up @@ -8302,8 +8301,8 @@ Serializer.addClass("survey", [
dependsOn: "locale",
},
{ name: "logo:file", serializationProperty: "locLogo" },
{ name: "logoWidth", default: "300px", minValue: 0 },
{ name: "logoHeight", default: "200px", minValue: 0 },
{ name: "logoWidth", default: "auto", minValue: 0 },
{ name: "logoHeight", default: "40px", minValue: 0 },
{
name: "logoFit",
default: "contain",
Expand Down
10 changes: 5 additions & 5 deletions packages/survey-core/tests/surveytests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14953,11 +14953,11 @@ QUnit.test("getSize", function (assert) {
});
QUnit.test("survey logo size", function (assert) {
var survey = new SurveyModel();
assert.equal(survey.logoWidth, "300px", "300px");
assert.equal(survey.logoHeight, "200px", "200px");
assert.equal(survey.renderedLogoWidth, 300);
assert.equal(survey.renderedLogoHeight, 200);
assert.equal(survey.renderedStyleLogoWidth, undefined);
assert.equal(survey.logoWidth, "auto", "auto");
assert.equal(survey.logoHeight, "40px", "40px");
assert.equal(survey.renderedLogoWidth, undefined);
assert.equal(survey.renderedLogoHeight, 40);
assert.equal(survey.renderedStyleLogoWidth, "auto");
assert.equal(survey.renderedStyleLogoHeight, undefined);
survey.logoWidth = "100%";
survey.logoHeight = "auto";
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a1325a2

Please sign in to comment.