Skip to content

Commit

Permalink
fix(plugins): public variables
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBGod committed Jan 5, 2017
1 parent 46b7e00 commit 1d7f6a0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
14 changes: 7 additions & 7 deletions src/plugin/affix.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ export interface ScrollSpyAffixOptions {
}
})
export class ScrollSpyAffixDirective implements AfterViewInit, OnDestroy {
@Input('scrollSpyAffix') options: ScrollSpyAffixOptions;
@Input('scrollSpyAffix') public options: ScrollSpyAffixOptions;

public elementTop: number;
public elementBottom: number;
public affix: boolean = false;
public affixTop: boolean = false;
public affixBottom: boolean = false;

private defaultOptions: ScrollSpyAffixOptions = {
topMargin: 0,
bottomMargin: 0
Expand All @@ -37,12 +43,6 @@ export class ScrollSpyAffixDirective implements AfterViewInit, OnDestroy {
private el: HTMLElement;
private parentEl: any;

private elementTop: number;
private elementBottom: number;
private affix: boolean = false;
private affixTop: boolean = false;
private affixBottom: boolean = false;

constructor(
private ref: ChangeDetectorRef,
private elRef: ElementRef,
Expand Down
16 changes: 8 additions & 8 deletions src/plugin/index.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ export interface ScrollSpyIndexComponentOptions {
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ScrollSpyIndexRenderComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() scrollSpyIndexRenderOptions: ScrollSpyIndexComponentOptions;
@Input() public scrollSpyIndexRenderOptions: ScrollSpyIndexComponentOptions;

public stack: Array<any> = [];
public parentStack: Array<any> = [];
public lastItem: any;

public currentScrollPosition: number;
public itemsToHighlight: Array<string> = [];

@ViewChild('container', { read: ViewContainerRef })
private viewContainerRef: ViewContainerRef;

Expand All @@ -47,13 +54,6 @@ export class ScrollSpyIndexRenderComponent implements OnInit, AfterViewInit, OnD

private el: HTMLElement;

private stack: Array<any> = [];
private parentStack: Array<any> = [];
private lastItem: any;

private currentScrollPosition: number;
private itemsToHighlight: Array<string> = [];

constructor(
private compiler: Compiler,
private ref: ChangeDetectorRef,
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/index.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ScrollSpyIndexOptions {
selector: '[scrollSpyIndex]'
})
export class ScrollSpyIndexDirective implements OnInit, AfterViewInit, OnDestroy {
@Input('scrollSpyIndex') options: ScrollSpyIndexOptions;
@Input('scrollSpyIndex') public options: ScrollSpyIndexOptions;

private defaultOptions: ScrollSpyIndexOptions = {
selector: 'anchor'
Expand Down
6 changes: 3 additions & 3 deletions src/plugin/infinite.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export interface ScrollSpyInfiniteOptions {
selector: '[scrollSpyInfinite]'
})
export class ScrollSpyInfiniteDirective implements OnInit, AfterViewInit, OnDestroy {
@Input('scrollSpyInfinite') options: ScrollSpyInfiniteOptions;
@Input() scrollSpyInfiniteDisabled: boolean;
@Input('scrollSpyInfinite') public options: ScrollSpyInfiniteOptions;
@Input() public scrollSpyInfiniteDisabled: boolean;

@Output() scrollSpyInfiniteEvent: EventEmitter<any> = new EventEmitter();
@Output() public scrollSpyInfiniteEvent: EventEmitter<any> = new EventEmitter();

private defaultOptions: ScrollSpyInfiniteOptions = {
spyId: 'window',
Expand Down
10 changes: 5 additions & 5 deletions src/plugin/parallax.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ export interface ScrollSpyParallaxOptions {
selector: '[scrollSpyParallax]'
})
export class ScrollSpyParallaxDirective implements OnInit, AfterViewInit, OnDestroy {
@Input('scrollSpyParallax') options: ScrollSpyParallaxOptions;
@Input() scrollSpyParallaxDisabled: boolean;
@Input('scrollSpyParallax') public options: ScrollSpyParallaxOptions;
@Input() public scrollSpyParallaxDisabled: boolean;

public cssValue: string;
public isSpecialVal: boolean = false;

private defaultOptions: ScrollSpyParallaxOptions = {
spyId: 'window',
horizontal: false,
Expand All @@ -69,9 +72,6 @@ export class ScrollSpyParallaxDirective implements OnInit, AfterViewInit, OnDest

private el: HTMLElement;

private cssValue: string;
private isSpecialVal: boolean = false;

constructor(
private renderer: Renderer,
private elRef: ElementRef,
Expand Down

0 comments on commit 1d7f6a0

Please sign in to comment.