-
Notifications
You must be signed in to change notification settings - Fork 18
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
Image floating from left #5
Comments
Also I don't want to see to disappear, when I'm scrolling up again. Is that possible? |
Hi @levipadre , Try scroll-watch="{from: 1000, to: -1}" sw-style="{left: 100 * (1-$progress) + '%'}" |
Hi, Thank you, it's working. |
And do you know that possible to stop the reverse watching? I don't want to move back my element.
Just when I scroll up, I need to keep the class Also when I refresh the page, and I'm already there (80%), I need to scroll up and down again to get the class. |
Hi @levipadre , I think you'll have to setup a It's kind of similar to #4. scroll-watch="{from: 1000, to: -1}"
sw-style="{left: animateLeft($progress) + '%'}"
sw-broadcast="{
'hiiiiiit': '$negative > -2'
}" And you can setup an scope method for your $scope.animateLeft = function (progress) {
if ($scope.animated) {
return 100;
}
return 100 * (1 - progress);
};
$scope.$on('hiiiiiit', function ($event, active) {
if (active) {
$scope.animated = true;
}
}); It feels like a workaround though, one way to make this easier may be introducing some new directive like |
Hi,
I just stared to use this directive. It seems really good, just I can't figure it out, how can I float one of my images.
Basically, when the user is scrolling, the image starts the float from out of the screen on the left side, and finally arrives the original point.
I tried with this:
but the direction is wrong, and now is going to right from the starting point.
Do you know where is the problem?
The text was updated successfully, but these errors were encountered: