
- import { HorizontalScroller, Block } from '@reuters-graphics/graphics-components';
+ import {
+ HorizontalScroller,
+ Block,
+ } from '@reuters-graphics/graphics-components';
import AiGraphic from './ai2svelte/ai-graphic.svelte';
// If using with the graphics kit
@@ -166,11 +179,7 @@ allow_overflow: true
-
+
@@ -184,7 +193,7 @@ The demo below has 2 advanced interactions: fade in/out of caption boxes based o
### Captions fading in/out
-Caption boxes are exported as `htext` [tagged layers](https://reuters-graphics.github.io/ai2svelte/users/tagged-layers/) in ai2svelte. In this example, we use the `handleScroll()` function to check the position of each caption box relative to the viewport width and set its opacity to `1` (visible) or `0` (hidden) based on whether the caption box is within the `threshold` of the viewport.
+Caption boxes are exported as `htext` [tagged layers](https://reuters-graphics.github.io/ai2svelte/users/tagged-layers/) in ai2svelte. In this example, we use the `handleScroll()` function to check the position of each caption box relative to the viewport width and set its opacity to `1` (visible) or `0` (hidden) based on whether the caption box is within the `threshold` of the viewport. Set `override_text: true` in the ai2svelte export settings to allow custom HTML content in tagged text layers.
### Parallax effect with png layer
@@ -194,7 +203,10 @@ This demo has a tagged `png` [layer](https://reuters-graphics.github.io/ai2svelt
```svelte
@@ -259,21 +274,24 @@ This demo has a tagged `png` [layer](https://reuters-graphics.github.io/ai2svelt
easing={sineInOut}
showDebugInfo={true}
>
-
Caption 1!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.