check for `options.enabled` during init
sjwilliams opened this issue · comments
Josh Williams commented
On init, the call to ._handleRepaint
activates an item, even if the option enabled:false
is set.
We should be able to remedy like so:
// 1. offsets need to be accurate before 'complete'
this.updateOffsets();
// 2. handle any user actions
this._trigger('complete', null, this);
// 3. Set active item, and double check
// scroll position and offsets.
if(this.options.enabled){
this._handleRepaint();
}
(see "95-degree-days" at the nytimes.com for an example)
Josh Williams commented
Closed by dfe6ec7