Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$$animateReflow doesn't force repaint in minified version of 1.3.15 #11548

Closed
bennadel opened this issue Apr 11, 2015 · 3 comments
Closed

$$animateReflow doesn't force repaint in minified version of 1.3.15 #11548

bennadel opened this issue Apr 11, 2015 · 3 comments

Comments

@bennadel
Copy link

I had an animation that was working fine with the non-minified version. But, when I switched over to using the angular-animate-1.3.15.min.js file, the animation stopped working. When I compared the two pages in Chrome Timeline, I noticed that the minified one was lacking the forced repaint.

I dig into the minifed version and it looks like the $$animateReflow() is missing the body.offsetWidth line:

.factory(
    "$$animateReflow",
    ["$$rAF","$document",function(f,C){
        return function(g){
            return f(function(){
                g();
            })
        }}
    ]
)

... if I manually patch it with:

.factory(
    "$$animateReflow",
    ["$$rAF","$document",function(f,C){
        return function(g){
            return f(function(){
                var a = C[0].body.offsetWidth + 1;
                g();
            })
        }}
    ]
)

... the animation starts to work properly. I don't know enough about build systems, or I would try to submit a pull request. But, alas, I am just an unfrozen caveman developer, frozen in ice and then thawed out by your scientists.

At the bottom of this blog post, I make a video of the problematic behavior, which was demonstratable in both Firefox and Chrome.

http://www.bennadel.com/blog/2814-animate-before-animate-after-animate-close-and-the-nganimate-enter-workflow-in-angularjs.htm

@pkozlowski-opensource
Copy link
Member

@bennadel could you please try with v1.4.0-rc.0? I think it was fixed by c55a494

@matsko
Copy link
Contributor

matsko commented Apr 11, 2015

This was also fixed with #11469, but 1.3 hasn't had a new release yet. So please either use a self-built version of 1.3 off of the 1.3 branch or use the 1.4 RC0 that came out yesterday.

@matsko matsko closed this as completed Apr 11, 2015
@bennadel
Copy link
Author

@pkozlowski-opensource @matsko awesome stuff! I tried to search the issue tracker for $$animateReflow, but didn't see any relevant references (otherwise, I wouldn't have wasted your time). Glad you guys got this fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants