Merge pull request #417 from VladimirTechMan/master

Small improvement to _getAbsoluteTransform() when transformEnabled is not set to 'all'
This commit is contained in:
Anton Lavrenov 2018-07-20 11:09:08 +07:00 committed by GitHub
commit ce67735202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1428,16 +1428,14 @@
},
_getAbsoluteTransform: function(top) {
var at = new Konva.Transform(),
transformsEnabled,
trans;
transformsEnabled;
// start with stage and traverse downwards to self
this._eachAncestorReverse(function(node) {
transformsEnabled = node.transformsEnabled();
trans = node.getTransform();
if (transformsEnabled === 'all') {
at.multiply(trans);
at.multiply(node.getTransform());
} else if (transformsEnabled === 'position') {
at.translate(node.x(), node.y());
}