Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Mar 24, 2022
1 parent 5bf5d00 commit 2b9b87b
Show file tree
Hide file tree
Showing 16 changed files with 555 additions and 280 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ over that number of pixels.

**Default**: `null`

### `scrollingThreshold {Number}`

This sets threashold for `ps--scrolling-x` and `ps--scrolling-y` classes to
remain. In the default CSS, they make scrollbars shown regardless of hover
state. The unit is millisecond.

**Default**: `1000`

### `useBothWheelAxes {Boolean}`

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

perfect-scrollbar dispatches custom events.

```js
container.addEventListener('ps-scroll-x', () => ...);
```

### `ps-scroll-y`

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

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

You can also watch the reach state via the `reach` property.

```js
container.addEventListener('ps-scroll-x', () => ...);
const ps = new PerfectScrollbar(...);

console.log(ps.reach.x); // => 'start' or 'end' or null
console.log(ps.reach.y); // => 'start' or 'end' or null
```

## Helpdesk
Expand Down
Loading

0 comments on commit 2b9b87b

Please sign in to comment.