Lower QR thumbnails resize threshold. Background images are not applied under the borders, so it is now adjusted.
This commit is contained in:
parent
2c81f67fd4
commit
5334c2d644
File diff suppressed because one or more lines are too long
@ -577,8 +577,8 @@ a[href="javascript:;"] {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 90px; width: 90px;
|
height: 92px; width: 92px;
|
||||||
margin: 5px; padding: 2px;
|
margin: 4px; padding: 2px;
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
outline: none;
|
outline: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -474,6 +474,7 @@ QR =
|
|||||||
reader.onload = (e) =>
|
reader.onload = (e) =>
|
||||||
@setThumbnail e.target.result
|
@setThumbnail e.target.result
|
||||||
reader.readAsDataURL @file
|
reader.readAsDataURL @file
|
||||||
|
return
|
||||||
else
|
else
|
||||||
fileURL = URL.createObjectURL @file
|
fileURL = URL.createObjectURL @file
|
||||||
|
|
||||||
@ -484,10 +485,10 @@ QR =
|
|||||||
# Resized pictures through canvases look like ass,
|
# Resized pictures through canvases look like ass,
|
||||||
# so we generate thumbnails `s` times bigger then expected
|
# so we generate thumbnails `s` times bigger then expected
|
||||||
# to avoid crappy resized quality.
|
# to avoid crappy resized quality.
|
||||||
s = 90*3
|
s = 90*2
|
||||||
{height, width} = img
|
{height, width} = img
|
||||||
if height < s or width < s
|
if height < s or width < s
|
||||||
@URL = fileURL
|
@URL = fileURL if window.URL
|
||||||
@nodes.el.style.backgroundImage = "url(#{@URL})"
|
@nodes.el.style.backgroundImage = "url(#{@URL})"
|
||||||
return
|
return
|
||||||
if height <= width
|
if height <= width
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user