<commit_before>import {AfterViewInit, Component, EventEmitter, Input, NgZone, OnChanges, Output, SimpleChanges} from '@angular/core';
import {FieldDocument, FieldGeometry, Category} from 'idai-field-core';
import {FieldPolyline} from './field-polyline';
import {FieldPolygon} from './field-polygon';
import {FieldMarker} from './field-marker';
import {ProjectConfiguration} from '../../../../core/configuration/project-configuration';
import {MapComponentHelper as H} from './map-component-helper';


@Component({
    selector: 'map',
    template: '<div id="map-container"></div>'
})

/**
 * @author <NAME>
 */
export class MapComponent implements AfterViewInit, OnChanges {

    @Input() documents: Array<FieldDocument>;
    @Input() selectedDocument: FieldDocument;
    @Input() additionalSelectedDocuments: Array<FieldDocument>;
    @Input() parentDocument: FieldDocument;
    @Input() coordinateReferenceSystem: string;
    @Input() update: boolean;

    @Output() onSelectDocument: EventEmitter<{ document: FieldDocument|undefined, multiSelect: boolean }>
        = new EventEmitter<{ document: FieldDocument|undefined, multiSelect: boolean }>();

    protected map: any;
    protected polygons: { [resourceId: string]: Array<FieldPolygon> } = {};
    protected polylines: { [resourceId: string]: Array<FieldPolyline> } = {};
    protected markers: { [resourceId: string]: Array<FieldMarker> } = {};

    protected polygonsArray: Array<FieldPolygon> = [];
    protected polylinesArray: Array<FieldPolyline> = [];
    protected markersArray: Array<FieldMarker> = [];

    protected polygonsLayerGroup: L.LayerGroup;
    protected polylinesLayerGroup: L.LayerGroup;
    protected markersLayerGroup: L.LayerGroup;

    protected bounds: any[] = []; // in fact L.LatLng[], but leaflet typings are incomplete
    protected categoryColors: { [categoryName: string]: string } = {};

    private canvasRenderer: L.Canvas = L.canvas({ padding: 0.5 });


    constructor(projectConfiguration: ProjectConfiguration,
                protected zone: NgZone) {

        this.categoryColors = projectConfiguration.getCategoryColors();
    }


    public ngAfterViewInit() {

        this.zone.runOutsideAngular(() => {
            if (this.map) this.map.invalidateSize(false);
        });
    }
<commit_msg>Increase canvas renderer padding [notarize]<commit_after>import {AfterViewInit, Component, EventEmitter, Input, NgZone, OnChanges, Output, SimpleChanges} from '@angular/core';
import {FieldDocument, FieldGeometry, Category} from 'idai-field-core';
import {FieldPolyline} from './field-polyline';
import {FieldPolygon} from './field-polygon';
import {FieldMarker} from './field-marker';
import {ProjectConfiguration} from '../../../../core/configuration/project-configuration';
import {MapComponentHelper as H} from './map-component-helper';


@Component({
    selector: 'map',
    template: '<div id="map-container"></div>'
})

/**
 * @author <NAME>
 */
export class MapComponent implements AfterViewInit, OnChanges {

    @Input() documents: Array<FieldDocument>;
    @Input() selectedDocument: FieldDocument;
    @Input() additionalSelectedDocuments: Array<FieldDocument>;
    @Input() parentDocument: FieldDocument;
    @Input() coordinateReferenceSystem: string;
    @Input() update: boolean;

    @Output() onSelectDocument: EventEmitter<{ document: FieldDocument|undefined, multiSelect: boolean }>
        = new EventEmitter<{ document: FieldDocument|undefined, multiSelect: boolean }>();

    protected map: any;
    protected polygons: { [resourceId: string]: Array<FieldPolygon> } = {};
    protected polylines: { [resourceId: string]: Array<FieldPolyline> } = {};
    protected markers: { [resourceId: string]: Array<FieldMarker> } = {};

    protected polygonsArray: Array<FieldPolygon> = [];
    protected polylinesArray: Array<FieldPolyline> = [];
    protected markersArray: Array<FieldMarker> = [];

    protected polygonsLayerGroup: L.LayerGroup;
    protected polylinesLayerGroup: L.LayerGroup;
    protected markersLayerGroup: L.LayerGroup;

    protected bounds: any[] = []; // in fact L.LatLng[], but leaflet typings are incomplete
    protected categoryColors: { [categoryName: string]: string } = {};

    private canvasRenderer: L.Canvas = L.canvas({ padding: 1 });


    constructor(projectConfiguration: ProjectConfiguration,
                protected zone: NgZone) {

        this.categoryColors = projectConfiguration.getCategoryColors();
    }


    public ngAfterViewInit() {

        this.zone.runOutsideAngular(() => {
            if (this.map) this.map.invalidateSize(false);
        });
    }

{'fraction_non_alphanumeric': 0.1347318339100346, 'fraction_numerical': 0.0006487889273356401, 'mean_word_length': 4.340646651270208, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '935770', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1223, 'n_words': 314}