UNPKG

@ynmstudio/utils

Version:
27 lines (23 loc) 1.08 kB
import * as i0 from '@angular/core'; import { Pipe } from '@angular/core'; class FocalPointPipe { transform(focalpoint) { if (!focalpoint || !Array.isArray(focalpoint)) return "50% 50%"; return `${(focalpoint.at(0) ?? 0.5) * 100}% ${(focalpoint.at(1) ?? 0.5) * 100}%`; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: FocalPointPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); } static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: FocalPointPipe, isStandalone: true, name: "focalPoint" }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: FocalPointPipe, decorators: [{ type: Pipe, args: [{ name: "focalPoint", standalone: true, }] }] }); /** * Generated bundle index. Do not edit. */ export { FocalPointPipe }; //# sourceMappingURL=ynmstudio-utils-pipes-focal-point.mjs.map