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

feat(tooltip): reposition on scroll #2703

Merged
merged 10 commits into from
Feb 9, 2017

Conversation

andrewseguin
Copy link
Contributor

Reposition uses a throttled scroll event from the scroll dispatcher. If the reposition causes the tooltip to be clipped by a scrollable container, then hide the tooltip.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 17, 2017
@andrewseguin
Copy link
Contributor Author

Looking into why IE/FF is having issues...



/** Time in ms to throttle the scrolling events by default. */
export const DEFAULT_AUDIT_TIME = 20;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about DEFAULT_SCROLL_THROTTLE?

ngOnInit() {
// When a scroll on the page occurs, update the position in case this tooltip needs
// to be repositioned.
this._scrollDispatcher.scrolled(SCROLL_THROTTLE_MS).subscribe(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to unsubscribe on ngOnDestroy

@andrewseguin andrewseguin force-pushed the throttled-scroll branch 2 times, most recently from 21c776d to f8d8f20 Compare February 1, 2017 22:11
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Feb 1, 2017
@kara kara removed the action: merge The PR is ready for merge by the caretaker label Feb 3, 2017
@kara kara assigned andrewseguin and unassigned jelbourn and mmalerba Feb 3, 2017
@andrewseguin andrewseguin added action: merge The PR is ready for merge by the caretaker and removed action: merge The PR is ready for merge by the caretaker labels Feb 8, 2017
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Feb 8, 2017
@tinayuangao tinayuangao merged commit bc52298 into angular:master Feb 9, 2017
@andrewseguin andrewseguin deleted the throttled-scroll branch February 10, 2017 00:10
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants