Skip to content

Commit

Permalink
Add drawLayers complete callback added in v20.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Feb 10, 2018
1 parent 555d2dc commit 2a9ef27
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _core_docs/drawLayers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ The `drawLayers()` method clears the canvas, and draws the canvas's layers.
```js
$('canvas').drawLayers();
```

As of v20.2.0, You can also specify a `complete` callback to run when all layers have been drawn. This can be useful if you have any image layers because jCanvas would normally wait for those images to load asynchronously before continuing to draw other layers.

```js
$('canvas').drawLayers({
complete: function () {
console.log('done!');
}
});
```

0 comments on commit 2a9ef27

Please sign in to comment.