mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 07:25:56 +08:00
Merge pull request #417 from VladimirTechMan/master
Small improvement to _getAbsoluteTransform() when transformEnabled is not set to 'all'
This commit is contained in:
commit
ce67735202
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user