Couldn't find any way to make the initial image opacity 1. Would be really nice if there was an option to have the initial image show and then fade all images after that.
Great job and thanks for sharing!
EDITFor anyone else looking to do this:
Note: initialLoop is used to make sure we only set fade duration on idx 0 once (initially).
in constructor:
Couldn't find any way to make the initial image opacity 1. Would be really nice if there was an option to have the initial image show and then fade all images after that.
Great job and thanks for sharing!
EDIT For anyone else looking to do this: Note: initialLoop is used to make sure we only set fade duration on idx 0 once (initially). in constructor:
in observedAttributes:
in attributeChangedCallback:
change:
to
and below
this._timeout = setTimeout(() => insert(nextIndex, next), this.slideDuration - this.fadeDuration);
add:Then in component (which is now false by default), to fade first image (initially):