UNPKG

@ks89/angular-modal-gallery

Version:
34 lines (33 loc) 1.41 kB
import { ElementRef, OnChanges, OnInit, Renderer2 } from '@angular/core'; import { MaxSize } from '../model/max-size.interface'; import * as i0 from "@angular/core"; /** * Directive to change the max size of an element. */ export declare class MaxSizeDirective implements OnInit, OnChanges { private renderer; private el; /** * Object of type `MaxSize` to resize the element. */ maxSizeConfig: MaxSize | undefined; constructor(renderer: Renderer2, el: ElementRef); /** * Method ´ngOnInit´ to apply the style of this directive. * This is an angular lifecycle hook, so its called automatically by Angular itself. * In particular, it's called only one time!!! */ ngOnInit(): void; /** * Method ´ngOnChanges´ to apply the style of this directive. * This is an angular lifecycle hook, so its called automatically by Angular itself. * In particular, it's called when any data-bound property of a directive changes!!! */ ngOnChanges(): void; /** * Private method to change both max-width and max-height of an element. */ private applyStyle; static ɵfac: i0.ɵɵFactoryDeclaration<MaxSizeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MaxSizeDirective, "[ksMaxSize]", never, { "maxSizeConfig": { "alias": "maxSizeConfig"; "required": false; }; }, {}, never, never, false, never>; }