Skip to content

Commit

Permalink
style(esl-event-listener): simplify wheel.target.ts implementation
Browse files Browse the repository at this point in the history
Co-authored-by: Dmytro Shovchko <[email protected]>
  • Loading branch information
ala-n and dshovchko authored Jan 29, 2024
1 parent 66ebfe0 commit ed82c0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/esl-event-listener/core/targets/wheel.target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export class ESLWheelTarget extends SyntheticEventTarget {
/** Handles wheel events */
@bind
protected _onWheel(event: WheelEvent): void {
if (this.config.skipOnScroll) this.scrollData = this.scrollData.concat(getParentScrollOffsets(event.target as Element, this.target));
if (this.config.skipOnScroll) {
const offsets = getParentScrollOffsets(event.target as Element, this.target);
this.scrollData = this.scrollData.concat(offsets);
}
this.aggregateWheel(event);
}

Expand Down

0 comments on commit ed82c0c

Please sign in to comment.