Skip to content

Commit

Permalink
feat (ScrollObserver) : add synchronise method
Browse files Browse the repository at this point in the history
  • Loading branch information
n-langle committed Dec 12, 2023
1 parent 0264966 commit bf4a5d8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
9 changes: 7 additions & 2 deletions build/OneLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2022 OneLoop.js
* Author: Nicolas Langle
* Repository: https://github.com/n-langle/OneLoop.js
* Version: 5.0.4
* Version: 5.1.0
* SPDX-License-Identifier: MIT
*
* Credit for easing functions goes to : https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
Expand Down Expand Up @@ -746,7 +746,7 @@ class ScrollObserver extends MainLoopEntry {
this._needsUpdate = false;

// no need to control the index
// the flag needsUpdate do the job
// the flag needsUpdate does the job
instances$1.splice(instances$1.indexOf(this), 1);

if (instances$1.length === 0) {
Expand Down Expand Up @@ -845,6 +845,11 @@ class ScrollObserver extends MainLoopEntry {
return this
}

synchronise() {
this._lastScroll = getWindowScroll();
return this
}

// ----
// statics
// ----
Expand Down
Loading

0 comments on commit bf4a5d8

Please sign in to comment.