Unique avatars: fix position for bigger avatars
This commit is contained in:
parent
6daaecb5fd
commit
55421ba912
1 changed files with 6 additions and 6 deletions
|
@ -86,20 +86,20 @@ class App.User extends App.Model
|
||||||
|
|
||||||
# generate uniq avatar
|
# generate uniq avatar
|
||||||
if !@image || @image is 'none' || unique
|
if !@image || @image is 'none' || unique
|
||||||
width = 300
|
width = 300 * size/baseSize
|
||||||
height = 226
|
height = 226 * size/baseSize
|
||||||
|
|
||||||
rng = new Math.seedrandom(@id)
|
rng = new Math.seedrandom(@id)
|
||||||
x = rng() * (width - size)
|
x = 0.5 * (width - size)
|
||||||
y = rng() * (height - size)
|
y = 0.5 * (height - size)
|
||||||
|
|
||||||
return App.view('avatar_unique')
|
return App.view('avatar_unique')
|
||||||
data: data
|
data: data
|
||||||
cssClass: cssClass
|
cssClass: cssClass
|
||||||
placement: placement
|
placement: placement
|
||||||
vip: vip
|
vip: vip
|
||||||
x: x * size/baseSize
|
x: x
|
||||||
y: y * size/baseSize
|
y: y
|
||||||
initials: @initials()
|
initials: @initials()
|
||||||
|
|
||||||
# generate image based avatar
|
# generate image based avatar
|
||||||
|
|
Loading…
Reference in a new issue