Zebra API Doc

zebra.ui.ImagePan Class

Image panel UI component class. The component renders an image.

Constructor

zebra.ui.ImagePan

(
  • [img]
)

Parameters:

  • [img] String | Image optional

    a path or direct reference to an image object. If the passed parameter is string it considered as path to an image. In this case the image will be loaded using the passed path.

Item Index

Attributes

Methods

calcPreferredSize

(
  • t
)
Object

Inherited from zebra.ui.ViewPan:

Override the parent method to calculate preferred size basing on a target view.

Parameters:


Return: Object

return a target view preferred size if it is defined. The returned structure is the following: { width: {Integer}, height:{Integer} }

setImage

(
  • img
)
chainable

Set image to be rendered in the UI component

Parameters:

  • img String | Image | zebra.ui.Picture

    a path or direct reference to an image or zebra.ui.Picture render. If the passed parameter is string it considered as path to an image. In this case the image will be loaded using the passed path

setView

(
  • v
)
chainable

Inherited from zebra.ui.ViewPan:

Set the target view to be wrapped with the UI component

Parameters:

  • v zebra.ui.View | Function

    a view or a rendering view "paint(g,x,y,w,h,c)" function

Attributes

view

zebra.ui.View readonly

Inherited from zebra.ui.ViewPan:

Reference to a view that the component visualize

Default: null