From 1cee32ab1b1d263e43bf383e6df2c9e6f5d77737 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Fri, 10 Mar 2017 10:53:31 -0800 Subject: [PATCH] Fix loading when using tool-bar@1.1.0 --- lib/flex-tool-bar.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/flex-tool-bar.coffee b/lib/flex-tool-bar.coffee index 15b6923..4475443 100644 --- a/lib/flex-tool-bar.coffee +++ b/lib/flex-tool-bar.coffee @@ -150,6 +150,10 @@ module.exports = @toolBar = toolBar 'flex-toolBar' @reloadToolbar(false) + getToolbarView: -> + # This is an undocumented API that moved in tool-bar@1.1.0 + @toolBar.toolBarView || @toolBar.toolBar + reloadToolbar: (withNotification=false) -> return unless @toolBar? try @@ -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?