[fix] add 'timeStamp' to scroll and layout events

This commit is contained in:
Nicolas Gallagher
2017-02-16 08:18:56 -08:00
parent b2e0a3702f
commit 89e0a15d1b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ const normalizeScrollEvent = (e) => ({
return e.target.offsetWidth;
}
}
}
},
timeStamp: Date.now()
});
/**
+1 -1
View File
@@ -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;
}
});