From d645c4e7dca09bcfcc170de1790fb446cd1e71c8 Mon Sep 17 00:00:00 2001 From: kangax Date: Mon, 4 Feb 2013 17:30:36 +0100 Subject: [PATCH] Add ability to specify pattern repeat via options --- dist/all.js | 3 +++ src/pattern.class.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/all.js b/dist/all.js index 770d7b0a..1fd6d4f7 100644 --- a/dist/all.js +++ b/dist/all.js @@ -4646,6 +4646,9 @@ fabric.Pattern = fabric.util.createClass(/** @scope fabric.Pattern.prototype */ ? new Function(options.source) : options.source; } + if (options.repeat) { + this.repeat = options.repeat; + } }, /** diff --git a/src/pattern.class.js b/src/pattern.class.js index 92278e1b..2555de16 100644 --- a/src/pattern.class.js +++ b/src/pattern.class.js @@ -21,6 +21,9 @@ fabric.Pattern = fabric.util.createClass(/** @scope fabric.Pattern.prototype */ ? new Function(options.source) : options.source; } + if (options.repeat) { + this.repeat = options.repeat; + } }, /**