ensemble.Lightbox
#
ensembleModal
#
ensemble~Lightbox โ ensemble.Lightbox component.
Kind: inner class of ensemble
Extends: Modal
Todo
- arguments
- ~Lightbox โ
Modal
#
new Lightbox([element], options)Constructor method.
Param | Type | Default | Description |
---|---|---|---|
[element] | Element | An optional Element node for lightbox grouping | |
options | object | Options 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] | string | A selector to find elements | |
[options.contents] | object | An object of contents | |
[options.fx] | boolean | true | Switch for allow effects |
[options.windowed] | boolean | false | Switch for framing in a window |
[options.cloning] | boolean | true | Allow cloning of Element nodes |
[options.backClose] | boolean | true | Switch for closing on tap/click outside the content |
[options.keyboard] | boolean | true | Switch for keyboard navigation |
[options.navigation] | boolean | true | Switch for navigation |
[options.captioned] | boolean | true | Switch for captions |
[options.infinite] | boolean | true | Switch for carousel alike loop navigation |
[options.autoDiscover] | boolean | true | Switch for auto-discover type of contents |
[options.autoHide] | mixed | navigation | Switch for auto-hide "navigation" or "captions", boolean or string value, true for both |
[options.overlayed] | mixed | false | Switch for overlayed "navigation" or "captions", boolean or string value, true for both |
[options.checkOrigin] | boolean | true | Switch for a bland control of origin capted from src url |
[options.close] | object | Custom parameters for close button | |
[options.prev] | object | Custom parameters for button of the previous arrow | |
[options.next] | object | Custom parameters for button of the next arrow | |
[options.onOpen] | function | onOpen callback, fires when open lightbox | |
[options.onClose] | function | onOpen callback, fires when close lightbox | |
[options.onShow] | function | onShow callback, fires when show lightbox, after it openes | |
[options.onHide] | function | onHide callback, fires when hide lightbox, before it closes | |
[options.onContent] | function | onContent callback, fires when a content will be shown | |
[options.onStep] | function | onStep callback, fires when step between slides | |
[options.onSlide] | function | onSlide callback, fires when slide | |
[options.onCaption] | function | onCaption callback, fires when a caption will be shown |
Example
object
#
lightbox._defaults() โ 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
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
#
lightbox.resume(target)Processing when the component is resumed.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
#
lightbox.add(content)Adds a content.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type |
---|---|
content | ensemble.Compo |
#
lightbox.remove(content)Removes a content.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type |
---|---|
content | ensemble.Compo |
#
lightbox.prev(e)Steps to previous slide.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type | Description |
---|---|---|
e | Event | An Event |
#
lightbox.next(e)Steps to next slide.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type | Description |
---|---|---|
e | Event | An Event |
#
lightbox.slide(step)Slides to previous or next slide.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type | Description |
---|---|---|
step | number | Step to previous: -1, Step to next: 1 |
#
lightbox.navigation(way)Enable and disable the navigation.
Kind: instance method of Lightbox
Todo
- TODO
Param | Type | Description |
---|---|---|
way | number | Could 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
Param | Type | Description |
---|---|---|
text | string | Text content |
#
lightbox.keyboard(e)Captures keyboard codes corresponding to functions to be triggered.
Kind: instance method of Lightbox
Param | Type | Description |
---|---|---|
e | Event | An Event |