1/** 2 * @file 3 * Control Zoom. 4 */ 5 6/** 7 * @typedef {Object} ControlZoomSettings 8 * 9 * @extends {GeolocationMapFeatureSettings} 10 * 11 * @property {String} position 12 */ 13 14(function (Drupal) { 15 16 'use strict'; 17 18 /** 19 * Zoom control. 20 * 21 * @type {Drupal~behavior} 22 * 23 * @prop {Drupal~behaviorAttach} attach 24 * Attaches common map zoom functionality to relevant elements. 25 */ 26 Drupal.behaviors.leafletControlZoom = { 27 attach: function (context, drupalSettings) { 28 Drupal.geolocation.executeFeatureOnAllMaps( 29 'leaflet_control_zoom', 30 31 /** 32 * @param {GeolocationLeafletMap} map - Current map. 33 * @param {ControlZoomSettings} featureSettings - Settings for current feature. 34 */ 35 function (map, featureSettings) { 36 L.control.zoom({ 37 position: featureSettings.position 38 }).addTo(map.leafletMap); 39 40 return true; 41 }, 42 drupalSettings 43 ); 44 }, 45 detach: function (context, drupalSettings) {} 46 }; 47 48})(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.