Apply "pending" matrix in group when it receives content.

This commit is contained in:
Jürg Lehni 2013-05-27 23:13:20 -07:00
parent 9b0d32651f
commit fd3f698fe9

View file

@ -98,6 +98,10 @@ var Group = Item.extend(/** @lends Group# */{
_changed: function _changed(flags) {
_changed.base.call(this, flags);
if (flags & /*#=*/ ChangeFlag.HIERARCHY && !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
delete this._clipItem;