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

How to trigger activities when elements become first visible? #82

Open
mkroetzsch opened this issue Jun 14, 2016 · 0 comments
Open

How to trigger activities when elements become first visible? #82

mkroetzsch opened this issue Jun 14, 2016 · 0 comments
Labels
question Further information is requested

Comments

@mkroetzsch
Copy link
Member

It would be good if SQID would defer API calls and queries that are not necessary to create the initial display until they are really needed. For example, one could fetch references of each incoming statement when the user first opens the statements to see them. There are many other things that one could do when a statement is opened, but which should not be done for all statements upfront.

What is the best way to trigger actions that have to happen when a div first becomes visible? Is there a simple JavaScript/angular solution for getting this event? If would of course be possible to trigger this when we change the visibility of a div, but then the parent div needs to know which child elements would like to do something when becoming visible, creating a lot of overhead. It would be nicer if parts of the page could define such behaviour locally, i.e., if they could add (angular) HTML that makes sure a function gets called on first display.

@mkroetzsch mkroetzsch added the question Further information is requested label Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant