Skip to content

Commit

Permalink
refactor(imageAsCode, renderAsync): booleanAttribute (#100)
Browse files Browse the repository at this point in the history
Co-authored-by: Raphaël Balet <raphael@megaphone.info>
  • Loading branch information
rbalet and Raphaël Balet authored Jul 23, 2024
1 parent 7278172 commit c05f4a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions projects/ngx-kjua/src/lib/ngx-kjua.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

/**
Expand All @@ -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;

/**
Expand Down

0 comments on commit c05f4a3

Please sign in to comment.