From d3ed14efd25115d3a2dd72ad8b0b778d82b4b18b Mon Sep 17 00:00:00 2001 From: Benjamin Besse Date: Fri, 24 Jun 2016 11:34:22 +0200 Subject: [PATCH] Add recalcul of default-width for certains cases I call about this problem in the issue #48 --- app/js/jquery.okayNav.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/js/jquery.okayNav.js b/app/js/jquery.okayNav.js index 2781ee1..9bc530d 100644 --- a/app/js/jquery.okayNav.js +++ b/app/js/jquery.okayNav.js @@ -362,6 +362,8 @@ expand_width = space_taken + self.last_visible_child_width + self.toggle_icon_width, expandAll_width = space_taken - nav_full_width + self.default_width; + self.default_width = self.getChildrenWidth(self.navigation); + if (wrapper_width > expandAll_width) { self._expandAllItems(); self.toggle_icon.addClass('okay-invisible');