Modularise handlers.

This commit is contained in:
Hyunje Alex Jun
2015-01-30 23:00:17 +00:00
parent 0acf3602f0
commit a52a945226
9 changed files with 729 additions and 600 deletions

View File

@@ -0,0 +1,18 @@
/* Copyright (c) 2015 Hyunje Alex Jun and other contributors
* Licensed under the MIT License
*/
'use strict';
var instances = require('../instances')
, updateGeometry = require('../update');
function bindNativeScrollHandler(element, i) {
i.event.bind(element, 'scroll', function () {
updateGeometry(element);
});
}
module.exports = function (element) {
var i = instances.get(element);
bindNativeScrollHandler(element, i);
};