Ensure we always show a retina version of file attachment thumbnails.
Review Request #7284 — Created May 2, 2015 and submitted
Loading of file attachment thumbnails can sometimes be racy with regards to
retina.js. In particular, if we finish loading everything before the window's
onload
event fires, retina.js will happily process all the images and show
the at2x versions. If not (and for file attachments created via drag-and-drop),
it never processes them.This change updates the
FileAttachmentThumbnailView
to manually create a
RetinaImage, and remove thedata-at2x
attribute (so that theonload
handler won't process them).
Uploaded new file attachments and saw the high-res version of the thumbnail.
Description | From | Last Updated |
---|---|---|
You can avoid the need for self above by doing: _.each(this._$thumbnailContainer.find('img'), function(el) { ... }, this); |
chipx86 |