vendor: 1,280 bytes, lines 1-41
1L.SpinMapMixin = { 2 spin: function (state, options) { 3 if (!!state) { 4 // start spinning ! 5 if (!this._spinner) { 6 this._spinner = new Spinner(options).spin(this._container); 7 this._spinning = 0; 8 } 9 this._spinning++; 10 } 11 else { 12 this._spinning--; 13 if (this._spinning <= 0) { 14 // end spinning ! 15 if (this._spinner) { 16 this._spinner.stop(); 17 this._spinner = null; 18 } 19 } 20 } 21 } 22}; 23 24L.Map.include(L.SpinMapMixin); 25 26L.Map.addInitHook(function () { 27 this.on('layeradd', function (e) { 28 // If added layer is currently loading, spin ! 29 if (e.layer.loading) this.spin(true); 30 if (typeof e.layer.on != 'function') return; 31 e.layer.on('data:loading', function () { this.spin(true); }, this); 32 e.layer.on('data:loaded', function () { this.spin(false); }, this); 33 }, this); 34 this.on('layerremove', function (e) { 35 // Clean-up 36 if (e.layer.loading) this.spin(false); 37 if (typeof e.layer.on != 'function') return; 38 e.layer.off('data:loaded'); 39 e.layer.off('data:loading'); 40 }, this); 41});
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.