From 84bd8bbda067425bf5ee13b6c755f332e8527939 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 21 Mar 2015 12:17:34 +0100 Subject: [PATCH] Update itext.class.js --- src/shapes/itext.class.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shapes/itext.class.js b/src/shapes/itext.class.js index b3f3fbeb..7f130fd8 100644 --- a/src/shapes/itext.class.js +++ b/src/shapes/itext.class.js @@ -284,6 +284,8 @@ this._extendStyles(i, styles); } } + /* not included in _extendStyles to avoid clearing cache more than once */ + this._clearCache(); return this; }, @@ -299,7 +301,6 @@ if (!this.styles[loc.lineIndex][loc.charIndex]) { this.styles[loc.lineIndex][loc.charIndex] = { }; } - fabric.util.object.extend(this.styles[loc.lineIndex][loc.charIndex], styles); },