toloka.client.project.template_builder.view.ImageViewV1
| Source code
ImageViewV1( self, url: Optional[Any] = None, *, full_height: Optional[Union[BaseComponent, bool]] = None, max_width: Optional[Union[BaseComponent, float]] = None, min_width: Optional[Union[BaseComponent, float]] = None, no_border: Optional[Union[BaseComponent, bool]] = None, no_lazy_load: Optional[Union[BaseComponent, bool]] = None, popup: Optional[Union[BaseComponent, bool]] = None, ratio: Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] = None, rotatable: Optional[Union[BaseComponent, bool]] = None, scrollable: Optional[Union[BaseComponent, bool]] = None, hint: Optional[Any] = None, label: Optional[Any] = None, validation: Optional[BaseComponent] = None, version: Optional[str] = '1.0.0')
A component for displaying an image.
For more information, see view.image.
Parameters | Type | Description |
---|---|---|
url | Optional[Any] | The URL of the image. |
full_height | Optional[Union[BaseComponent, bool]] | If |
max_width | Optional[Union[BaseComponent, float]] | The maximum width of the component in pixels. |
min_width | Optional[Union[BaseComponent, float]] | The minimum width of the component in pixels. It takes priority over the |
no_border | Optional[Union[BaseComponent, bool]] | Displaying borders around the image.
Default value: |
no_lazy_load | Optional[Union[BaseComponent, bool]] | Loading mode:
Default value: |
popup | Optional[Union[BaseComponent, bool]] | If |
ratio | Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] | A list with the aspect ratio of the component. Specify the relative width first and then the relative height. This setting is not used if |
rotatable | Optional[Union[BaseComponent, bool]] | If |
scrollable | Optional[Union[BaseComponent, bool]] | The way of displaying an image which is larger than the component:
Note, that images in SVG format with no size specified always fit the component. |
hint | Optional[Any] | A hint text. |
label | Optional[Any] | A label above the component. |
validation | Optional[BaseComponent] | Validation rules. |
Last updated: August 28, 2023