From c05f4a3b7ed44676a80c4db5668f041ba6a3427d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Balet?= Date: Tue, 23 Jul 2024 07:31:48 +0200 Subject: [PATCH] refactor(imageAsCode, renderAsync): booleanAttribute (#100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Raphaƫl Balet --- projects/ngx-kjua/src/lib/ngx-kjua.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/ngx-kjua/src/lib/ngx-kjua.component.ts b/projects/ngx-kjua/src/lib/ngx-kjua.component.ts index abd0c24..be28f49 100644 --- a/projects/ngx-kjua/src/lib/ngx-kjua.component.ts +++ b/projects/ngx-kjua/src/lib/ngx-kjua.component.ts @@ -9,6 +9,7 @@ import { Output, SimpleChanges, ViewChild, + booleanAttribute, } from "@angular/core"; import {kjua} from "./kjua/index"; import {KjuaEcLevel, KjuaMode, KjuaRender} from "./ngx-kjua.interface"; @@ -87,7 +88,7 @@ export class NgxKjuaComponent implements AfterViewInit, OnChanges { } /** - * roundend corners in pc= 0..100 + * rounded corners in pc= 0..100 */ @Input() rounded = 0; @@ -115,7 +116,7 @@ export class NgxKjuaComponent implements AfterViewInit, OnChanges { mPosY: number | number[] = 50; @Input() image: null | undefined | HTMLImageElement | string = undefined; - @Input() + @Input({ transform: booleanAttribute }) imageAsCode = false; /** @@ -134,7 +135,7 @@ export class NgxKjuaComponent implements AfterViewInit, OnChanges { * If true, rendering is done inside "requestAnimationFrame"-call. * Use this if you want to generate more than one code (e.g. batch) */ - @Input() + @Input({ transform: booleanAttribute }) renderAsync = false; /**