Skip to content

Commit a1325a2

Browse files
tsv2013tsv2013RomanTsukanov
authored
Reset default logoHeight and logoWidth for survey (#9215)
* 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]>
1 parent 9c48117 commit a1325a2

12 files changed

+10
-11
lines changed

packages/survey-core/src/survey.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,10 +2246,9 @@ export class SurveyModel extends SurveyElementCore
22462246
/**
22472247
* A logo width in CSS-accepted values.
22482248
*
2249-
* Default value: `300px`
2249+
* 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)
22502250
*
22512251
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
2252-
* @see logoHeight
22532252
* @see logo
22542253
* @see logoPosition
22552254
* @see logoFit
@@ -2271,10 +2270,10 @@ export class SurveyModel extends SurveyElementCore
22712270
/**
22722271
* A logo height in CSS-accepted values.
22732272
*
2274-
* Default value: `200px`
2273+
* Default value: `40px`
22752274
*
22762275
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
2277-
* @see logoHeight
2276+
* @see logoWidth
22782277
* @see logo
22792278
* @see logoPosition
22802279
* @see logoFit
@@ -8302,8 +8301,8 @@ Serializer.addClass("survey", [
83028301
dependsOn: "locale",
83038302
},
83048303
{ name: "logo:file", serializationProperty: "locLogo" },
8305-
{ name: "logoWidth", default: "300px", minValue: 0 },
8306-
{ name: "logoHeight", default: "200px", minValue: 0 },
8304+
{ name: "logoWidth", default: "auto", minValue: 0 },
8305+
{ name: "logoHeight", default: "40px", minValue: 0 },
83078306
{
83088307
name: "logoFit",
83098308
default: "contain",

packages/survey-core/tests/surveytests.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14953,11 +14953,11 @@ QUnit.test("getSize", function (assert) {
1495314953
});
1495414954
QUnit.test("survey logo size", function (assert) {
1495514955
var survey = new SurveyModel();
14956-
assert.equal(survey.logoWidth, "300px", "300px");
14957-
assert.equal(survey.logoHeight, "200px", "200px");
14958-
assert.equal(survey.renderedLogoWidth, 300);
14959-
assert.equal(survey.renderedLogoHeight, 200);
14960-
assert.equal(survey.renderedStyleLogoWidth, undefined);
14956+
assert.equal(survey.logoWidth, "auto", "auto");
14957+
assert.equal(survey.logoHeight, "40px", "40px");
14958+
assert.equal(survey.renderedLogoWidth, undefined);
14959+
assert.equal(survey.renderedLogoHeight, 40);
14960+
assert.equal(survey.renderedStyleLogoWidth, "auto");
1496114961
assert.equal(survey.renderedStyleLogoHeight, undefined);
1496214962
survey.logoWidth = "100%";
1496314963
survey.logoHeight = "auto";
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)