<commit_before>/**
 * @module app.LocationControl
 */
/**
 * @fileoverview This file defines the geolocation control.
 *
 */

import appNotifyNotificationType from './NotifyNotificationType.js';
import {CLASS_CONTROL, CLASS_UNSELECTABLE} from 'ol/css.js';
import olControlControl from 'ol/control/Control.js';
import {listen} from 'ol/events.js';
import olFeature from 'ol/Feature.js';
import olGeomPoint from 'ol/geom/Point.js';
import olGeolocation from 'ol/Geolocation.js';
import {getChangeEventType} from 'ol/Object.js';

/**
 * @enum {string}
 */
const olGeolocationProperty = {
  ACCURACY: 'accuracy',
  ACCURACY_GEOMETRY: 'accuracyGeometry',
  ALTITUDE: 'altitude',
  ALTITUDE_ACCURACY: 'altitudeAccuracy',
  HEADING: 'heading',
  POSITION: 'position',
  PROJECTION: 'projection',
  SPEED: 'speed',
  TRACKING: 'tracking',
  TRACKING_OPTIONS: 'trackingOptions'
};

class LocationControl extends olControlControl {
  /**
   * @constructor
   * @extends {ol.control.Control}
   * @param {app.LocationControlOptions} options Location Control
   * options.
   * @ngInject
   */
  constructor(options) {
    var label = (options.label !== undefined) ? options.label : 'L';
    var tipLabel = (options.tipLabel !== undefined) ?
        options.tipLabel : 'Location';

    var button = document.createElement('BUTTON');
    button.appendChild(document.createTextNode(label));
    button.setAttribute('type', 'button');
    button.setAttribute('title', tipLabel);

    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' +
        CLASS_CONTROL + ' ' + 'tracker-off';

    /**
     * @type {!Element}
     */
    var element = document.createElement('DIV');
    element.setAttribute('class', cssClasses);
    element.appendChild(button);
    super({
      element: element,
      target: options.target
    });

    var className = (options.className !== undefined) ? options.className :
        'location-button';
    /**
     * @type {angular.$window}
     * @private
     */
    this.window_ = options.window;

    /**
     * @type {angular.Scope}
     * @private
     */
    this.scope_ = options.scope;
<commit_msg>Fix location control button position<commit_after>/**
 * @module app.LocationControl
 */
/**
 * @fileoverview This file defines the geolocation control.
 *
 */

import appNotifyNotificationType from './NotifyNotificationType.js';
import {CLASS_CONTROL, CLASS_UNSELECTABLE} from 'ol/css.js';
import olControlControl from 'ol/control/Control.js';
import {listen} from 'ol/events.js';
import olFeature from 'ol/Feature.js';
import olGeomPoint from 'ol/geom/Point.js';
import olGeolocation from 'ol/Geolocation.js';
import {getChangeEventType} from 'ol/Object.js';

/**
 * @enum {string}
 */
const olGeolocationProperty = {
  ACCURACY: 'accuracy',
  ACCURACY_GEOMETRY: 'accuracyGeometry',
  ALTITUDE: 'altitude',
  ALTITUDE_ACCURACY: 'altitudeAccuracy',
  HEADING: 'heading',
  POSITION: 'position',
  PROJECTION: 'projection',
  SPEED: 'speed',
  TRACKING: 'tracking',
  TRACKING_OPTIONS: 'trackingOptions'
};

class LocationControl extends olControlControl {
  /**
   * @constructor
   * @extends {ol.control.Control}
   * @param {app.LocationControlOptions} options Location Control
   * options.
   * @ngInject
   */
  constructor(options) {
    var label = (options.label !== undefined) ? options.label : 'L';
    var tipLabel = (options.tipLabel !== undefined) ?
        options.tipLabel : 'Location';

    var button = document.createElement('BUTTON');
    button.appendChild(document.createTextNode(label));
    button.setAttribute('type', 'button');
    button.setAttribute('title', tipLabel);

    var className = (options.className !== undefined) ? options.className :
        'location-button';

    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' +
        CLASS_CONTROL + ' ' + 'tracker-off';

    /**
     * @type {!Element}
     */
    var element = document.createElement('DIV');
    element.setAttribute('class', cssClasses);
    element.appendChild(button);
    super({
      element: element,
      target: options.target
    });

    /**
     * @type {angular.$window}
     * @private
     */
    this.window_ = options.window;

    /**
     * @type {angular.Scope}
     * @private
     */
    this.scope_ = options.scope;

{'fraction_non_alphanumeric': 0.1425233644859813, 'fraction_numerical': 0.0, 'mean_word_length': 3.5639658848614073, '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': '7660326', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1310, 'n_words': 278}