index.js (546B)
1 import L from 'leaflet'; 2 import './style.css'; 3 4 const CloseButtonMixin = { 5 createCloseButton: function(container) { 6 this.closeButton = L.DomUtil.create('div', 'photo-viewer-button-close', container); 7 L.DomEvent.on(this.closeButton, 'click', this.onCloseClick, this); 8 }, 9 10 onCloseClick: function() { 11 this.fire('closeclick'); 12 }, 13 }; 14 15 const Events = { 16 ImageChange: 'ImageChange', 17 BearingChange: 'BearingChange', 18 YawPitchZoomChangeEnd: 'YawPitchZoomChangeEnd', 19 }; 20 21 export {CloseButtonMixin, Events};