tags:

views:

17

answers:

0

Hello, everyone.

I'm trying to write a web page having rotate image animation by javascript. But it will delay when I drag image, I don't know how to fix it.

Can someone help? Thanks very much. This is my code:

grabBeginning: function(event) {
    this.moveBindThis = this.grabMoving.bind(this);
    this.viewer.observe("mousemove", this.moveBindThis);
    this.grabBeginLocation = Event.pointerX(event);
},

grabMoving: function(event) {
    this.overBindThis = this.grabOver.bind(this);
    $(document).observe("mouseup", this.overBindThis);
    this.imgLocation++;
    this.imgSource = "image/" + this.imgLocation + ".jpg";
    this.img.src = this.imgSource;
},