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

Callback after film_roll is fully loaded #42

Open
ErikvdVen opened this issue Feb 9, 2016 · 3 comments
Open

Callback after film_roll is fully loaded #42

ErikvdVen opened this issue Feb 9, 2016 · 3 comments

Comments

@ErikvdVen
Copy link

Is there a callback which I can call after the film_roll is fully loaded? I would like to give all images the exact same, absolute position, as the active (centered) image. And after that all images (except the active one, cause I don't move that image in the first place) need to slowly move back to it's original position by using:

-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;

So it looks like a deck of cards which slowly unfolds if you know what I mean.

So is there a callback for this? Cause if I use dom_ready to determine the position of the active image, it returns a left position of -4, which is not correct.

@straydogstudio
Copy link
Owner

@ErikvdVen The logic in film_roll is pretty simple in the end. It is just going to use jQuery to measure the outer width of each element, size the immediate container to allow them all to be horizontal, and position it absolutely so the index is in the middle. At least that is what it attempts to do.

It's a nice idea to allow animation at the beginning. You may or may not have success at it. I would look at using the film_roll:resized event first. You'll probably want to use $.one so it isn't called again on page resize.

@straydogstudio
Copy link
Owner

@ErikvdVen Did you ever solve this?

@ErikvdVen
Copy link
Author

ErikvdVen commented Apr 15, 2016

@straydogstudio Nope, I didn't finish the project either so I didn't need to. Somebody else finished it ;)

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

No branches or pull requests

2 participants