<commit_before>import Collection from 'ol/Collection';
import Feature from 'ol/Feature';
import VectorLayer from 'ol/layer/Vector';
import {Component, OnInit} from '@angular/core';
import {Fill, Icon, Stroke, Style} from 'ol/style';
import {HsConfig} from './../../config.service';
import {HsCoreService} from './../core/core.service';
import {HsLayoutService} from './../layout/layout.service';
import {HsMapService} from './../map/map.service';
import {HsTripPlannerService} from './trip-planner.service';
import {HsUtilsService} from '../utils/utils.service';
import {Modify} from 'ol/interaction';
import {Point} from 'ol/geom';
import {Vector} from 'ol/source';
import {transform} from 'ol/proj';

/**
 * @memberof hs.trip_planner
 * @ngdoc component
 * @name HsTripPlannerToolbarButtonComponent
 */
@Component({
  selector: 'hs-trip-planner',
  template: require('./partials/trip_planner.html'),
})
export class HsTripPlannerComponent implements OnInit {
  loaderImage: string;
  timer: any;
  movable_features = new Collection();
  source = new Vector({});
  constructor(
    private HsMapService: HsMapService,
    private HsCoreService: HsCoreService,
    private HsTripPlannerService: HsTripPlannerService,
    private HsConfig: HsConfig,
    private HsLayoutService: HsLayoutService,
    private HsUtilsService: HsUtilsService
  ) {}
  ngOnInit(): void {
    this.loaderImage = this.HsUtilsService.resolveEsModule(
      // eslint-disable-next-line @typescript-eslint/no-var-requires
      require('../../img/ajax-loader.gif')
    );
    const style = function (feature, resolution) {
      return [
        new Style({
          fill: new Fill({
            color: 'rgba(255, 255, 255, 0.6)',
          }),
          stroke: new Stroke({
            color: '#337AB7',
            width: 3,
          }),
          image: new Icon({
            src: feature.get('highlighted')
              ? this.HsConfig.hsl_path + 'img/pin_white_red32.png'
              : this.HsConfig.hsl_path + 'img/pin_white_blue32.png',
            crossOrigin: 'anonymous',
            anchor: [0.5, 1],
          }),
        }),
      ];
    };
    const vector = new VectorLayer({
      source: this.source,
      style: style,
      title: 'Travel route',
    });
    const modify = new Modify({
      features: this.movable_features,<commit_msg>Fix feature icon<commit_after>import Collection from 'ol/Collection';
import Feature from 'ol/Feature';
import VectorLayer from 'ol/layer/Vector';
import {Component, OnInit} from '@angular/core';
import {Fill, Icon, Stroke, Style} from 'ol/style';
import {HsConfig} from './../../config.service';
import {HsCoreService} from './../core/core.service';
import {HsLayoutService} from './../layout/layout.service';
import {HsMapService} from './../map/map.service';
import {HsTripPlannerService} from './trip-planner.service';
import {HsUtilsService} from '../utils/utils.service';
import {Modify} from 'ol/interaction';
import {Point} from 'ol/geom';
import {Vector} from 'ol/source';
import {transform} from 'ol/proj';

/**
 * @memberof hs.trip_planner
 * @ngdoc component
 * @name HsTripPlannerToolbarButtonComponent
 */
@Component({
  selector: 'hs-trip-planner',
  template: require('./partials/trip_planner.html'),
})
export class HsTripPlannerComponent implements OnInit {
  loaderImage: string;
  timer: any;
  movable_features = new Collection();
  source = new Vector({});
  constructor(
    private HsMapService: HsMapService,
    private HsCoreService: HsCoreService,
    private HsTripPlannerService: HsTripPlannerService,
    private HsConfig: HsConfig,
    private HsLayoutService: HsLayoutService,
    private HsUtilsService: HsUtilsService
  ) {}
  ngOnInit(): void {
    this.loaderImage = this.HsUtilsService.resolveEsModule(
      // eslint-disable-next-line @typescript-eslint/no-var-requires
      require('../../img/ajax-loader.gif')
    );
    const style = (feature, resolution) => {
      return [
        new Style({
          fill: new Fill({
            color: 'rgba(255, 255, 255, 0.6)',
          }),
          stroke: new Stroke({
            color: '#337AB7',
            width: 3,
          }),
          image: new Icon({
            src: feature.get('highlighted')
              ? this.HsUtilsService.resolveEsModule(
                  require('../../img/pin_white_red32.png')
                )
              : this.HsUtilsService.resolveEsModule(
                  require('../../img/pin_white_blue32.png')
                ),
            crossOrigin: 'anonymous',
            anchor: [0.5, 1],
          }),
        }),
      ];
    };
    const vector = new VectorLayer({
      source: this.source,
      style: style,
      title: 'Travel route',
    });
    const modify = new Modify({
      features: this.movable_features,
{'fraction_non_alphanumeric': 0.1405044819678966, 'fraction_numerical': 0.009589326662497394, 'mean_word_length': 2.792885375494071, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3514497', 'n_tokens_mistral': 1501, 'n_tokens_neox': 1432, 'n_words': 340}