Hybrid View

    You found a bug! We've classified it as EXTJS-5621 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    257
    Vote Rating
    8
    bseddon will become famous soon enough

      0  

    Default 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()
    Code:
    sprite.setAttributes({    rotate:    {        degrees: degrees,        x: 100,        y: 100    }}, true);
    And I was delighted to find that the rotation of sprites can be animated and replaced the code above with:
    Code:
    sprite.animate({    to: { rotate: { degrees: start, x: 100, y: 100 } },});
    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.png

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,633
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1