Skip to content

Commit

Permalink
Image Picker: Describe min/maxImageWidth/Height (#8077)
Browse files Browse the repository at this point in the history
* Image Picker: Describe min/maxImageWidth/Height

* Apply suggestions from code review

Co-authored-by: Elena Gorbatkova <102306951+ElenaGorbatkova@users.noreply.github.com>

---------

Co-authored-by: Elena Gorbatkova <102306951+ElenaGorbatkova@users.noreply.github.com>
  • Loading branch information
RomanTsukanov and ElenaGorbatkova committed Apr 8, 2024
1 parent 1d99d22 commit 6a7c915
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions src/question_imagepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,12 @@ export class QuestionImagePickerModel extends QuestionCheckboxBase {
/**
* Specifies the height of containers for images or videos. Accepts positive numbers and CSS values.
*
* Default value: undefined
* Default value: `auto`
*
* Use the `imageFit` property to specify how to fit the images or videos into their containers.
* This property allows you to specify the exact image height. If you do not set it, the height will be calculated automatically based on the [`minImageHeight`](#minImageHeight) and [`maxImageHeight`](#maxImageHeight) values and available screen height.
*
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
* @see imageWidth
* @see imageFit
*/
public get imageHeight() {
return this.getPropertyValue("imageHeight");
Expand All @@ -235,11 +236,12 @@ export class QuestionImagePickerModel extends QuestionCheckboxBase {
/**
* Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
*
* Default value: 200
* Default value: `auto`
*
* This property allows you to specify the exact image width. If you do not set it, the width will be calculated automatically based on the [`minImageWidth`](#minImageWidth) and [`maxImageWidth`](#maxImageWidth) values and available screen width.
*
* Use the `imageFit` property to specify how to fit the images or videos into their containers.
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
* @see imageHeight
* @see imageFit
*/
public get imageWidth() {
return this.getPropertyValue("imageWidth");
Expand Down Expand Up @@ -302,9 +304,37 @@ export class QuestionImagePickerModel extends QuestionCheckboxBase {

//responsive mode
@property({}) private isResponsiveValue = false;
/**
* Specifies a maximum width for image or video containers. Accepts positive numbers and CSS values.
*
* Default value: 400
*
* The `minImageWidth`, `maxImageWidth`, `minImageHeight`, and `maxImageHeight` properties specify boundary values for container sizes. The resulting sizes are selected depending on the available screen space. If you want to specify the exact width and height, use the [`imageWidth`](#imageWidth) and [`imageHeight`](#imageHeight) properties.
*/
@property({}) public maxImageWidth: number;
/**
* Specifies a minimum width for image or video containers. Accepts positive numbers and CSS values.
*
* Default value: 200
*
* The `minImageWidth`, `maxImageWidth`, `minImageHeight`, and `maxImageHeight` properties specify boundary values for container sizes. The resulting sizes are selected depending on the available screen space. If you want to specify the exact width and height, use the [`imageWidth`](#imageWidth) and [`imageHeight`](#imageHeight) properties.
*/
@property({}) public minImageWidth: number;
/**
* Specifies a maximum height for image or video containers. Accepts positive numbers and CSS values.
*
* Default value: 266
*
* The `minImageWidth`, `maxImageWidth`, `minImageHeight`, and `maxImageHeight` properties specify boundary values for container sizes. The resulting sizes are selected depending on the available screen space. If you want to specify the exact width and height, use the [`imageWidth`](#imageWidth) and [`imageHeight`](#imageHeight) properties.
*/
@property({}) public maxImageHeight: number;
/**
* Specifies a minimum height for image or video containers. Accepts positive numbers and CSS values.
*
* Default value: 133
*
* The `minImageWidth`, `maxImageWidth`, `minImageHeight`, and `maxImageHeight` properties specify boundary values for container sizes. The resulting sizes are selected depending on the available screen space. If you want to specify the exact width and height, use the [`imageWidth`](#imageWidth) and [`imageHeight`](#imageHeight) properties.
*/
@property({}) public minImageHeight: number;

private get isResponsive() {
Expand Down

0 comments on commit 6a7c915

Please sign in to comment.