PageSourceSearch

https://www.cestovinky.cz/modules/contrib/geolocation/modules/geol…/geolocation-control-zoom.js?tlrc8u

js cestovinky.cz collected 2026-09-24 23:35:25 UTC 1,518 bytes, 60 lines download raw bytes

1/**
2 * @file
3 * Zoom Control.
4 */
5
6/**
7 * @typedef {Object} ControlZoomSettings
8 *
9 * @extends {GeolocationMapFeatureSettings}
10 *
11 * @property {String} behavior
12 * @property {String} position
13 * @property {String} style
14 */
15
16(function (Drupal) {
17  "use strict";
18
19  /**
20   * Zoom control.
21   *
22   * @type {Drupal~behavior}
23   *
24   * @prop {Drupal~behaviorAttach} attach
25   *   Attaches common map style functionality to relevant elements.
26   */
27  Drupal.behaviors.geolocationZoomControl = {
28    attach: function (context, drupalSettings) {
29      Drupal.geolocation.executeFeatureOnAllMaps(
30        "control_zoom",
31
32        /**
33         * @param {GeolocationGoogleMap} map - Current map.
34         * @param {ControlZoomSettings} featureSettings - Settings for current feature.
35         */
36        function (map, featureSettings) {
37          map.addPopulatedCallback(function (map) {
38            var options = {
39              zoomControlOptions: {
40                position: google.maps.ControlPosition[featureSettings.position],
41                style: google.maps.ZoomControlStyle[featureSettings.style],
42              },
43            };
44
45            if (featureSettings.behavior === "always") {
46              options.zoomControl = true;
47            } else {
48              options.zoomControl = undefined;
49            }
50            map.googleMap.setOptions(options);
51          });
52
53          return true;
54        },
55        drupalSettings
56      );
57    },
58    detach: function (context, drupalSettings) {},
59  };
60})(Drupal);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.