Only show if sidebar is open and meant to be shown

This commit is contained in:
James Allen 2014-04-09 15:57:27 +01:00
parent bcfc1bee0c
commit f931f5f5ce

View file

@ -44,20 +44,24 @@ define [
###
return @
hide: () -> @$el.hide()
hide: () ->
@hidden = true
@$el.hide()
show: () ->
@hidden = false
@showIfNotHiddenAndOpen()
showIfNotHiddenAndOpen: () ->
state = @ide.editor.$splitter.layout().readState()
if !state.east?.initClosed
if !@hidden and !state.east?.initClosed
@$el.show()
else
@$el.hide()
repositionLeft: () ->
state = @ide.editor.$splitter.layout().readState()
if state.east?
@$el.css({right: state.east.size - 8})
if state.east.initClosed
@hide()
else
@show()
@showIfNotHiddenAndOpen();