Show:

Widget extension, which can be used to add toggle visibility support to the base Widget class, through the Base.build method.

Methods

_afterCurrentIndexChange

(
  • event
)
protected

Fired after the widget's index attribute is changed. Will update the scrollview to show the right item, if it isn't showing it yet.

Parameters:

_afterIndexChange

(
  • event
)
protected

Fired after the scrollview's index attribute is changed. Will update the widget's index accordingly.

Parameters:

_afterResponsiveSwipe

() protected

Fired after the widget's responsive event. This adds back the swipe css class that was removed by _onResponsiveSwipe and then syncs the scroll UI.

_afterWidgetUISetVisible

() protected

Fired after the widget's _uiSetVisible function is called. It prepares the swipe funcionality for use.

_attachSwipeEvents

() protected

Listens to the necessary events for the swipe funcionality to work correctly.

_detachSwipeEvents

() protected

Detaches all events related to the swipe funcionality.

_disableScrollView

() protected

Disables the scroll view, removing the swipe funcionality.

_enableScrollView

() protected

Enables the scroll view, adding the swipe funcionality.

_onResponsiveSwipe

() protected

Fired on the widget's responsive event. This removes the swipe css class, so the responsive code can correctly calculate the widget's size. The css class will be added back by _afterResponsiveSwipe.

_plugPaginator

() protected

Plugs ScrollViewPaginator if the useScrollViewPaginator is true.

_scrollToCurrentIndex

() protected

Scrolls to the widget's current index.

_setSwipe

() protected

Sets swipe attribute.

_syncScrollUI

() protected

This method updates the scroll view with new dimensions and makes sure it's at the correct position.

_uiSetSwipe

() protected

Updates the UI according to the current value of swipe.

destructor

() protected

Destructor lifecycle implementation.

initializer

() protected

Construction logic executed during instantiation. Lifecycle.

toggle

(
  • visible
)

Toggles widget visibility.

Parameters:

  • visible Boolean

    <p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Force the widget to be visible.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>

Properties

WIDGET_INDEX_ATTRIBUTE

String static

Static property used to define the Plugin.ScrollViewPaginator index configuration.

WIDGET_ITEM_SELECTOR

String static

Static property used to define the Plugin.ScrollViewPaginator selector configuration.

Attributes

swipe

Object | Boolean

Turns the swipe interaction on/off.

useScrollViewPaginator

Boolean

Flag indicating if ScrollViewPaginator should be plugged.

Default: true