Skip to content

Commit

Permalink
Added function to revert an initialized instance back to its starting…
Browse files Browse the repository at this point in the history
… point
  • Loading branch information
meltingice committed Jan 17, 2012
1 parent a1d708b commit 31e6368
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions dist/caman.full.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/caman.full.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/caman.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/caman.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/core/filter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class Filter
@context.putImageData @imageData, 0, 0
callback.call @

# Reverts an image back to it's original state by re-initializing Caman
revert: (ready) ->
@loadCanvas @options.image, @options.canvas, ready

# Pushes the filter callback that modifies the RGBA object into the
# render queue
process: (name, processFn) ->
Expand Down

0 comments on commit 31e6368

Please sign in to comment.