mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fixed #577
This commit is contained in:
@@ -94,6 +94,8 @@
|
||||
_getCache: function(attr, privateGetter){
|
||||
var cache = this.cache[attr];
|
||||
|
||||
|
||||
|
||||
// if not cached, we need to set it using the private getter method.
|
||||
if (cache === undefined) {
|
||||
this.cache[attr] = privateGetter.call(this);
|
||||
@@ -530,10 +532,15 @@
|
||||
* @memberof Kinetic.Node.prototype
|
||||
*/
|
||||
getAbsolutePosition: function() {
|
||||
var absoluteTransform = this.getAbsoluteTransform(),
|
||||
var absoluteMatrix = this.getAbsoluteTransform().getMatrix(),
|
||||
absoluteTransform = new Kinetic.Transform(),
|
||||
o = this.getOffset();
|
||||
|
||||
// clone the matrix array
|
||||
absoluteTransform.m = absoluteMatrix.slice();
|
||||
|
||||
absoluteTransform.translate(o.x, o.y);
|
||||
|
||||
return absoluteTransform.getTranslation();
|
||||
},
|
||||
/**
|
||||
|
Reference in New Issue
Block a user