@ng-doc/ui-kit
Version:
<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>
46 lines (42 loc) • 1.77 kB
JavaScript
import * as i0 from '@angular/core';
import { HostBinding, Input, Directive } from '@angular/core';
/**
* Directive rotates host with transition
*/
class NgDocRotatorDirective {
constructor() {
/** Rotator state */
this.rotated = false;
/** Start position angle */
this.from = 0;
/** End position anle */
this.to = 90;
}
get transform() {
return `rotateZ(${this.rotated ? this.to : this.from}deg)`;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgDocRotatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.3", type: NgDocRotatorDirective, isStandalone: true, selector: "[ngDocRotator]", inputs: { rotated: ["ngDocRotator", "rotated"], from: "from", to: "to" }, host: { properties: { "style.transform": "this.transform" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: NgDocRotatorDirective, decorators: [{
type: Directive,
args: [{
selector: '[ngDocRotator]',
standalone: true,
}]
}], propDecorators: { rotated: [{
type: Input,
args: ['ngDocRotator']
}], from: [{
type: Input
}], to: [{
type: Input
}], transform: [{
type: HostBinding,
args: ['style.transform']
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { NgDocRotatorDirective };
//# sourceMappingURL=ng-doc-ui-kit-directives-rotator.mjs.map