Skip to content

Commit

Permalink
Merge pull request #88 from reuters-graphics/81-scrolly-preload-doesn…
Browse files Browse the repository at this point in the history
…t-work-with-archieml-integration

allow preload in Google block for scroller. closes #81
  • Loading branch information
hobbes7878 authored Jul 6, 2023
2 parents d1dbc33 + f68e9ac commit 6d8a379
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Scroller/docProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface BlockStep {
interface Block {
Type: string;
Width: string;
Preload?: string;
ForegroundPosition: string;
StackBackground?: string;
EmbeddedLayout?: string;
Expand All @@ -27,6 +28,7 @@ export const getScrollerPropsFromDoc = (docBlock: Block, aiCharts: AiCharts, ass
foregroundPosition: docBlock.ForegroundPosition,
stackBackground: docBlock.StackBackground === 'true' || !docBlock.StackBackground,
embeddedLayout: docBlock.EmbeddedLayout,
preload: docBlock.Preload ? parseInt(docBlock.Preload) || 1 : 1,
steps: docBlock.Steps.map((step) => ({
background: aiCharts[step.Background],
backgroundProps: { assetsPath },
Expand Down

0 comments on commit 6d8a379

Please sign in to comment.