Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #98 from zertosh/fix-tool-bar-view-access
Browse files Browse the repository at this point in the history
Fix loading when using [email protected]
  • Loading branch information
cakecatz authored Mar 10, 2017
2 parents 99cc7d9 + 1cee32a commit 5b8c7a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/flex-tool-bar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ module.exports =
@toolBar = toolBar 'flex-toolBar'
@reloadToolbar(false)

getToolbarView: ->
# This is an undocumented API that moved in [email protected]
@toolBar.toolBarView || @toolBar.toolBar

reloadToolbar: (withNotification=false) ->
return unless @toolBar?
try
Expand All @@ -165,10 +169,10 @@ module.exports =
console.error error

fixToolBarHeight: ->
@toolBar.toolBar.element.style.height = "#{@toolBar.toolBar.element.offsetHeight}px"
@getToolbarView().element.style.height = "#{@getToolbarView().element.offsetHeight}px"

unfixToolBarHeight: ->
@toolBar.toolBar.element.style.height = null
@getToolbarView().element.style.height = null

addButtons: (toolBarButtons) ->
if toolBarButtons?
Expand Down

0 comments on commit 5b8c7a8

Please sign in to comment.