From fbd3f174b5d115b7c1cab6912945b7915ce07a4d Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 14 Jul 2015 12:23:23 +0200 Subject: [PATCH] Update pattern.class.js --- src/pattern.class.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pattern.class.js b/src/pattern.class.js index 01766488087..737061e6b42 100644 --- a/src/pattern.class.js +++ b/src/pattern.class.js @@ -85,6 +85,10 @@ fabric.Pattern = fabric.util.createClass(/** @lends fabric.Pattern.prototype */ else if (typeof this.source.src === 'string') { source = this.source.src; } + // element + else if (typeof this.source === 'object' && this.source.toDataURL) { + source = this.source.toDataURL(); + } return { source: source,