Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 2017282

Browse files
committed
fix(readme): fix 'element' examples
1 parent 977c617 commit 2017282

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,35 +173,35 @@ The objective of this element is to unify the properties of the `window` and of
173173
### size
174174
175175
```js
176-
scrollManager.size.x
177-
scrollManager.size.y
176+
scrollManager.element.size.x
177+
scrollManager.element.size.y
178178
```
179179
180180
This is the size of the container, may it be the `window`, or the (div)element used to instantiate the scrollManager
181181
182182
### scrollSize
183183
184184
```js
185-
scrollManager.scrollSize.x
186-
scrollManager.scrollSize.y
185+
scrollManager.element.scrollSize.x
186+
scrollManager.element.scrollSize.y
187187
```
188188
189189
This is the scroll size of the container. It determines the amount of scroll that can be done
190190
191191
### scrollPosition
192192
193193
```js
194-
scrollManager.scrollPosition.x
195-
scrollManager.scrollPosition.y
194+
scrollManager.element.scrollPosition.x
195+
scrollManager.element.scrollPosition.y
196196
```
197197
198198
This is the position of the scrollBar. Its minimum value it's 0, and its maximum is the `scrollSize` - the `size`
199199
200200
### offset
201201
202202
```js
203-
scrollManager.offset.x
204-
scrollManager.offset.y
203+
scrollManager.element.offset.x
204+
scrollManager.element.offset.y
205205
```
206206
207207
This is less likely to be used. It indicates the offset of the _boundingClientRect_ of the container. So for the window as container, it will return 0 for both `x` and `y`. It's the equivalent for `getBoundingClientRect().left` and `top`

0 commit comments

Comments
 (0)