Plugin API

Here is the basic structure of the lightgallery module.

var fullscreenDefaults = {
    fullScreen: true
};

var Fullscreen = function(element) {

    this.el = element;

    // You can access all lightgallery variables and functions like this.
    this.core = window.lgData[this.el.getAttribute('lg-uid')];
    this.core.s = Object.assign({}, fullscreenDefaults, this.core.s);

    this.init();

    return this;
};

Fullscreen.prototype.init = function() {

};

/**
 * Destroy function must be defined.
 * lightgallery will automatically call your module destroy function 
 * before destroying the gallery
 */
Fullscreen.prototype.destroy = function() {

};

window.lgModules.fullscreen = Fullscreen;