mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Fixed #169.
This commit is contained in:
parent
7300c4b3b8
commit
50ad453345
3 changed files with 21 additions and 6 deletions
|
@ -6,8 +6,8 @@ $mobile: 1050px
|
|||
$addPaletteIconColumns: 3
|
||||
$extantThangsWidth: 300px
|
||||
$addPaletteIconWidth: 40px
|
||||
$addPaletteIconPadding: 2px
|
||||
$addPaletteIconMargin: 2px
|
||||
$addPaletteIconPadding: 0px
|
||||
$addPaletteIconMargin: 4px
|
||||
$addPaletteWidth: ($addPaletteIconWidth + 2 * $addPaletteIconPadding + 2 * $addPaletteIconMargin) * $addPaletteIconColumns + 20
|
||||
|
||||
#toggle
|
||||
|
@ -198,15 +198,26 @@ $mobile: 1050px
|
|||
padding: $addPaletteIconPadding
|
||||
margin: $addPaletteIconMargin
|
||||
cursor: pointer
|
||||
width: $addPaletteIconWidth
|
||||
height: $addPaletteIconWidth
|
||||
|
||||
img
|
||||
position: absolute
|
||||
width: $addPaletteIconWidth
|
||||
height: $addPaletteIconWidth
|
||||
transition: box-shadow 0.25s ease-out
|
||||
|
||||
&:hover
|
||||
$hoverScaleIncreaseFactor: 0.2
|
||||
outline: 1px dotted blue
|
||||
img
|
||||
left: -($hoverScaleIncreaseFactor / 2) * $addPaletteIconWidth
|
||||
top: -($hoverScaleIncreaseFactor / 2) * $addPaletteIconWidth
|
||||
width: (1 + $hoverScaleIncreaseFactor) * $addPaletteIconWidth
|
||||
height: (1 + $hoverScaleIncreaseFactor) * $addPaletteIconWidth
|
||||
|
||||
&.selected
|
||||
border: 1px solid blue
|
||||
margin: $addPaletteIconPadding - 1px
|
||||
outline: 1px solid blue
|
||||
@include box-shadow(0px 5px 25px rgba(79, 79, 213, 0.6))
|
||||
background: #add8e6
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@ div.editor-nano-container.nano
|
|||
for group in groups
|
||||
h4= group.name
|
||||
for thangType in group.thangs
|
||||
div.add-thang-palette-icon(data-thang-type=thangType.get('name'))
|
||||
img(title="Add " + thangType.get('name'), src=thangType.getPortraitURL(), alt="")
|
||||
div.add-thang-palette-icon(data-thang-type=thangType.get('name'), title=thangType.get('name'))
|
||||
img(src=thangType.getPortraitURL(), alt="")
|
||||
div.clearfix
|
|
@ -56,6 +56,10 @@ module.exports = class AddThangsView extends CocoView
|
|||
|
||||
afterRender: ->
|
||||
super()
|
||||
@buildAddThangPopovers()
|
||||
|
||||
buildAddThangPopovers: ->
|
||||
@$el.find('#thangs-list .add-thang-palette-icon').tooltip(container: 'body', animation: false)
|
||||
|
||||
runSearch: (e) =>
|
||||
if e?.which is 27
|
||||
|
|
Loading…
Reference in a new issue