Merge pull request #88 from reuters-graphics/81-scrolly-preload-doesnt-work-with-archieml-integration

allow preload in Google block for scroller. closes #81
This commit is contained in:
Jon McClure 2023-07-06 19:56:34 +01:00 committed by GitHub
commit 6d8a37920b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 },