1L.Control.Tour = L.Control.extend({ 2 options: { 3 position: "topright", 4 enable: false 5 }, 6 initialize: function(t) { 7 L.setOptions(this, t), this.map = null, this.active = !1 8 }, 9 onAdd: function(t) { 10 return this.map = t, 11 this.active = !1, 12 this.controlDiv = L.DomUtil.create("div", "leaflet-control-tour"), 13 this.controlDiv.control = this, 14 this.controlDiv.title = "Clicca quà per vedere il tour", 15 this.controlDiv.innerHTML = " ", 16 L.DomEvent.addListener( 17 this.controlDiv, "mousedown", 18 L.DomEvent.stopPropagation).addListener( 19 this.controlDiv, "click", L.DomEvent.stopPropagation).addListener( 20 this.controlDiv, "click", L.DomEvent.preventDefault).addListener( 21 this.controlDiv, "click", function() { 22 this.control.toggleState() 23 }), this.setStateOff(), this.controlDiv 24 25 }, 26 toggleState: function() { 27 this.active ? this.setStateOff() : this.setStateOn() 28 }, 29 setStateOn: function() { 30 L.DomUtil.addClass(this.controlDiv, "leaflet-control-tour-active"), 31 this.active = !0, 32 this.map.dragging.enable(), 33 this.map.on("mousedown", this.handleMouseDown, this), 34 this.map.on('click', this._onMouseClick, this), 35 L.DomUtil.addClass(this.map._container, "leaflet-control-tour-active"), 36 this.controlDiv.title = "Clicca quà per vedere il tour", 37 this.options.enable=true, 38 localStorage.clear(); 39 40 window.location.reload(true); 41 }, 42 43 setStateOff: function() { 44 L.DomUtil.removeClass(this.controlDiv, "leaflet-control-tour-active"), 45 this.active = !1, 46 this.map.dragging.enable(), 47 this.map.off("mousedown", this.handleMouseDown, this), 48 L.DomUtil.removeClass(this.map._container, "leaflet-control-tour-active"), 49 this.controlDiv.title = "Clicca quà per vedere il tour", 50 this.options.enable=false 51 }, 52 handleMouseDown: function(t) { 53 54 }, 55 _onMouseClick: function (e) { 56 console.log("_onMouseClick"); 57 } 58}); 59L.Control.tour = function(t) { 60 return new L.Control.Tour(t) 61};
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.