Skip to content

Commit

Permalink
feat(sifrr-showcase): throttle state function for 500ms
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed May 13, 2019
1 parent 7619c75 commit 9c7d415
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion dist/sifrr.elements.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/sifrr.elements.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sifrr.elements.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/sifrr.elements.module.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/sifrr.elements.module.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion elements/sifrr-showcase/dist/sifrrshowcase.js

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

2 changes: 1 addition & 1 deletion elements/sifrr-showcase/dist/sifrrshowcase.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion elements/sifrr-showcase/dist/sifrrshowcase.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion elements/sifrr-showcase/dist/sifrrshowcase.module.js

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

2 changes: 1 addition & 1 deletion elements/sifrr-showcase/dist/sifrrshowcase.module.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion elements/sifrr-showcase/src/singleshowcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class SifrrSingleShowcase extends SifrrDom.Element {
}

onUpdate() {
window.requestAnimationFrame(this.runStateFunction.bind(this));
if (this._stateFxnTimeout) clearTimeout(this._stateFxnTimeout);
this._stateFxnTimeout = setTimeout(this.runStateFunction.bind(this), 500);
}

runStateFunction() {
Expand Down

0 comments on commit 9c7d415

Please sign in to comment.