vendor: 2,043 bytes, lines 1-65
1(function (window, document, undefined) { 2 L.Control.Custom = L.Control.extend({ 3 version: '1.0.1', 4 options: { 5 position: 'topright', 6 id: '', 7 title: '', 8 classes: '', 9 content: '', 10 style: {}, 11 datas: {}, 12 events: {}, 13 }, 14 container: null, 15 onAdd: function (map) { 16 this.container = L.DomUtil.create('div'); 17 this.container.id = this.options.id; 18 this.container.title = this.options.title; 19 this.container.className = this.options.classes; 20 this.container.innerHTML = this.options.content; 21 22 for (var option in this.options.style) 23 { 24 this.container.style[option] = this.options.style[option]; 25 } 26 27 for (var data in this.options.datas) 28 { 29 this.container.dataset[data] = this.options.datas[data]; 30 } 31 32 33 /* Prevent click events propagation to map */ 34 L.DomEvent.disableClickPropagation(this.container); 35 36 /* Prevent right click event propagation to map */ 37 L.DomEvent.on(this.container, 'contextmenu', function (ev) 38 { 39 L.DomEvent.stopPropagation(ev); 40 }); 41 42 /* Prevent scroll events propagation to map when cursor on the div */ 43 L.DomEvent.disableScrollPropagation(this.container); 44 45 for (var event in this.options.events) 46 { 47 L.DomEvent.on(this.container, event, this.options.events[event], this.container); 48 } 49 50 return this.container; 51 }, 52 53 onRemove: function (map) { 54 for (var event in this.options.events) 55 { 56 L.DomEvent.off(this.container, event, this.options.events[event], this.container); 57 } 58 }, 59 }); 60 61 L.control.custom = function (options) { 62 return new L.Control.Custom(options); 63 }; 64 65}(window, document));
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.