<commit_before>import {HsEventBusService} from '../core/event-bus.service';
import {HsLayerDescriptor} from './layer-descriptor.interface';
import {HsLayerEditorVectorLayerService} from './layer-editor-vector-layer.service';
import {HsLayerUtilsService} from '../utils/layer-utils.service';
import {HsLayoutService} from '../layout/layout.service';
import {HsLegendDescriptor} from '../legend/legend-descriptor.interface';
import {HsLegendService} from '../legend';
import {HsMapService} from '../map/map.service';
import {HsWmsGetCapabilitiesService} from '../../common/wms/get-capabilities.service';
import {Injectable} from '@angular/core';
import {Layer} from 'ol/layer';
import {WMSCapabilities} from 'ol/format';
import {get as getProj, transform, transformExtent} from 'ol/proj';

@Injectable({
  providedIn: 'root',
})
export class HsLayerEditorService {
  legendDescriptor: HsLegendDescriptor;

  constructor(
    private HsMapService: HsMapService,
    private HsWmsGetCapabilitiesService: HsWmsGetCapabilitiesService,
    private HsLayerUtilsService: HsLayerUtilsService,
    private HsLayerEditorVectorLayerService: HsLayerEditorVectorLayerService,
    private HsEventBusService: HsEventBusService,
    private HsLayoutService: HsLayoutService,
    private HsLegendService: HsLegendService,
  ) {
  }

  /**
   * @function zoomToLayer
   * @memberOf HsLayerEditorService
   * @param {Layer} layer Openlayers layer to zoom to
   * @description Zoom to selected layer (layer extent). Get extent
   * from bounding box property, getExtent() function or from<commit_msg>Fix inline legend not displaying<commit_after>import {HsEventBusService} from '../core/event-bus.service';
import {HsLayerDescriptor} from './layer-descriptor.interface';
import {HsLayerEditorVectorLayerService} from './layer-editor-vector-layer.service';
import {HsLayerSelectorService} from './layer-selector.service';
import {HsLayerUtilsService} from '../utils/layer-utils.service';
import {HsLayoutService} from '../layout/layout.service';
import {HsLegendDescriptor} from '../legend/legend-descriptor.interface';
import {HsLegendService} from '../legend';
import {HsMapService} from '../map/map.service';
import {HsWmsGetCapabilitiesService} from '../../common/wms/get-capabilities.service';
import {Injectable} from '@angular/core';
import {Layer} from 'ol/layer';
import {WMSCapabilities} from 'ol/format';
import {get as getProj, transform, transformExtent} from 'ol/proj';

@Injectable({
  providedIn: 'root',
})
export class HsLayerEditorService {
  legendDescriptor: HsLegendDescriptor;

  constructor(
    private HsMapService: HsMapService,
    private HsWmsGetCapabilitiesService: HsWmsGetCapabilitiesService,
    private HsLayerUtilsService: HsLayerUtilsService,
    private HsLayerEditorVectorLayerService: HsLayerEditorVectorLayerService,
    private HsEventBusService: HsEventBusService,
    private HsLayoutService: HsLayoutService,
    private HsLegendService: HsLegendService,
    private HsLayerSelectorService: HsLayerSelectorService
  ) {
    this.HsLayerSelectorService.layerSelected.subscribe((layer) => {
      this.legendDescriptor = this.HsLegendService.getLayerLegendDescriptor(
        layer.layer
      );
    });
  }

  /**
   * @function zoomToLayer
   * @memberOf HsLayerEditorService
   * @param {Layer} layer Openlayers layer to zoom to
   * @description Zoom to selected layer (layer extent). Get extent
   * from bounding box property, getExtent() function or from
{'fraction_non_alphanumeric': 0.10970706490522689, 'fraction_numerical': 0.0, 'mean_word_length': 5.4025735294117645, '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': '6194312', 'n_tokens_mistral': 1019, 'n_tokens_neox': 987, 'n_words': 244}