mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Update problem alert width to be more dynamic
This commit is contained in:
parent
b7949424e6
commit
692569f655
1 changed files with 6 additions and 2 deletions
|
@ -88,8 +88,12 @@ module.exports = class ProblemAlertView extends CocoView
|
||||||
onWindowResize: (e) =>
|
onWindowResize: (e) =>
|
||||||
# TODO: This all seems a little hacky
|
# TODO: This all seems a little hacky
|
||||||
if @problem?
|
if @problem?
|
||||||
@$el.css('left', $('#goals-view').outerWidth(true) + 'px')
|
levelContentWidth = $('.level-content').outerWidth(true)
|
||||||
@$el.css('right', $('#code-area').outerWidth(true) + 'px')
|
goalsViewWidth = $('#goals-view').outerWidth(true)
|
||||||
|
codeAreaWidth = $('#code-area').outerWidth(true)
|
||||||
|
# problem alert view has 20px padding
|
||||||
|
@$el.css('max-width', levelContentWidth - codeAreaWidth - goalsViewWidth + 40 + 'px')
|
||||||
|
@$el.css('right', codeAreaWidth + 'px')
|
||||||
|
|
||||||
# 110px from top roughly aligns top of alert with top of first code line
|
# 110px from top roughly aligns top of alert with top of first code line
|
||||||
# TODO: calculate this in a more dynamic, less sketchy way
|
# TODO: calculate this in a more dynamic, less sketchy way
|
||||||
|
|
Loading…
Reference in a new issue