locked
Creating element's push animation causes problems RRS feed

  • Question

  • Hello.
    I want to create push animation, so I used this standart code:
    c.listen('MSPointerDown', function (e) {                   WinJS.UI.Animation.pointerDown(e.currentTarget)
    }, false)
    
    c.listen('MSPointerUp', function (e) {                    WinJS.UI.Animation.pointerUp(e.currentTarget)
    }, false)
    But when I loose focus not over the element it stacks pressed (see 2-nd block on pic).

    I tried using MSPointerOut, but element looses focus when I'm moving mouse out even from children of this element.
    Have you got any simple solution? 

    And sorry for my english :(
    Sunday, May 27, 2012 12:28 PM

Answers

  • Check out the DOM. I know for some of the stuff I built, the animation didn't work well right on the currentTarget, but I had to get the first or second child of it and put the animation on that. Just need to find a child div where the animation takes and looks/works right...sometimes that's not the currentTarget.
    Monday, May 28, 2012 1:31 PM