PageSourceSearch

https://exitglacierguides.com/sites/all/modules/leaflet_javascript/pancontrol/L.Control.Pan.js?tkwhup

js exitglacierguides.com collected 2026-10-05 01:49:15 UTC 1,353 bytes, 39 lines download raw bytes

1L.Control.Pan = L.Control.extend({
2	options: {
3		position: 'bottomleft',
4		panOffset: 200
5	},
6	onAdd: function(map) {
7		var className = 'leaflet-control-pan',
8			container = L.DomUtil.create('div', className),
9			off = this.options.panOffset;
10		this._panButton('Up', className + '-up', container, map, new L.Point(0, -off));
11		this._panButton('Left', className + '-left', container, map, new L.Point(-off, 0));
12		this._panButton('Right', className + '-right', container, map, new L.Point(off, 0));
13		this._panButton('Down', className + '-down', container, map, new L.Point(0, off));
14		return container;
15	},
16	_panButton: function(title, className, container, map, offset, text) {
17		var wrapper = L.DomUtil.create('div', className + "-wrap", container);
18		var link = L.DomUtil.create('a', className, wrapper);
19		link.href = '#';
20		link.title = title;
21		L.DomEvent.on(link, 'click', L.DomEvent.stopPropagation).on(link, 'click', L.DomEvent.preventDefault).on(link, 'click', function() {
22			map.panBy(offset);
23		}, map).on(link, 'dblclick', L.DomEvent.stopPropagation)
24		return link;
25	}
26});
27L.Map.mergeOptions({
28	panControl: true
29});
30L.Map.addInitHook(function() {
31	if (this.options.panControl) {
32		this.panControl = new L.Control.Pan();
33		this.addControl(this.panControl);
34	}
35});
36L.control.pan = function(options) {
37	return new L.Control.Pan(options);
38};
39	

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.