Skip to content

Commit 747be27

Browse files
author
ben
committed
updated docs
1 parent eb8bb34 commit 747be27

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ 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 object using `this` (See [Programmers notes](#Programmers-notes) 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`.
78+
onSelectImage | func | undefined | Optional. Function to execute when an image is selected. Access to image object using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`). 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.
8282
enableLightbox | bool | true | Optional. Enable lightbox display of full size image when thumbnail clicked.
83-
onClickThumbnail | func | openLightbox | Optional. Function to execute when gallery thumbnail clicked. Allows access to thumbnail using `this` (See [Programmers notes](#Programmers-notes) for info about Function.prototype.call()). Optional args: index (index of selected image in images array), event (the click event). Overrides openLightbox.
84-
lightboxWillOpen | func | undefined | Optional. Function to be called before opening lightbox. Allows access to gallery using `this` (See [Programmers notes](#Programmers-notes) for info about Function.prototype.call()). Optional arg: index (index of selected image in images array).
85-
lightboxWillClose | func | undefined | Optional. Function to be called before closing lightbox. Allows access to gallery using `this` (See [Programmers notes](#Programmers-notes) for info about Function.prototype.call()).
83+
onClickThumbnail | func | openLightbox | Optional. Function to execute when gallery thumbnail clicked. Allows access to thumbnail using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`). Optional args: index (index of selected image in images array), event (the click event). Overrides openLightbox.
84+
lightboxWillOpen | func | undefined | Optional. Function to be called before opening lightbox. Allows access to gallery using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`). Optional arg: index (index of selected image in images array).
85+
lightboxWillClose | func | undefined | Optional. Function to be called before closing lightbox. Allows access to gallery using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`).
8686
tagStyle | object | tagStyle | Optional. Style to pass to tag elements. Overrides internal tag style.
87-
tileViewportStyle | func | tileViewportStyle | Optional. Function to style the image tile viewport. Allows access to image tile viewport using `this` (See [Programmers notes](#Programmers-notes) for info about Function.prototype.call()). Overrides internal tileViewportStyle function.
88-
thumbnailStyle | func | thumbnailStyle | Optional. Function to style the image thumbnail. Allows access to thumbnail using `this` (See [Programmers notes](#Programmers-notes) for info about Function.prototype.call()). Overrides internal thumbnailStyle function.
87+
tileViewportStyle | func | tileViewportStyle | Optional. Function to style the image tile viewport. Allows access to image tile viewport using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`). Overrides internal tileViewportStyle function.
88+
thumbnailStyle | func | thumbnailStyle | Optional. Function to style the image thumbnail. Allows access to thumbnail using `this` (See [Programmers notes](#programmers-notes) for more info about implicit `this`). Overrides internal thumbnailStyle function.
8989

9090
## Lightbox Options
9191
NOTE: these options are passed inside the Gallery tag.
@@ -127,7 +127,7 @@ lightboxWidth | number | 1024 | Optional. Maximum width of th
127127

128128
### Programmers Notes
129129

130-
* 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.
130+
* 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.
131131

132132
e.g.
133133
```js
@@ -144,7 +144,7 @@ myTileViewportStyleFn.call(this); // this now refers to the image to be styled
144144

145145
```
146146

147-
* 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.
147+
* 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.
148148

149149

150150
### License

0 commit comments

Comments
 (0)