forgot to move the image object to the attrs for Kinetic.Image and Kinetic.Sprite

This commit is contained in:
Eric Rowell
2012-05-20 21:41:05 -07:00
parent 61d325d383
commit 5526d2847e
4 changed files with 20 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ Kinetic.Sprite = function(config) {
});
config.drawFunc = function() {
if(this.image !== undefined) {
if(this.attrs.image !== undefined) {
var context = this.getContext();
var anim = this.attrs.animation;
var index = this.attrs.index;
@@ -23,7 +23,7 @@ Kinetic.Sprite = function(config) {
context.beginPath();
context.rect(0, 0, f.width, f.height);
context.closePath();
context.drawImage(this.image, f.x, f.y, f.width, f.height, 0, 0, f.width, f.height);
context.drawImage(this.attrs.image, f.x, f.y, f.width, f.height, 0, 0, f.width, f.height);
}
};
// call super constructor