Do not preserve matrix transformations in empty groups when applied to inexisting content.

This commit is contained in:
Jürg Lehni 2014-03-01 22:48:44 +01:00
parent 5a131930fb
commit a3114e5c28
2 changed files with 1 additions and 7 deletions

View file

@ -99,11 +99,6 @@ var Group = Item.extend(/** @lends Group# */{
_changed: function _changed(flags) {
_changed.base.call(this, flags);
if (flags & /*#=*/ ChangeFlag.HIERARCHY && this._transformContent
&& !this._matrix.isIdentity()) {
// Apply matrix now that we have content.
this.applyMatrix();
}
if (flags & (/*#=*/ ChangeFlag.HIERARCHY | /*#=*/ ChangeFlag.CLIPPING)) {
// Clear cached clip item whenever hierarchy changes
this._clipItem = undefined;

View file

@ -2774,8 +2774,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
_applyMatrix: function(matrix, applyMatrix) {
var children = this._children;
if (children && children.length > 0) {
if (children) {
for (var i = 0, l = children.length; i < l; i++)
children[i].transform(matrix, applyMatrix);
return true;