Skip to main content

ensemble.Lightbox

ensemble#

ensemble~Lightbox โ‡ Modal#

ensemble.Lightbox component.

Kind: inner class of ensemble
Extends: Modal
Todo

  • arguments

new Lightbox([element], options)#

Constructor method.

ParamTypeDefaultDescription
[element]ElementAn optional Element node for lightbox grouping
optionsobjectOptions object
[options.ns]string"modal"The namespace for lightbox
[options.root]string"body"The root Element node
[options.className]string | Array.<string>"[modal, modal-lightbox]"The component CSS class name
[options.selector]stringA selector to find elements
[options.contents]objectAn object of contents
[options.fx]booleantrueSwitch for allow effects
[options.windowed]booleanfalseSwitch for framing in a window
[options.cloning]booleantrueAllow cloning of Element nodes
[options.backClose]booleantrueSwitch for closing on tap/click outside the content
[options.keyboard]booleantrueSwitch for keyboard navigation
[options.navigation]booleantrueSwitch for navigation
[options.captioned]booleantrueSwitch for captions
[options.infinite]booleantrueSwitch for carousel alike loop navigation
[options.autoDiscover]booleantrueSwitch for auto-discover type of contents
[options.autoHide]mixednavigationSwitch for auto-hide "navigation" or "captions", boolean or string value, true for both
[options.overlayed]mixedfalseSwitch for overlayed "navigation" or "captions", boolean or string value, true for both
[options.checkOrigin]booleantrueSwitch for a bland control of origin capted from src url
[options.close]objectCustom parameters for close button
[options.prev]objectCustom parameters for button of the previous arrow
[options.next]objectCustom parameters for button of the next arrow
[options.onOpen]functiononOpen callback, fires when open lightbox
[options.onClose]functiononOpen callback, fires when close lightbox
[options.onShow]functiononShow callback, fires when show lightbox, after it openes
[options.onHide]functiononHide callback, fires when hide lightbox, before it closes
[options.onContent]functiononContent callback, fires when a content will be shown
[options.onStep]functiononStep callback, fires when step between slides
[options.onSlide]functiononSlide callback, fires when slide
[options.onCaption]functiononCaption callback, fires when a caption will be shown

Example

var lightbox = new ensemble.Lightbox({ contents: [ { type: 'image', src: '../img/docusaurus.png' } ] });
lightbox.open();
lightbox.close();

lightbox._defaults() โ‡’ object#

Options object default properties.

Kind: instance method of Lightbox

lightbox._bindings()#

Methods binding.

Kind: instance method of Lightbox

lightbox.generator()#

The generator creates the container box with almost everything the component needs.

Kind: instance method of Lightbox
Todo

  • TODO

lightbox.populate(target)#

In this stage the component is populated with all the content progeny.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
targetElementThe element that is invoking

lightbox.resume(target)#

Processing when the component is resumed.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
targetElementThe element that is invoking

lightbox.add(content)#

Adds a content.

Kind: instance method of Lightbox
Todo

  • TODO
ParamType
contentensemble.Compo

lightbox.remove(content)#

Removes a content.

Kind: instance method of Lightbox
Todo

  • TODO
ParamType
contentensemble.Compo

lightbox.prev(e)#

Steps to previous slide.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
eEventAn Event

lightbox.next(e)#

Steps to next slide.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
eEventAn Event

lightbox.slide(step)#

Slides to previous or next slide.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
stepnumberStep to previous: -1, Step to next: 1

lightbox.navigation(way)#

Enable and disable the navigation.

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
waynumberCould step both: 0, Could step to next: -1, Could step to previous: 1

lightbox.caption(text)#

Inserts or overwrites caption text

Kind: instance method of Lightbox
Todo

  • TODO
ParamTypeDescription
textstringText content

lightbox.keyboard(e)#

Captures keyboard codes corresponding to functions to be triggered.

Kind: instance method of Lightbox

ParamTypeDescription
eEventAn Event