diff --git a/projects/angular-sticky-things/src/lib/sticky-thing.directive.ts b/projects/angular-sticky-things/src/lib/sticky-thing.directive.ts index 685fedb..f5f53cf 100644 --- a/projects/angular-sticky-things/src/lib/sticky-thing.directive.ts +++ b/projects/angular-sticky-things/src/lib/sticky-thing.directive.ts @@ -227,7 +227,7 @@ export class StickyThingDirective implements OnInit, AfterViewInit, OnDestroy { return el.getBoundingClientRect(); } - private determineStatus(originalVals: StickyPositions, pageYOffset: number, marginTop: number, marginBottom: number, enabled: boolean) { + private determineStatus(originalVals: StickyPositions, pageYOffset: number, marginTop: number, marginBottom: number, enabled: boolean): StickyStatus { const elementPos = this.determineElementOffsets(); let isSticky = enabled && pageYOffset > originalVals.offsetY; if (pageYOffset < this.elementOffsetY) { @@ -241,6 +241,8 @@ export class StickyThingDirective implements OnInit, AfterViewInit, OnDestroy { isSticky, reachedUpperEdge, reachedLowerEdge, + marginTop, + marginBottom, }; }