avoid reading the scroll position twice

This commit is contained in:
Fabio M. Costa
2014-10-20 13:30:02 -07:00
parent be468c2c22
commit dafaf1a42e
+1 -4
View File
@@ -11,16 +11,13 @@
"use strict";
var getUnboundedScrollPosition = require('getUnboundedScrollPosition');
var ViewportMetrics = {
currentScrollLeft: 0,
currentScrollTop: 0,
refreshScrollValues: function() {
var scrollPosition = getUnboundedScrollPosition(window);
refreshScrollValues: function(scrollPosition) {
ViewportMetrics.currentScrollLeft = scrollPosition.x;
ViewportMetrics.currentScrollTop = scrollPosition.y;
}