You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really nice if you could bind the page scroll even to a mousewheel click. Currently you have to click an element to move to the anchor, such as this:
thanks for your suggestion, but I assume that use case is quite specific and adding it to the the "core" ng2-page-scroll just increases the libraries complexity with a few people using it.
Anyhow, this could easily be implemented by binding to the window scroll event and triggering the scroll animation using the PageScrollService. Therefore it's just another trigger for executing a scroll animation.
@Component({
// Your component stuff here
})
export class MyComponent {
constructor(@Inject(DOCUMENT) private document: Document, private pageScrollService: PageScrollService) { }
@HostListener("window:scroll", ['$event'])
onWindowScroll(event) {
// Read data from the scroll event and create a pageScrollInstance
let pageScrollInstance: PageScrollInstance = null; // TODO
this.pageScrollService.start(pageScrollInstance);
}
}
It would be really nice if you could bind the page scroll even to a mousewheel click. Currently you have to click an element to move to the anchor, such as this:
It would be really nice if you could do something like
(mousewheeldown)="hover_trigger"
so that a scroll down on the mouse would take you to the specified anchor, equivalently mousewheelup could specify a separate anchor.
The text was updated successfully, but these errors were encountered: