From f68e9ac96d671f49f6a0fb6fa5847c750581a726 Mon Sep 17 00:00:00 2001 From: Jon McClure Date: Thu, 6 Jul 2023 19:52:41 +0100 Subject: [PATCH] allow preload in Google block for scroller. closes #81 --- src/components/Scroller/docProps.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Scroller/docProps.ts b/src/components/Scroller/docProps.ts index aa8cba51..6f13154e 100644 --- a/src/components/Scroller/docProps.ts +++ b/src/components/Scroller/docProps.ts @@ -9,6 +9,7 @@ interface BlockStep { interface Block { Type: string; Width: string; + Preload?: string; ForegroundPosition: string; StackBackground?: string; EmbeddedLayout?: string; @@ -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 },