In the params field of each instance there is an index field, which stores the index of the instance in the array of instances, by which it will be deleted from there after instanse.dispose(). Index is obtained from the data-attribute node of the scroller element. However, in data-attribute, the index is put in the init function, and it is obtained in the baron function BEFORE init. If an instance is created for a new scroller, the scroller does not have a data-attribute with an index, and 0 is written to instance.params.index.
In the params field of each instance there is an index field, which stores the index of the instance in the array of instances, by which it will be deleted from there after instanse.dispose(). Index is obtained from the data-attribute node of the scroller element. However, in data-attribute, the index is put in the init function, and it is obtained in the baron function BEFORE init. If an instance is created for a new scroller, the scroller does not have a data-attribute with an index, and 0 is written to instance.params.index.