<commit_before>angular.module('palaver-ui', [])
    .directive('ngAutoScroll', function() {
        return {
            restrict: 'A',
            link: function(scope, element, attrs) {

            var deregistration = scope.$watch(attrs.ngAutoScroll, function ngAutoScrollAction(){
                var jQueryElement = $(element);
                jQueryElement.animate({ scrollTop: jQueryElement.prop("scrollHeight") }, 1);
            }, true);

            element.bind('$destroy', function() {
                deregistration();
            });
        }
    };
    });<commit_msg>Small adjusment to auto-scroll directive to allow rendering of elements to complete rendering before animate is called<commit_after>angular.module('palaver-ui', [])
    .directive('ngAutoScroll', function() {
        return {
            restrict: 'A',
            link: function(scope, element, attrs) {

            var deregistration = scope.$watch(attrs.ngAutoScroll, function ngAutoScrollAction(){
                var jQueryElement = $(element);
                setTimeout(function () {
                var sh = jQueryElement.prop("scrollHeight");
                  jQueryElement.animate({ scrollTop: sh }, 1);
                }, 1);
            }, true);

            element.bind('$destroy', function() {
                deregistration();
            });
        }
    };
    });

{'fraction_non_alphanumeric': 0.12891478514202476, 'fraction_numerical': 0.0021849963583394027, 'mean_word_length': 1.9234042553191488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4002935', 'n_tokens_mistral': 350, 'n_tokens_neox': 330, 'n_words': 73}