A.WidgetResponsive Class
Widget extension, which can be used to add responsive support to the base Widget class, through the Base.build method.
Index
Methods
Attributes
Events
Methods
_calculateOriginalDimensions
()
Object
protected
Calculates the original width and height of the widget, which will be used when changing its dimensions to preserve its ratio.
Returns:
<p><p><p><p>An object with the original dimensions</p></p></p></p>
_canChangeHeight
()
Boolean
Checks if the height can be manually changed.
Returns:
_canChangeWidth
()
Boolean
Checks if the width can be manually changed.
Returns:
_defResponsiveFn
-
event
Default behavior for the responsive
event. It updates the dimensions of
the widget so it will respect the preserveRatio
, maxHeight
and maxWidth
attributes.
Parameters:
-
event
EventFacade
_handleResponsive
()
protected
Fires the responsive
event.
destructor
()
protected
Destructor implementation. Lifecycle.
initializer
()
protected
Construction logic executed during instantiation. Lifecycle.
updateDimensions
()
Updates the widget's dimensions so that it will fit the page better.
updateDimensionsWithNewRatio
()
Updates the widget's dimensions like the updateDimensions
method, but
also recalculates the ratio to be preserved. Useful if the visible content
of the widget has changed causing the ratio to change as well.
Attributes
Events
responsive
Fired when the widget will be updated to be responsive.