Lower QR thumbnails resize threshold. Background images are not applied under the borders, so it is now adjusted.

This commit is contained in:
Nicolas Stepien 2013-03-07 22:27:38 +01:00
parent 2c81f67fd4
commit 5334c2d644
3 changed files with 11 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -577,8 +577,8 @@ a[href="javascript:;"] {
box-sizing: border-box;
cursor: move;
display: inline-block;
height: 90px; width: 90px;
margin: 5px; padding: 2px;
height: 92px; width: 92px;
margin: 4px; padding: 2px;
opacity: .6;
outline: none;
overflow: hidden;

View File

@ -474,6 +474,7 @@ QR =
reader.onload = (e) =>
@setThumbnail e.target.result
reader.readAsDataURL @file
return
else
fileURL = URL.createObjectURL @file
@ -484,10 +485,10 @@ QR =
# Resized pictures through canvases look like ass,
# so we generate thumbnails `s` times bigger then expected
# to avoid crappy resized quality.
s = 90*3
s = 90*2
{height, width} = img
if height < s or width < s
@URL = fileURL
@URL = fileURL if window.URL
@nodes.el.style.backgroundImage = "url(#{@URL})"
return
if height <= width