PageSourceSearch

https://soci-229-w3.netlify.app/index_files/libs/HomeButton-0.0.1/home-button.js

js soci-229-w3.netlify.app collected 2026-10-03 11:25:51 UTC 1,017 bytes, 40 lines download raw bytes

1LeafletWidget.methods.addHomeButton = function (xmin, ymin, xmax, ymax, useext,
2                                                group, label, icon, position) {
3
4  if (this.easyButton) {
5		this.easyButton.removeFrom(this);
6	}
7
8  var bx = [];
9  if (useext) {
10    bx = [[ymin, xmin], [ymax, xmax]];
11  } else {
12    bx = this.layerManager._groupContainers[group].getBounds();
13  }
14
15  var easyButton = new L.easyButton({
16    position: position,
17    states: [{
18            stateName: label,   // name the state
19            icon:      icon,          // and define its properties
20            title:     label, // like its title
21            onClick: function(btn, map){
22                map.fitBounds(bx, {maxZoom: 18});
23                btn.state(label);
24            }
25    }]
26  });
27
28  easyButton.addTo(this);
29
30  this.currentEasyButton = easyButton;
31
32};
33
34
35LeafletWidget.methods.removeHomeButton = function () {
36  if (this.currentEasyButton) {
37    this.currentEasyButton.removeFrom(this);
38    this.currentEasyButton = null;
39  }
40};

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.