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

Add some API #10

Open
paveleremin opened this issue Jun 4, 2014 · 5 comments
Open

Add some API #10

paveleremin opened this issue Jun 4, 2014 · 5 comments

Comments

@paveleremin
Copy link

Is it possible do something like this:
$document.find('.ngsb-wrap').scrollTop(10);
?

@asafdav
Copy link
Owner

asafdav commented Jun 4, 2014

Can you please elaborate ?
What are you trying to achieve ?

On Wed, Jun 4, 2014 at 4:33 PM, Pavel Eremin [email protected]
wrote:

Is it possible do something like this:
$document.find('.ngsb-wrap').scrollTop(10);
?


Reply to this email directly or view it on GitHub
#10.

@paveleremin
Copy link
Author

@asafdav I try set scroll position after page loaded. Is it possible?

@paveleremin
Copy link
Author

simpe example: add something like this into directive:

scope.scrollTo = function(intTop) {
page.top = -Math.round(intTop);
dragger.top = -Math.round(page.top / page.scrollHeight * page.height);
buildScrollbar();
};

cause you used the private variables inside :(

@asafdav
Copy link
Owner

asafdav commented Jun 10, 2014

Hi Pavel, It looks like a great idea,
Do you want to add it and pull request or shall I do it ?

@paveleremin
Copy link
Author

@asafdav I think my solution very simple. Maybe you can implement some real api. Refactoring variables and so on.
Would like to use it:
$document.find('.scroll-block-with-dirrective').scrollTo(123);
instead my solution:
$document.find('.scroll-block-with-dirrective').scope().scrollTo(123);
for example, seems this logic use angular-strap

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