From 89e0a15d1bd2dae99ac6badf163febdc060cd672 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 16 Feb 2017 08:18:56 -0800 Subject: [PATCH] [fix] add 'timeStamp' to scroll and layout events --- src/components/ScrollView/ScrollViewBase.js | 3 ++- src/modules/applyLayout/index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ScrollView/ScrollViewBase.js b/src/components/ScrollView/ScrollViewBase.js index 7eb22909..a469b7cf 100644 --- a/src/components/ScrollView/ScrollViewBase.js +++ b/src/components/ScrollView/ScrollViewBase.js @@ -37,7 +37,8 @@ const normalizeScrollEvent = (e) => ({ return e.target.offsetWidth; } } - } + }, + timeStamp: Date.now() }); /** diff --git a/src/modules/applyLayout/index.js b/src/modules/applyLayout/index.js index 48c88e30..79ecd0c7 100644 --- a/src/modules/applyLayout/index.js +++ b/src/modules/applyLayout/index.js @@ -33,7 +33,7 @@ const applyLayout = (Component) => { if (layout.x !== x || layout.y !== y || layout.width !== width || layout.height !== height) { const nextLayout = { x, y, width, height }; const nativeEvent = { layout: nextLayout }; - onLayout({ nativeEvent }); + onLayout({ nativeEvent, timeStamp: Date.now() }); this._layoutState = nextLayout; } });