<commit_before>import { Component, OnDestroy, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { interaction, EventsConditionType, style, StyleFunction, Collection, Feature } from 'openlayers';
import { MapComponent } from '../map.component';

@Component({
    selector: 'aol-interaction-modify',
    template: ''
})
export class ModifyInteractionComponent implements OnInit, OnDestroy {
    instance: interaction.Modify;

    @Input() condition?: EventsConditionType;
    @Input() deleteCondition?: EventsConditionType;
    @Input() pixelTolerance?: number;
    @Input() style?: (style.Style | style.Style[] | StyleFunction);
    @Input() features: Collection<Feature>;
    @Input() wrapX?: boolean;

    @Output() onModifyEnd = new EventEmitter<interaction.Modify.Event>();
    @Output() onModifyStart = new EventEmitter<interaction.Modify.Event>();
    @Output() onChange = new EventEmitter<interaction.Modify.Event>();
    @Output() onChangeActive = new EventEmitter<interaction.Modify.Event>();
    @Output() onPropertyChange = new EventEmitter<interaction.Modify.Event>();

    constructor(private map: MapComponent) {
    }

    ngOnInit() {
        this.instance = new interaction.Modify(this);
        this.instance.on('change', (event: interaction.Modify.Event) => this.onChange.emit(event));
        this.instance.on('change:active', (event: interaction.Modify.Event) => this.onChangeActive.emit(event));
        this.instance.on('propertychange', (event: interaction.Modify.Event) => this.onPropertyChange.emit(event));
        this.instance.on('modifyend', (event: interaction.Modify.Event) => this.onModifyEnd.emit(event));
        this.instance.on('modifystart', (event: interaction.Modify.Event) => this.onModifyStart.emit(event));
        this.map.instance.addInteraction(this.instance);
    }

    ngOnDestroy() {
        this.map.instance.removeInteraction(this.instance);
    }
}
<commit_msg>feat(modify-interaction): add source input (#146)<commit_after>import { Component, OnDestroy, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { interaction, EventsConditionType, style, StyleFunction, Collection, Feature, source } from 'openlayers';
import { MapComponent } from '../map.component';

@Component({
    selector: 'aol-interaction-modify',
    template: ''
})
export class ModifyInteractionComponent implements OnInit, OnDestroy {
    instance: interaction.Modify;

    @Input() condition?: EventsConditionType;
    @Input() deleteCondition?: EventsConditionType;
    @Input() pixelTolerance?: number;
    @Input() style?: (style.Style | style.Style[] | StyleFunction);
    @Input() features: Collection<Feature>;
    @Input() wrapX?: boolean;
    @Input() source?: source.Vector;

    @Output() onModifyEnd = new EventEmitter<interaction.Modify.Event>();
    @Output() onModifyStart = new EventEmitter<interaction.Modify.Event>();
    @Output() onChange = new EventEmitter<interaction.Modify.Event>();
    @Output() onChangeActive = new EventEmitter<interaction.Modify.Event>();
    @Output() onPropertyChange = new EventEmitter<interaction.Modify.Event>();

    constructor(private map: MapComponent) {
    }

    ngOnInit() {
        this.instance = new interaction.Modify(this);
        this.instance.on('change', (event: interaction.Modify.Event) => this.onChange.emit(event));
        this.instance.on('change:active', (event: interaction.Modify.Event) => this.onChangeActive.emit(event));
        this.instance.on('propertychange', (event: interaction.Modify.Event) => this.onPropertyChange.emit(event));
        this.instance.on('modifyend', (event: interaction.Modify.Event) => this.onModifyEnd.emit(event));
        this.instance.on('modifystart', (event: interaction.Modify.Event) => this.onModifyStart.emit(event));
        this.map.instance.addInteraction(this.instance);
    }

    ngOnDestroy() {
        this.map.instance.removeInteraction(this.instance);
    }
}

{'fraction_non_alphanumeric': 0.14742451154529307, 'fraction_numerical': 0.0007612281146917026, 'mean_word_length': 4.62339514978602, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, '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': '3306314', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1123, 'n_words': 216}