mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Tweaked layer order updating to fallback to sorting by x if y and z are the same.
This commit is contained in:
parent
332ea0df2c
commit
6484f787c5
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ module.exports = class Layer extends createjs.Container
|
||||||
bz = if b.z then b.z else 1000
|
bz = if b.z then b.z else 1000
|
||||||
if az == bz
|
if az == bz
|
||||||
return 0 unless a.sprite?.thang?.pos and b.sprite?.thang?.pos
|
return 0 unless a.sprite?.thang?.pos and b.sprite?.thang?.pos
|
||||||
return b.sprite.thang.pos.y - a.sprite.thang.pos.y
|
return (b.sprite.thang.pos.y - a.sprite.thang.pos.y) or (b.sprite.thang.pos.x - a.sprite.thang.pos.x)
|
||||||
return az - bz
|
return az - bz
|
||||||
|
|
||||||
onZoomUpdated: (e) ->
|
onZoomUpdated: (e) ->
|
||||||
|
|
Loading…
Reference in a new issue