thanhlong203 / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.fx.CssSpriteAnimation has wrong behavior when sprite coordinates isn't dividable by element size. #240

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
On example below you can see this bug.  

var m = new goog.fx.CssSpriteAnimation(
            el,
            new goog.math.Size(13,8),
            new goog.math.Box(28,13,108,0),
            1000);
m.play(true);

Possible fix of this bug in attachment.

Original issue reported on code.google.com by Savluk.B...@gmail.com on 7 Dec 2010 at 10:15

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by nn...@google.com on 27 Apr 2012 at 10:09

GoogleCodeExporter commented 8 years ago
cannot take patch without CLA.  Please see wiki page on contributors.

Original comment by nn...@google.com on 15 May 2012 at 10:55

GoogleCodeExporter commented 8 years ago
So, I have done:
- signed CLA(as Bogdan Savluk, by link on contributors page).
- updated patch for recent repository revision
- modified unit test to cover case I have reported
- added my name into AUTHORS file(as required, at contributors page).

Little more about bug and fix:
Bug occurs when sprite coordinates is not dividable by sprite size. So to fix 
this we need find nearest sprite from sprite begining (but not from [0,0] point 
as in code before patch)

About, code review: I think it is almost not needed for this patch - it is too 
trivial. Or anyway, there is need for code review, through Rietveld tool?

Original comment by Savluk.B...@gmail.com on 9 Jan 2013 at 2:08

Attachments: