mirror of
https://github.com/konvajs/konva.git
synced 2025-09-22 20:14:01 +08:00
forgot to move the image object to the attrs for Kinetic.Image and Kinetic.Sprite
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user