Skip to content

Commit

Permalink
* Changed default ttl from 3 s to 15s and bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrebant committed May 12, 2014
1 parent 21e2e57 commit 0f83bf5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release history

## v0.2.3

- Changed default ttl from 3s to 15s.

## v0.2.2

- Safer image loading: images with a wrong or missing source get a placeholder image (when used
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ imagePreloader.start();

You can provide completely optional parameters to the start method:

- `ttl`: the maximum time you want to wait on one image before having the onerror triggered (ms). Default value is 3000ms.
- `ttl`: the maximum time you want to wait on one image before having the onerror triggered (ms). Default value is 15000ms.
- `maxParallel`: the maximum number of images you want to allow to be loaded in parallel (if you want to avoid something else to be blocked). Default value is 5.
- `placeholderImgData`: what data image you want for failed images. Default is an empty 1x1 transparent png.

Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "image-preloader",
"version": "0.2.2",
"version": "0.2.3",
"description": "An image pre-loader component",
"dependencies": {
"Wizcorp/eventemitter": "*",
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var inherit = require('util').inherits;
var EventEmitter = require('EventEmitter');

var defaultTtl = 3000;
var defaultTtl = 15000;
var defaultMaxParallel = 5;
var emptyImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=';

Expand Down

0 comments on commit 0f83bf5

Please sign in to comment.