Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Paths under a Shape don't invalidate #26

Closed
umberto-sonnino opened this issue Jan 4, 2019 · 3 comments
Closed

Multiple Paths under a Shape don't invalidate #26

umberto-sonnino opened this issue Jan 4, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@umberto-sonnino
Copy link
Contributor

If multiple Paths are nested under a single Shape have different keyframed values for each Path, the Shape won't invalidate any of the underlying Paths, and thus won't update.

A simple fix for this would be to add in ActorNode.update():

if ((dirt & TransformDirty) == TransformDirty) {
    updateTransform();
    if(this.parent != null && this.parent is FlutterActorShape)
    {
        this.parent.invalidateShape();
    }
}
@umberto-sonnino umberto-sonnino added the bug Something isn't working label Jan 4, 2019
@umberto-sonnino
Copy link
Contributor Author

Here's a zip file containing two files:
-translation.flr is the general case
-translation1.flr is the bug

test_files.zip

@luigi-rosso
Copy link
Contributor

The best way to handle this is by invalidating the shape when a sub-path has its transform marked dirty (as opposed to when the transform updates). This avoids generating two update cycles and avoids doing a conditional when every ActorNode updates.

I made this change for both the user drawn paths and the procedural ones.

@umberto-sonnino
Copy link
Contributor Author

Alright, great, this looks fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants