cleaned up undefined, null, 0, and '' comparison operators. To unset a attribute, you can now set it to null, 0, or ''. Setting an attribute to undefined will have no effect

This commit is contained in:
Eric Rowell
2012-06-22 13:15:29 -07:00
parent 40a92a9988
commit 422791a99a
9 changed files with 56 additions and 58 deletions

View File

@@ -14,7 +14,7 @@ Kinetic.Sprite = function(config) {
});
config.drawFunc = function() {
if(this.attrs.image !== undefined) {
if(!!this.attrs.image) {
var context = this.getContext();
var anim = this.attrs.animation;
var index = this.attrs.index;