<commit_before>var bacchosDirectives = angular.module('bacchosDirectives', []).

	directive('resize', function ($window) {
        return function (scope, element, attrs) {
            scope.getWinHeight = function() {
                return $window.innerHeight;
            };
 
            var setMapHeight = function(newHeight) {
            	element.css('height', newHeight+ 'px');
            };
 
            scope.$watch(scope.getWinHeight, function (newValue, oldValue) {
                setMapHeight(scope.getWinHeight() - 20);
            }, true);

            angular.element($window).bind('resize', function () {
                scope.$apply();
            });
        };
    }).

directive('storeHeight', ['$timeout', function ($timeout) {
    return {
        link: function (scope, element, attrs) {
            scope.$watch('store', function () {
                $timeout(function () {
                    console.log(element[0].offsetHeight);
                });
            });
        }
    };
}]);<commit_msg>using watch instead of broadcast<commit_after>var bacchosDirectives = angular.module('bacchosDirectives', []).

	directive('resize', function ($window) {
        return function (scope, element, attrs) {
            scope.getWinHeight = function() {
                return $window.innerHeight;
            };
 
            var setMapHeight = function(newHeight) {
            	element.css('height', newHeight+ 'px');
            };
 
            scope.$watch(scope.getWinHeight, function (newValue, oldValue) {
                setMapHeight(scope.getWinHeight() - 20);
            }, true);

            angular.element($window).bind('resize', function () {
                scope.$apply();
            });
        };
    }).

    directive('storeHeight', ['$timeout', function ($timeout) {
        return {
            link: function (scope, element, attrs) {
                scope.$watch('store', function () {
                    $timeout(function () {
                        console.log(element[0].offsetHeight);
                    });
                });
            }
        };
    }]);
{'fraction_non_alphanumeric': 0.14225153085256712, 'fraction_numerical': 0.002826189354686764, 'mean_word_length': 1.6583229036295368, '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': '3479539', 'n_tokens_mistral': 551, 'n_tokens_neox': 521, 'n_words': 94}