Skip to content

Commit b813e53

Browse files
author
ben
committed
updated docs
1 parent c30ef03 commit b813e53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Property | Type | Default | Description
7575
:-----------------------|:--------------|:--------------|:--------------------------------
7676
images | array | undefined | Required. An array of objects containing image properties (see Image Options above).
7777
enableImageSelection | bool | true | Optional. Allow images to be selectable. Setting this option to `false` whilst supplying images with `isSelected: true` will result in those images being permanently selected.
78-
onSelectImage | func | undefined | Optional. Function to execute when an image is selected. Access to image using `this` via [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call), Optional args: index (index of selected image in images array), image (the selected image). This function is only executable when `enableImageSelection: true`.
78+
onSelectImage | func | undefined | Optional. Function to execute when an image is selected. Access to image object using `this` (See [Programmers note](#Programmers-Note) for info about Function.prototype.call()). Optional args: index (index of selected image in images array), image (the selected image). This function is only executable when `enableImageSelection: true`.
7979
rowHeight | number | 180 | Optional. The height of each row in the gallery.
8080
maxRows | number | undefined | Optional. The maximum number of rows to show in the gallery.
8181
margin | number | 2 | Optional. The margin around each image in the gallery.
@@ -126,6 +126,9 @@ lightboxWidth | number | 1024 | Optional. Maximum width of th
126126

127127
* If you don't know your `thumbnailWidth` and `thumbnailHeight` values, you can find these out using any number of [javascript hacks](http://stackoverflow.com/a/1944298), bearing in mind the load penalty associated with these methods.
128128

129+
130+
### Programmers Note
131+
129132
* User defined functions that allow access to `this` via [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) do not require you to pass `this` as a parameter. `this` will be defined at the time the function is called.
130133

131134
e.g.

0 commit comments

Comments
 (0)