Fix more animation bugs

This commit is contained in:
Andrew Miner
2015-03-22 09:22:41 -07:00
parent 40efc8ccc9
commit 7c99f77639
7 changed files with 34 additions and 16 deletions
@@ -103,9 +103,16 @@ module.exports = class InventoryController extends BaseController
super
refresh: ->
@$editPanel.css display:(if @editable then 'table-row' else 'none')
@$toolbar.css display:(if @editable then 'block' else 'none')
@$scrollbox.css bottom:(if @editable then @$toolbar.height() else '0')
if @editable
@show @$editPanel
@show @$toolbar, =>
@$scrollbox.css bottom:@$toolbar.height()
else
if not @$editPanel? then throw new Error "no edit panel"
if not @$toolbar? then throw new Error "no toolbar"
@hide @$editPanel
@hide @$toolbar
@$scrollbox.css bottom:0
@$icon.attr 'src', @icon
@$title.html @title