<commit_before>angular.module("leaflet-directive").directive('controls', function ($log) {
    return {
        restrict: "A",
        scope: false,
        replace: false,
        transclude: false,
        require: 'leaflet',

        link: function($scope, element, attrs, controller) {
            var controls = $scope.controls;
            controller.getMap().then(function(map) {
                if (isDefined(controls.draw)) {
                    var drawControl = new L.Control.Draw();<commit_msg>If going to use the Leaflet.draw pluging, check first that it is loaded<commit_after>angular.module("leaflet-directive").directive('controls', function ($log) {
    return {
        restrict: "A",
        scope: false,
        replace: false,
        transclude: false,
        require: 'leaflet',

        link: function($scope, element, attrs, controller) {
            var controls = $scope.controls;
            controller.getMap().then(function(map) {
                if (isDefined(L.Control.Draw) && isDefined(controls.draw)) {
                    var drawControl = new L.Control.Draw(controls.draw.options);
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0, 'mean_word_length': 2.356287425149701, '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': '4595705', 'n_tokens_mistral': 304, 'n_tokens_neox': 300, 'n_words': 70}