mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Do not preserve matrix transformations in empty groups when applied to inexisting content.
This commit is contained in:
parent
5a131930fb
commit
a3114e5c28
2 changed files with 1 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue