Skip to content

Commit

Permalink
v0.2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Oct 25, 2022
2 parents 639250b + dbeedaa commit 94b55a9
Show file tree
Hide file tree
Showing 14 changed files with 941 additions and 5,574 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,9 @@ body {
}
```

#### Stop wheel event propagation on elements with overflow ([see this issue](https://github.com/studio-freight/lenis/issues/14))

#### Use `data-lenis-prevent` attribute on nested scroll elements. In addition, we advice you to add `overscroll-behavior: contain` on this element.
```html
<div onwheel="event.stopPropagation()">scroll content</div>
<div data-lenis-prevent>scroll content</div>
```

#### Manually use `lenis.scrollTo('#anchor')` on anchor link click ([see this issue](https://github.com/studio-freight/lenis/issues/19))
Expand Down Expand Up @@ -190,6 +189,7 @@ body {
- [Quentin Hocde's Portfolio](https://quentinhocde.com) by [Quentin Hocde](https://twitter.com/QuentinHocde)
- [Houses Of](https://housesof.world) by [Félix P.](https://flayks.com/) & [Shelby Kay](https://shelbykay.dev/)
- [Shelby Kay's Portfolio](https://shelbykay.dev) by [Shelby Kay](https://shelbykay.dev/)
- [Heights Agency Portfolio](https://www.heights.agency/) by [Francesco Michelini](https://www.francescomichelini.com/)

<br/>

Expand Down
4 changes: 2 additions & 2 deletions bundled/lenis.js

Large diffs are not rendered by default.

30 changes: 5 additions & 25 deletions dist/lenis.d.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
export default class Lenis {
/**
* @typedef {(t: number) => number} EasingFunction
* @typedef {'vertical' | 'horizontal'} Direction
* @typedef {'vertical' | 'horizontal' | 'both'} GestureDirection
*
* @typedef LenisOptions
* @property {number} [duration]
* @property {EasingFunction} [easing]
* @property {boolean} [smooth]
* @property {number} [mouseMultiplier]
* @property {boolean} [smoothTouch]
* @property {number} [touchMultiplier]
* @property {Direction} [direction]
* @property {GestureDirection} [gestureDirection]
* @property {boolean} [infinite]
* @property {Window | HTMLElement} [wrapper]
* @property {HTMLElement} [content]
*
* @param {LenisOptions}
*/
constructor({ duration, easing, smooth, mouseMultiplier, smoothTouch, touchMultiplier, direction, gestureDirection, infinite, wrapper, content, }?: {
duration?: number;
easing?: (t: number) => number;
Expand All @@ -27,7 +7,7 @@ export default class Lenis {
smoothTouch?: boolean;
touchMultiplier?: number;
direction?: "vertical" | "horizontal";
gestureDirection?: "vertical" | "horizontal" | "both";
gestureDirection?: "both" | "vertical" | "horizontal";
infinite?: boolean;
wrapper?: Window | HTMLElement;
content?: HTMLElement;
Expand All @@ -40,9 +20,9 @@ export default class Lenis {
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapper: Window | HTMLElement;
wrapper: HTMLElement | Window;
content: HTMLElement;
};
duration: number;
Expand All @@ -52,9 +32,9 @@ export default class Lenis {
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapperNode: Window | HTMLElement;
wrapperNode: HTMLElement | Window;
contentNode: HTMLElement;
wrapperHeight: any;
wrapperWidth: any;
Expand Down
2 changes: 1 addition & 1 deletion dist/lenis.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lenis.js.map

Large diffs are not rendered by default.

Loading

2 comments on commit 94b55a9

@vercel
Copy link

@vercel vercel bot commented on 94b55a9 Oct 25, 2022

Choose a reason for hiding this comment

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

"⚡️ Lighthouse report for the changes in this commit:

🔴 Performance: 36
🟢 Accessibility: 98
🟢 Best practices: 92
🟢 SEO: 92
🟢 PWA: 100

Lighthouse ran on https://lenis-e33y5l2w8-studio-freight.vercel.app/"

Please sign in to comment.