From ce5780b5e14f6435ef5377f9b941b5b454d88f21 Mon Sep 17 00:00:00 2001
From: Majid Valipour
Date: Mon, 27 Aug 2018 15:07:34 -0400
Subject: [PATCH] [css-animationworklet] update ScrollTimeline usage in
examples to match latest syntax
---
css-animationworklet/Overview.bs | 19 ++++++++++++++++---
css-animationworklet/README.md | 23 ++++++++++++++++++-----
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/css-animationworklet/Overview.bs b/css-animationworklet/Overview.bs
index 62dc5c73..f49c3470 100644
--- a/css-animationworklet/Overview.bs
+++ b/css-animationworklet/Overview.bs
@@ -747,7 +747,11 @@ animates fully to close or open position depending on its current position.
@@ -296,7 +305,11 @@ registerAnimator('twitter-header', class {
await animationWorklet.addModule('parallax-animator.js');
-const scrollTimeline = new ScrollTimeline($scrollingContainer, {timeRange: 1000});
+const scrollTimeline = new ScrollTimeline({
+ scrollSource: $scrollingContainer,
+ orientation: 'block',
+ timeRange: 1000
+});
const scrollRange = $scrollingContainer.scrollHeight - $scrollingContainer.clientHeight;
const slowParallax = new WorkletAnimation(