some changes to fixed element based height
/**
* Created by Clarice on 07-05-2015.
*/
(function() {
'use strict';
iqApp.directive('jscrollpane', [ '$timeout', function($timeout) {
function link(scope, element, attr) {
var $window = $(window);
var $element = $(element), api;
$element.jScrollPane();
api = $element.data('jsp');
$window.on("resize mousemove touchstart", function onLoad() {
var _finalHeight = $window.height() - $element.offset().top;
$(element).find('.jspContainer').height(_finalHeight);
api.reinitialise();
});
var timeout = $timeout(function() {
//console.log('dr load timer');
var _finalHeight = $window.height() - $element.offset().top;
$(element).find('.jspContainer').height(_finalHeight);
api.reinitialise();
}, 1000);
}
return {
restrict : 'A',
link : link
};
} ]);
})();
On Friday, July 6, 2012 at 9:45:42 PM UTC+5:30, lost_in_the_woods wrote:
>
> Hi,
>
> I'm trying to use http://jscrollpane.kelvinluck.com/ with ng-repeat. It's
> a div scroller. However, I need to initialize it after the size of the
> div.contents() is known -- i.e., after ng-repeat is done inserting elements.
>
> Is there an event that ng-repeat emits/broadcasts after it finishes DOM
> manipulation?
>
> THanks.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.