Added hero components projection for good hero stat comparison bars. Fixed overflow/scrolling on code language selector for play-heroes-modal.

This commit is contained in:
Nick Winter 2014-11-05 19:37:13 -08:00
parent 35f5fd1c84
commit ce8b3bc83c
2 changed files with 11 additions and 12 deletions

View file

@ -264,7 +264,6 @@ $heroCanvasHeight: 265px
.trigger, .options .trigger, .options
background-color: rgb(239,232,217) background-color: rgb(239,232,217)
width: 100%
color: black color: black
.trigger .trigger
@ -272,6 +271,7 @@ $heroCanvasHeight: 265px
border: 3px solid black border: 3px solid black
font-size: 16px font-size: 16px
padding: 5px 10px padding: 5px 10px
width: 100%
//- the little triangle on the right side of the fancy select box //- the little triangle on the right side of the fancy select box
&:after &:after
@ -282,6 +282,7 @@ $heroCanvasHeight: 265px
.options .options
padding-left: 5px padding-left: 5px
overflow: visible
.selected .selected
color: black color: black
@ -295,6 +296,7 @@ $heroCanvasHeight: 265px
padding-left: 40px padding-left: 40px
background: transparent url(/images/common/code_languages/javascript_small.png) no-repeat left center background: transparent url(/images/common/code_languages/javascript_small.png) no-repeat left center
background-size: 32px 32px background-size: 32px 32px
margin-bottom: -1px
&[data-value="python"] &[data-value="python"]
background-image: url(/images/common/code_languages/python_small.png) background-image: url(/images/common/code_languages/python_small.png)

View file

@ -27,7 +27,7 @@ module.exports = class PlayHeroesModal extends ModalView
@confirmButtonI18N = options.confirmButtonI18N ? "common.save" @confirmButtonI18N = options.confirmButtonI18N ? "common.save"
@heroes = new CocoCollection([], {model: ThangType}) @heroes = new CocoCollection([], {model: ThangType})
@heroes.url = '/db/thang.type?view=heroes' @heroes.url = '/db/thang.type?view=heroes'
@heroes.setProjection ['original','name','slug','soundTriggers','featureImage','gems','heroClass','description'] @heroes.setProjection ['original','name','slug','soundTriggers','featureImage','gems','heroClass','description','components']
@listenToOnce @heroes, 'sync', @onHeroesLoaded @listenToOnce @heroes, 'sync', @onHeroesLoaded
@supermodel.loadCollection(@heroes, 'heroes') @supermodel.loadCollection(@heroes, 'heroes')
@stages = {} @stages = {}
@ -204,6 +204,3 @@ module.exports = class PlayHeroesModal extends ModalView
createjs.Ticker.removeEventListener "tick", stage createjs.Ticker.removeEventListener "tick", stage
stage.removeAllChildren() stage.removeAllChildren()
super() super()