Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep clone transformMatrix, strokeDashArray and styles properties #2407

Merged
merged 3 commits into from
Aug 13, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update itext.class.js
  • Loading branch information
asturur committed Aug 12, 2015
commit dae413f7452fb7dff024be12e0270063f8ab6479
8 changes: 4 additions & 4 deletions src/shapes/itext.class.js
Original file line number Diff line number Diff line change
@@ -1121,16 +1121,16 @@
* @return {Object} object representation of an instance
*/
toObject: function(propertiesToInclude) {
var newStyle = { }, i, j, row;
var clonedStyles = { }, i, j, row;
for (i in this.styles) {
row = this.styles[i];
newStyle[i] = { };
clonedStyles[i] = { };
for (j in row) {
newStyle[i][j] = clone(row[j]);
clonedStyles[i][j] = clone(row[j]);
}
}
return fabric.util.object.extend(this.callSuper('toObject', propertiesToInclude), {
styles: newStyle
styles: clonedStyles
});
}
});