Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Nov 19, 2017
1 parent 510e1f3 commit 7957036
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/splitbutton/splitbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export class SplitButton implements AfterViewInit,AfterViewChecked,OnDestroy {
@Input() appendTo: any;

@Input() dir: string;

@ViewChild('container') containerViewChild: ElementRef;

@ViewChild('defaultbtn') buttonViewChild: ElementRef;

Expand Down Expand Up @@ -150,9 +152,9 @@ export class SplitButton implements AfterViewInit,AfterViewChecked,OnDestroy {

alignPanel() {
if(this.appendTo)
this.domHandler.absolutePosition(this.overlayViewChild.nativeElement, this.buttonViewChild.nativeElement);
this.domHandler.absolutePosition(this.overlayViewChild.nativeElement, this.containerViewChild.nativeElement);
else
this.domHandler.relativePosition(this.overlayViewChild.nativeElement, this.buttonViewChild.nativeElement);
this.domHandler.relativePosition(this.overlayViewChild.nativeElement, this.containerViewChild.nativeElement);
}

bindDocumentClickListener() {
Expand Down

0 comments on commit 7957036

Please sign in to comment.