Working with selectable methods
The methods that we can use to control the selectables component from our code are similar to the methods found in other interaction helpers and follow the same pattern of usage. The only unique method exposed by the selectables component is listed as follows:
Method |
Usage |
---|---|
|
Manually refreshes the positions and sizes of all selectables. Should be used when |
In addition to this unique method, the selectables component (like every other component) makes use of the common API methods destroy
, disable
, enable
, option
, and widget
.
Refreshing selectables
Setting the autoRefresh
property to
false
can yield performance gains when there are many selectables on the page, especially in Internet Explorer. However, there will still be times when you will need to refresh the size and positions of the selectables, such as when this component is combined with the draggables component.
Let's take a look at the refresh
method as it leads...