Skip to content

Commit

Permalink
increased the preview image resolution of featured streams
Browse files Browse the repository at this point in the history
  • Loading branch information
bastimeyer committed Feb 18, 2014
1 parent 134e7b4 commit bf01b28
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/routes/IndexRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ define([
featured: models[1].featured
};
})
// load preview image with a higher resolution
// ugly... will be changed in the future
.then(function( data ) {
( data.featured || [] ).forEach(function( featured ) {
featured.stream.preview = featured.stream.preview.replace(
/(\d+)x(\d+)\.(\w+)$/,
function( _, x, y, format ) {
return ( 2 * +x ) + "x" + ( 2 * +y ) + "." + format;
}
);
});
return data;
})
.then( preload([
"featured.@each.image",
"featured.@each.stream.@each.preview"
Expand Down

0 comments on commit bf01b28

Please sign in to comment.