Skip to content

Commit

Permalink
Merge pull request #278 from DockYard/pass-intersection-observer-entr…
Browse files Browse the repository at this point in the history
…y-down-the-line

Pass the intersectionObserverEntry to callbacks of {{in-vieport}} modifier
  • Loading branch information
cibernox authored Oct 14, 2021
2 parents e052a89 + f72cb2c commit af616a9
Show file tree
Hide file tree
Showing 5 changed files with 33,960 additions and 10,163 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
try-scenario: [
ember-lts-3.16,
ember-lts-3.20,
ember-beta,
ember-default-with-jquery,
ember-classic
# ember-beta,
# ember-default-with-jquery,
# ember-classic
]
steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions addon/modifiers/in-viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export default class InViewportModifier extends Modifier {
}

@action
onEnter() {
onEnter(...args) {
if (this.args.named.onEnter) {
this.args.named.onEnter.call(null, this.element);
this.args.named.onEnter.call(null, this.element, ...args);
}

if (!this.options.viewportSpy) {
Expand All @@ -48,9 +48,9 @@ export default class InViewportModifier extends Modifier {
}

@action
onExit() {
onExit(...args) {
if (this.args.named.onExit) {
this.args.named.onExit.call(null, this.element);
this.args.named.onExit.call(null, this.element, ...args);
}
}

Expand Down
Loading

0 comments on commit af616a9

Please sign in to comment.