mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-20 18:10:44 -04:00
Centered CoordinateDisplay background and label
This commit is contained in:
parent
21d056ff01
commit
e3183650c5
1 changed files with 4 additions and 2 deletions
|
@ -67,8 +67,10 @@ module.exports = class CoordinateDisplay extends createjs.Container
|
|||
radius = 2.5
|
||||
width = @label.getMeasuredWidth() + 2 * margin
|
||||
height = @label.getMeasuredHeight() + 2 * margin
|
||||
@label.regX = @background.regX = width / 2 - margin
|
||||
@label.regY = @background.regY = height / 2 - margin
|
||||
@label.regX = @background.regX = width / 2
|
||||
@label.regY = @background.regY = height / 2
|
||||
@label.regX -= margin
|
||||
@label.regY -= margin
|
||||
@background.graphics
|
||||
.clear()
|
||||
.beginFill('rgba(0,0,0,0.4)')
|
||||
|
|
Loading…
Reference in a new issue