<commit_before>anol.control.Control = function(options) {
    if(options === undefined) {
        return;
    }

    this.active = options.active || false;
    this.exclusive = options.exclusive || false;
    this.element = options.element;

    if(options.olControl === undefined) {
        var controlElement;
        if(this.element !== undefined) {
            controlElement = this.element[0];
        }

        this.olControl = new ol.control.Control({
            element: controlElement
        });
    } else {
        this.olControl = options.olControl;
    }
};

anol.control.Control.prototype = {
    CLASS_NAME: 'anol.control.Control',
    DEFAULT_OPTIONS: {},
    activate: function() {
        this.active = true;
        $(this).triggerHandler('anol.control.activate');
    },
    onActivate: function(func, context) {
        var targetControl = this;
        $(this).on('anol.control.activate', function() {
            func(targetControl, context);
        });
    },
    deactivate: function() {
        this.active = false;
        $(this).triggerHandler('anol.control.deactivate');
    },
    onDeactivate: function(func, context) {
        var targetControl = this;
        $(this).on('anol.control.deactivate', function() {
            func(targetControl, context);
        });
    }
};<commit_msg>Added interaction and target property to anol.control.Control<commit_after>anol.control.Control = function(options) {
    if(options === undefined) {
        return;
    }

    this.active = options.active || false;
    this.exclusive = options.exclusive || false;
    this.element = options.element;
    this.interaction = options.interaction;

    if(options.olControl === undefined) {
        var controlElement;
        if(this.element !== undefined) {
            controlElement = this.element[0];
        }
        var target;
        if(options.target !== undefined) {
            target = options.target[0];
        }

        this.olControl = new ol.control.Control({
            element: controlElement,
            target: target
        });
    } else {
        this.olControl = options.olControl;
    }
};

anol.control.Control.prototype = {
    CLASS_NAME: 'anol.control.Control',
    DEFAULT_OPTIONS: {},
    activate: function() {
        this.active = true;
        $(this).triggerHandler('anol.control.activate');
    },
    onActivate: function(func, context) {
        var targetControl = this;
        $(this).on('anol.control.activate', function() {
            func(targetControl, context);
        });
    },
    deactivate: function() {
        this.active = false;
        $(this).triggerHandler('anol.control.deactivate');
    },
    onDeactivate: function(func, context) {
        var targetControl = this;
        $(this).on('anol.control.deactivate', function() {
            func(targetControl, context);
        });
    }
};
{'fraction_non_alphanumeric': 0.13754775963876345, 'fraction_numerical': 0.0010420284821118443, 'mean_word_length': 2.272727272727273, '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': '3175834', 'n_tokens_mistral': 809, 'n_tokens_neox': 786, 'n_words': 142}