From 67311bd60af2a8e0e73c2e93157d7a5e54740287 Mon Sep 17 00:00:00 2001 From: Shemesh Date: Wed, 16 Sep 2015 17:05:49 +0300 Subject: [PATCH] exposed a function to re-calculate exposed a function to re-calculate, so we can manually call it from outside to fit any change. --- angular-ui-tab-scroll.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/angular-ui-tab-scroll.js b/angular-ui-tab-scroll.js index 7cba091..39193d9 100644 --- a/angular-ui-tab-scroll.js +++ b/angular-ui-tab-scroll.js @@ -246,7 +246,11 @@ angular.module('ui.tab.scroll', []) $scope.$apply(); }; - //hello my friend jake weary + $.fn.doRecalculate = function() { + init(); + $scope.$apply(); + }; + $(window).on('resize', initAndApply); //we initialize by watching changes on the inner tabset's tabs collection