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:
commit
6d8a37920b
1 changed files with 2 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ interface BlockStep {
|
||||||
interface Block {
|
interface Block {
|
||||||
Type: string;
|
Type: string;
|
||||||
Width: string;
|
Width: string;
|
||||||
|
Preload?: string;
|
||||||
ForegroundPosition: string;
|
ForegroundPosition: string;
|
||||||
StackBackground?: string;
|
StackBackground?: string;
|
||||||
EmbeddedLayout?: string;
|
EmbeddedLayout?: string;
|
||||||
|
|
@ -27,6 +28,7 @@ export const getScrollerPropsFromDoc = (docBlock: Block, aiCharts: AiCharts, ass
|
||||||
foregroundPosition: docBlock.ForegroundPosition,
|
foregroundPosition: docBlock.ForegroundPosition,
|
||||||
stackBackground: docBlock.StackBackground === 'true' || !docBlock.StackBackground,
|
stackBackground: docBlock.StackBackground === 'true' || !docBlock.StackBackground,
|
||||||
embeddedLayout: docBlock.EmbeddedLayout,
|
embeddedLayout: docBlock.EmbeddedLayout,
|
||||||
|
preload: docBlock.Preload ? parseInt(docBlock.Preload) || 1 : 1,
|
||||||
steps: docBlock.Steps.map((step) => ({
|
steps: docBlock.Steps.map((step) => ({
|
||||||
background: aiCharts[step.Background],
|
background: aiCharts[step.Background],
|
||||||
backgroundProps: { assetsPath },
|
backgroundProps: { assetsPath },
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue