mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-02 08:53:38 -04:00
parent
d7ae07c012
commit
1094d09aa5
4 changed files with 4 additions and 9 deletions
app
lib/surface
schemas/subscriptions
styles/play
templates/play
|
@ -424,7 +424,7 @@ module.exports = Surface = class Surface extends CocoClass
|
||||||
oldHeight = parseInt @canvas.attr('height'), 10
|
oldHeight = parseInt @canvas.attr('height'), 10
|
||||||
aspectRatio = oldWidth / oldHeight
|
aspectRatio = oldWidth / oldHeight
|
||||||
pageWidth = $('#page-container').width() - 17 # 17px nano scroll bar
|
pageWidth = $('#page-container').width() - 17 # 17px nano scroll bar
|
||||||
if @realTime
|
if @realTime or @options.spectateGame
|
||||||
pageHeight = $('#page-container').height() - $('#control-bar-view').outerHeight() - $('#playback-view').outerHeight()
|
pageHeight = $('#page-container').height() - $('#control-bar-view').outerHeight() - $('#playback-view').outerHeight()
|
||||||
newWidth = Math.min pageWidth, pageHeight * aspectRatio
|
newWidth = Math.min pageWidth, pageHeight * aspectRatio
|
||||||
newHeight = newWidth / aspectRatio
|
newHeight = newWidth / aspectRatio
|
||||||
|
|
|
@ -22,7 +22,7 @@ module.exports =
|
||||||
'router:navigate': c.object {required: ['route']},
|
'router:navigate': c.object {required: ['route']},
|
||||||
route: {type: 'string'}
|
route: {type: 'string'}
|
||||||
view: {type: 'object'}
|
view: {type: 'object'}
|
||||||
viewClass: {type: 'object'}
|
viewClass: {type: 'function'}
|
||||||
viewArgs: {type: 'array'}
|
viewArgs: {type: 'array'}
|
||||||
|
|
||||||
'achievements:new': c.object {required: 'earnedAchievements'},
|
'achievements:new': c.object {required: 'earnedAchievements'},
|
||||||
|
|
|
@ -38,17 +38,12 @@
|
||||||
margin: 0px auto
|
margin: 0px auto
|
||||||
|
|
||||||
#canvas-wrapper
|
#canvas-wrapper
|
||||||
height: 100%
|
width: 100%
|
||||||
position: relative
|
position: relative
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|
||||||
canvas#surface
|
canvas#surface
|
||||||
background-color: #333
|
background-color: #333
|
||||||
max-height: 93%
|
|
||||||
max-height: -webkit-calc(100% - 60px)
|
|
||||||
max-height: calc(100% - 60px)
|
|
||||||
height: auto
|
|
||||||
max-width: 100%
|
|
||||||
display: block
|
display: block
|
||||||
z-index: 1
|
z-index: 1
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
.level-content
|
.level-content
|
||||||
#control-bar-view
|
#control-bar-view
|
||||||
#canvas-wrapper
|
#canvas-wrapper
|
||||||
canvas(width=1848, height=1178)#surface
|
canvas(width=924, height=589)#surface
|
||||||
#canvas-left-gradient.gradient
|
#canvas-left-gradient.gradient
|
||||||
#canvas-top-gradient.gradient
|
#canvas-top-gradient.gradient
|
||||||
#gold-view.secret.expanded
|
#gold-view.secret.expanded
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue