Fixed #1226. Fixed #1156. Fixed two other issues with spectate mode.

This commit is contained in:
Nick Winter 2014-08-28 11:23:52 -07:00
parent d7ae07c012
commit 1094d09aa5
4 changed files with 4 additions and 9 deletions

View file

@ -424,7 +424,7 @@ module.exports = Surface = class Surface extends CocoClass
oldHeight = parseInt @canvas.attr('height'), 10
aspectRatio = oldWidth / oldHeight
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()
newWidth = Math.min pageWidth, pageHeight * aspectRatio
newHeight = newWidth / aspectRatio

View file

@ -22,7 +22,7 @@ module.exports =
'router:navigate': c.object {required: ['route']},
route: {type: 'string'}
view: {type: 'object'}
viewClass: {type: 'object'}
viewClass: {type: 'function'}
viewArgs: {type: 'array'}
'achievements:new': c.object {required: 'earnedAchievements'},

View file

@ -38,17 +38,12 @@
margin: 0px auto
#canvas-wrapper
height: 100%
width: 100%
position: relative
margin: 0 auto
canvas#surface
background-color: #333
max-height: 93%
max-height: -webkit-calc(100% - 60px)
max-height: calc(100% - 60px)
height: auto
max-width: 100%
display: block
z-index: 1
margin: 0 auto

View file

@ -3,7 +3,7 @@
.level-content
#control-bar-view
#canvas-wrapper
canvas(width=1848, height=1178)#surface
canvas(width=924, height=589)#surface
#canvas-left-gradient.gradient
#canvas-top-gradient.gradient
#gold-view.secret.expanded