Skip to content

Commit

Permalink
more work
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Feb 1, 2015
1 parent 8e45b21 commit 159bcab
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ angular
yScale,

visibleExtent = [],

// +1 so that 0.5 tile can fall off either end
tileCount = (oneDay / tileSizeSeconds) + 2;
tiles = [];

// exports
that.items = [];
Expand Down Expand Up @@ -127,17 +125,19 @@ angular
}

function generateTiles() {
var tiles = [];
if (that.items.length > 0) {
// need to generate a series of tiles that can show the data in that.items
var f = isItemVisible.bind(null, [new Date(0), new Date(2000000000000)] /*visibleExtent*/),
var f = isItemVisible.bind(null, visibleExtent),
g = isInCategory.bind(null, that.category),
h = and.bind(null, f, g);

var filteredItems = that.items.filter(h);

tiles = filteredItems.reduce(splitIntoTiles, []);
}
else {
tiles = [];
}
}

function createElements() {
Expand Down

0 comments on commit 159bcab

Please sign in to comment.