-
-
Notifications
You must be signed in to change notification settings - Fork 98
Pointer Events
The pointer-events here means the method this library use to detect the dragging of the scrollbar and the hover effect on the scrollbar
There are 2 methods to detect pointer events
<ng-scrollbar pointerEventsMethod="viewport">
-
pointerEventsMethod="viewport"
, will detect pointer events using viewport'smousemove
,mousedown
andmouseleave
events. -
pointerEventsMethod="scrollbar"
, will detect pointer events using scrollbarmousedown
,mouseenter
andmouseleave
event.
Appearance ↓ | viewport | scrollbar |
---|---|---|
Standard |
|
|
Compact |
|
|
My recommendation: If scrolling over scrollbar isn't a big deal, then go with
pointerEventsMethod="scrollbar"
.
Theoretically scrollbar
method is more performant because viewport
method checks if the pointer is over the scrollbars while the pointer is moving over the viewport.
But most of the time, there won't be any difference in performance unless you have a complex design. try both and see what best fits your app.
The pointer-events are disabled on mobile browsers by design. because there is no pointer 😄
Become a sponsor and get your logo on our README on GitHub and the front page of https://ngx-scrollbar.netlify.com/.
Become a backer and get your logo on our README on GitHub.
Latest version (v15)
Addons:
Older version (v13)
- Demo for v13
- Usage
- Styling
- Global Options
- Pointer Events
- Scroll Event
- Updated Event
- Smooth Scroll Functions
- Performance tweak
- Integration
- Reached events