The "dialog" shared between any Lightbox instances on the page, publically available for programmatic manipulation.
A widget that intercepts anchor links (typically around images) and displays a modal Dialog. this is the actual Dialog, which you can create and populate manually, though should use simple Lightbox's unless you need the direct access.
There should only be one of these on a page, so all dojox.image.Lightbox's will us it (the first instance of a Lightbox to be show()'n will create me If i do not exist)
Parameter | Type | Description |
---|---|---|
args | undefined |
See the dojox/image/Lightbox.LightboxDialog reference documentation for more information.
// show a single image from a url var url = "http://dojotoolkit.org/logo.png"; var dialog = new dojox.image.LightboxDialog().startup(); dialog.show({ href: url, title:"My Remote Image"});
an object of arrays, each array (of objects) being a unique 'group'
If true, ensure the image always stays within the viewport more difficult than necessary to disable, but enabled by default seems sane in most use cases.
The text to display when an unreachable image is linked
The classname to apply to the image node in the dialog (for extra styling)
The src="" attribute of our imageNode (can be null at statup)
Array of objects. this is populated by from the JSON object _groups, and should not be populate manually. it is a placeholder for the currently showing group of images in this master dialog
If true, this Dialog instance will be truly modal and prevent closing until explicitly told to by calling hide() or clicking the (x) - Defaults to false to preserve previous behaviors. (aka: enable click-to-close on the underlay)
Handle keyboard navigation internally
Parameter | Type | Description |
---|---|---|
e | Event |
we want to know the viewport size any time it changes
Parameter | Type | Description |
---|---|---|
e | Event |
A function to trigger all 'real' showing of some src
Parameter | Type | Description |
---|---|---|
src | undefined |
resize an image to fit within the bounds of the viewport
Parameter | Type | Description |
---|---|---|
size | Object | The 'size' object passed around for this image |
Reset the image size to some actual size.
Parameter | Type | Description |
---|---|---|
size | undefined |
Add an image to this Master Lightbox
Parameter | Type | Description |
---|---|---|
child | Object | The image information to add.
|
group | String |
Optional attach to group of similar tag or null for individual image instance |
Remove all images in a passed group
Parameter | Type | Description |
---|---|---|
group | undefined |
Remove an image instance from this LightboxDialog.
Parameter | Type | Description |
---|---|---|
child | Object | A reference to the Lightbox child that was added (or an object literal) only the .href member is compared for uniqueness. The object may contain a .group member as well. |
Resize our dialog container, and fire _showImage
Parameter | Type | Description |
---|---|---|
size | Object | |
forceTitle | undefined |
Show the Master Dialog. Starts the chain of events to show an image in the dialog, including showing the dialog if it is not already visible
Parameter | Type | Description |
---|---|---|
groupData | Object | needs href and title attributes. the values for this image. |
Add some extra event handlers, and startup our superclass.
Perhaps the only dijit._Widget
that returns itself to allow
'chaining' or var referencing with .startup()
Parameter | Type | Description |
---|---|---|
e | undefined |
// show a single image from a url var url = "http://dojotoolkit.org/logo.png"; var dialog = new dojox.image.LightboxDialog().startup(); dialog.show({ href: url, title:"My Remote Image"});
a stub function, called with the currently displayed image as the only argument
Parameter | Type | Description |
---|---|---|
groupData | undefined |
// show a single image from a url var url = "http://dojotoolkit.org/logo.png"; var dialog = new dojox.image.LightboxDialog().startup(); dialog.show({ href: url, title:"My Remote Image"});