mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -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
|
$addPaletteIconColumns: 3
|
||||||
$extantThangsWidth: 300px
|
$extantThangsWidth: 300px
|
||||||
$addPaletteIconWidth: 40px
|
$addPaletteIconWidth: 40px
|
||||||
$addPaletteIconPadding: 2px
|
$addPaletteIconPadding: 0px
|
||||||
$addPaletteIconMargin: 2px
|
$addPaletteIconMargin: 4px
|
||||||
$addPaletteWidth: ($addPaletteIconWidth + 2 * $addPaletteIconPadding + 2 * $addPaletteIconMargin) * $addPaletteIconColumns + 20
|
$addPaletteWidth: ($addPaletteIconWidth + 2 * $addPaletteIconPadding + 2 * $addPaletteIconMargin) * $addPaletteIconColumns + 20
|
||||||
|
|
||||||
#toggle
|
#toggle
|
||||||
|
@ -198,15 +198,26 @@ $mobile: 1050px
|
||||||
padding: $addPaletteIconPadding
|
padding: $addPaletteIconPadding
|
||||||
margin: $addPaletteIconMargin
|
margin: $addPaletteIconMargin
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
width: $addPaletteIconWidth
|
||||||
|
height: $addPaletteIconWidth
|
||||||
|
|
||||||
img
|
img
|
||||||
|
position: absolute
|
||||||
width: $addPaletteIconWidth
|
width: $addPaletteIconWidth
|
||||||
height: $addPaletteIconWidth
|
height: $addPaletteIconWidth
|
||||||
transition: box-shadow 0.25s ease-out
|
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
|
&.selected
|
||||||
border: 1px solid blue
|
outline: 1px solid blue
|
||||||
margin: $addPaletteIconPadding - 1px
|
|
||||||
@include box-shadow(0px 5px 25px rgba(79, 79, 213, 0.6))
|
@include box-shadow(0px 5px 25px rgba(79, 79, 213, 0.6))
|
||||||
background: #add8e6
|
background: #add8e6
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,6 @@ div.editor-nano-container.nano
|
||||||
for group in groups
|
for group in groups
|
||||||
h4= group.name
|
h4= group.name
|
||||||
for thangType in group.thangs
|
for thangType in group.thangs
|
||||||
div.add-thang-palette-icon(data-thang-type=thangType.get('name'))
|
div.add-thang-palette-icon(data-thang-type=thangType.get('name'), title=thangType.get('name'))
|
||||||
img(title="Add " + thangType.get('name'), src=thangType.getPortraitURL(), alt="")
|
img(src=thangType.getPortraitURL(), alt="")
|
||||||
div.clearfix
|
div.clearfix
|
|
@ -56,6 +56,10 @@ module.exports = class AddThangsView extends CocoView
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
super()
|
super()
|
||||||
|
@buildAddThangPopovers()
|
||||||
|
|
||||||
|
buildAddThangPopovers: ->
|
||||||
|
@$el.find('#thangs-list .add-thang-palette-icon').tooltip(container: 'body', animation: false)
|
||||||
|
|
||||||
runSearch: (e) =>
|
runSearch: (e) =>
|
||||||
if e?.which is 27
|
if e?.which is 27
|
||||||
|
|
Loading…
Reference in a new issue