/* tslint:disable:member-ordering */ import { Directive, ElementRef, Input } from '@angular/core'; @Directive({ selector: '[rowfixedOrient]' }) export class cmTableFixexDirective { constructor(private el: ElementRef) { } @Input('rowfixedOrient') set orient(orient: string) { this.el.nativeElement.style.position = 'absolute'; this.el.nativeElement.style.top =0; this.el.nativeElement.style.zIndex = 10; if (orient == 'left') { this.el.nativeElement.style.left = 0; this.el.nativeElement.style.boxShadow=" rgba(0, 0, 0, 0.2) 2px 0px 6px -2px" } else if (orient == 'right') { this.el.nativeElement.style.right = 0; this.el.nativeElement.style.boxShadow=" rgba(0, 0, 0, 0.2) -2px 0px 6px -2px" } } } /* Copyright 2017 Google Inc. All Rights Reserved. Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at http://angular.io/license */