mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-15 01:09:53 -04: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: function _changed(flags) {
|
||||||
_changed.base.call(this, 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)) {
|
if (flags & (/*#=*/ ChangeFlag.HIERARCHY | /*#=*/ ChangeFlag.CLIPPING)) {
|
||||||
// Clear cached clip item whenever hierarchy changes
|
// Clear cached clip item whenever hierarchy changes
|
||||||
this._clipItem = undefined;
|
this._clipItem = undefined;
|
||||||
|
|
|
@ -2774,8 +2774,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
|
|
||||||
_applyMatrix: function(matrix, applyMatrix) {
|
_applyMatrix: function(matrix, applyMatrix) {
|
||||||
var children = this._children;
|
var children = this._children;
|
||||||
|
if (children) {
|
||||||
if (children && children.length > 0) {
|
|
||||||
for (var i = 0, l = children.length; i < l; i++)
|
for (var i = 0, l = children.length; i < l; i++)
|
||||||
children[i].transform(matrix, applyMatrix);
|
children[i].transform(matrix, applyMatrix);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue