Ensure we always show a retina version of file attachment thumbnails.
Review Request #7284 — Created May 2, 2015 and submitted — Latest diff uploaded
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
onloadevent 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
FileAttachmentThumbnailViewto manually create a
RetinaImage, and remove thedata-at2xattribute (so that theonload
handler won't process them).
Uploaded new file attachments and saw the high-res version of the thumbnail.
| reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js |
|---|