Skip to content

Commit 2b9b87b

Browse files
author
unknown
committed
1.1.0
1 parent 5bf5d00 commit 2b9b87b

16 files changed

+555
-280
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ over that number of pixels.
225225

226226
**Default**: `null`
227227

228+
### `scrollingThreshold {Number}`
229+
230+
This sets threashold for `ps--scrolling-x` and `ps--scrolling-y` classes to
231+
remain. In the default CSS, they make scrollbars shown regardless of hover
232+
state. The unit is millisecond.
233+
234+
**Default**: `1000`
235+
228236
### `useBothWheelAxes {Boolean}`
229237

230238
When set to true, and only one (vertical or horizontal) scrollbar is visible
@@ -266,6 +274,10 @@ that Y axis scroll bar is not enabled just because of a few pixels.
266274

267275
perfect-scrollbar dispatches custom events.
268276

277+
```js
278+
container.addEventListener('ps-scroll-x', () => ...);
279+
```
280+
269281
### `ps-scroll-y`
270282

271283
This event fires when the y-axis is scrolled in either direction.
@@ -307,8 +319,13 @@ This event fires when scrolling reaches the start of the x-axis.
307319

308320
This event fires when scrolling reaches the end of the x-axis.
309321

322+
You can also watch the reach state via the `reach` property.
323+
310324
```js
311-
container.addEventListener('ps-scroll-x', () => ...);
325+
const ps = new PerfectScrollbar(...);
326+
327+
console.log(ps.reach.x); // => 'start' or 'end' or null
328+
console.log(ps.reach.y); // => 'start' or 'end' or null
312329
```
313330

314331
## Helpdesk

0 commit comments

Comments
 (0)