dtao/lazy.js — pull request #92 by ebenpack (2014-07-10 16:55:47+00:00)
Title: Fix lazy.browser .on method

Fixes issue #84.

The example on the site should probably also be changed. `DomEventSequence` expects a `NodeList` or an `HTMLCollection` and these will always be an array-like, but the example is acting like `sourceElement` is an individual DOM element. E.g.

coordinates = mouseEvents.map(function(e) {
var elementRect = e.target.getBoundingClientRect(); // was sourceElement.getBoundingClientRect();
return [
Math.floor(e.clientX - elementRect.left),
Math.floor(e.clientY - elementRect.top)
];
});

Beyond this, I think a fully working example, that provides `displayCoordinates` as well as demonstrating how `sourceElement` should be assigned, would be a big help.