Image
This element allows us to embed (attach) url of the required image in the data.
Example
API Methods
setFillImage
- Method
- Usage
setFillImage(fillImage: boolean): void
// Fills the image when set to true
a8forms.Image("imageId").setFillImage(true)
// Doesn't fill the image when set to false
a8forms.Image("imageId").setFillImage(false)
setImageSrc
Sets src to image of the node.
- Method
- Usage
setImageSrc(src: string): void
// Sets the Image Path
a8forms.Image("imageId").setImageSrc("Image url")
setSize
Sets the image size using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size of the Image to small
a8forms.Checkbox("imageId").setSize("small")
//Sets the size of the Image to medium
a8forms.Checkbox("imageId").setSize("medium")
//Sets the size of the Image to large
a8forms.Image("imageId").setSize("large")
setVisibility
Sets if elements of the given category is visible in this view.
- Method
- Usage
setVisibility(visible: boolean): void
// setting the visibility true makes the element to visible
a8forms.Checkbox("imageId").setVisibility(true)
// setting the visibility false makes the element to not visible
a8forms.Image("imageId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.Image("imageId").setVisibilityCondition("1 == 1");