removed instances of hit graph enable caching. Too complex and error prone at the moment

This commit is contained in:
Eric Rowell
2013-12-09 22:15:26 -08:00
parent ce9ddb92e2
commit 0bad22955a
5 changed files with 5 additions and 39 deletions

View File

@@ -310,24 +310,6 @@
return this;
}
/*
_isListeningEnabled: function() {
var ret;
if (this._listeningEnabled) {
return true;
}
else {
ret = false;
this.children.each(function(child) {
if (child.isListeningEnabled()) {
ret = true;
}
});
return ret;
}
}
*/
});
Kinetic.Util.extend(Kinetic.Container, Kinetic.Node);

View File

@@ -48,7 +48,6 @@ var Kinetic = {};
traceArrMax: 100,
dblClickWindow: 400,
pixelRatio: undefined,
enableHitGraph: true,
// user agent
UA: (function() {

View File

@@ -43,7 +43,6 @@
this.attrs = {};
this.cache = {};
this.setAttrs(config);
//this._listeningEnabled = false;
// event bindings for cache handling
this.on(TRANSFORM_CHANGE_STR, function() {
@@ -418,13 +417,8 @@
* @memberof Kinetic.Node.prototype
* @returns {Boolean}
*/
/*
isListeningEnabled: function() {
return this._getCache(LISTENING_ENABLED, this._isListeningEnabled);
},
*/
shouldDrawHit: function() {
return Kinetic.enableHitGraph && /*this.isListeningEnabled() &&*/ this.isListening() && this.isVisible() && !Kinetic.isDragging();
return this.isListening() && this.isVisible() && !Kinetic.isDragging();
},
/**
* determine if node is visible or not. Node is visible only

View File

@@ -296,11 +296,6 @@
this.setDrawHitFunc(this.drawHitFunc);
}
}
/*
_isListeningEnabled: function() {
return this._listeningEnabled;
},
*/
});
Kinetic.Util.extend(Kinetic.Shape, Kinetic.Node);