Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #124 from Wikia/release-51-XW-3742
Browse files Browse the repository at this point in the history
XW-3742 | do not load full width recirc images
  • Loading branch information
hakubo authored Jul 13, 2017
2 parents c8400ed + c7c861f commit 8c84050
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/components/recirculation-prefooter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Ember from 'ember';
import InViewportMixin from 'ember-in-viewport';
import Thumbnailer from '../modules/thumbnailer';
import {normalizeThumbWidth} from '../utils/thumbnail';
import {track, trackActions} from '../utils/track';

const {Component, on, run, inject, $} = Ember,
Expand Down Expand Up @@ -34,7 +36,17 @@ export default Component.extend(
items: data.items
.filter((item) => {
return item.hasOwnProperty('thumbnail') && item.thumbnail;
}).slice(0, recircItemsCount)
})
.slice(0, recircItemsCount)
.map((item) => {

item.thumbnail = Thumbnailer.getThumbURL(item.thumbnail, {
mode: Thumbnailer.mode.scaleToWidth,
width: normalizeThumbWidth(window.innerWidth)
});

return item;
})
});

run.scheduleOnce('afterRender', () => {
Expand Down

0 comments on commit 8c84050

Please sign in to comment.