Merge pull request #37 from reuters-graphics/stack-background-preload-fix
This commit is contained in:
commit
2d8e98d3c3
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
{#each steps as step, i}
|
||||
<!-- Load the step(s) before and after the active one, only -->
|
||||
{#if preload === 0 || (i >= index - preload && i <= index + preload)}
|
||||
<!-- Unless stackBackground is true. If so, keep all steps before the current one loaded. -->
|
||||
{#if preload === 0 || (i >= (stackBackground ? 0 : index - preload) && i <= index + preload)}
|
||||
<div
|
||||
class="step-background step-{i + 1}"
|
||||
class:visible="{stackBackground ? i <= index : i === index}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue