Skip to content

Commit 231c57b

Browse files
authored
updated placeholder constants data structure (#270)
1 parent d1c0712 commit 231c57b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

projects/angular-cld/src/lib/cloudinary-placeholder.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class CloudinaryPlaceHolder implements AfterContentChecked {
4343
if (this.type === 'predominant-color' && this.itemHeight && this.itemWidth) {
4444
return this.cloudinary.url(this.publicId, {transformation: [this.options, ...predominantColorTransformPxl]});
4545
} else {
46-
return this.cloudinary.url(this.publicId, {transformation: [this.options, ...placeholderImageOptions[this.type] || placeholderImageOptions['blur']]});
46+
return this.cloudinary.url(this.publicId, {transformation: [this.options, ...(placeholderImageOptions[this.type] || placeholderImageOptions['blur'])]});
4747
}
4848
}
4949
}

projects/angular-cld/src/lib/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export const predominantColorTransform = [
1818
{fetch_format: 'auto', quality: 'auto'}];
1919

2020
export const placeholderImageOptions = {
21-
'vectorize': {effect: 'vectorize:3:0.1', fetch_format: 'svg'},
22-
'pixelate': {effect: 'pixelate', quality: 1, fetch_format: 'auto'},
23-
'blur': {effect: 'blur:2000', quality: 1, fetch_format: 'auto'},
21+
'vectorize': [{effect: 'vectorize:3:0.1', fetch_format: 'svg'}],
22+
'pixelate': [{effect: 'pixelate', quality: 1, fetch_format: 'auto'}],
23+
'blur': [{effect: 'blur:2000', quality: 1, fetch_format: 'auto'}],
2424
'predominant-color': predominantColorTransform
2525
};

0 commit comments

Comments
 (0)