Hybrid View
-
14 Mar 2012 5:53 PM #1
4.07/4.1x Bug in rotate animation of a sprite
4.07/4.1x Bug in rotate animation of a sprite
In creating a visualization I've seen what I believe is a bug in the rotate animation of a sprite. It affects all 4.x version up to and including the nightly build from 2012-03-08.Take a look at this example to see what I'm doing. It'll make the explanation easier to comprehend.http://s3downloads.lyquidity.com/ExtJS/drawbug.htmlThe requirement is to rotate circle segments. Not around their center, which is the default, but the center of the circle of which they form a segment. I've been delighted that it's been possible to do this stuff using the sprites. In testing I was able to set each segment into place using setAttributes()
And I was delighted to find that the rotation of sprites can be animated and replaced the code above with:Code:sprite.setAttributes({ rotate: { degrees: degrees, x: 100, y: 100 }}, true);The bugHowever when I tried this code I found the animation routine ignores the x/y offset coordinates and regardless of the offsets, it rotates the sprite about its center. It's necessary to call setAttributes() to set the offsets in the sprite's attributes as the offsets used in the animation definition are ignored.This is not a massive problem because there's a workaround but it is not intuitive (to me at least) that properties set on the animation object will be ignored.BrowsersI have found the example included on the end of the link works with IE 7/8/9 and with Chrome and Firefox. However the rendering in IE 7/8 is not as good because the segment positions are not always as good as in IE 9, Chrome or Firefox. See screenshot.drawbug-ie7.pngCode:sprite.animate({ to: { rotate: { degrees: start, x: 100, y: 100 } },});
-
15 Mar 2012 6:42 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Thanks for the report.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
You found a bug! We've classified it as
EXTJSIV-5621
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote