Skip to content

Commit

Permalink
Update pattern.class.js
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Jul 14, 2015
1 parent 38b96f1 commit fbd3f17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pattern.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ fabric.Pattern = fabric.util.createClass(/** @lends fabric.Pattern.prototype */
else if (typeof this.source.src === 'string') {
source = this.source.src;
}
// <canvas> element
else if (typeof this.source === 'object' && this.source.toDataURL) {
source = this.source.toDataURL();
}

return {
source: source,
Expand Down

0 comments on commit fbd3f17

Please sign in to comment.