From 4209630c10bd3fb1cde09567f9b3b07111863c54 Mon Sep 17 00:00:00 2001 From: Raya Straus Date: Sun, 12 Apr 2020 13:23:08 +0300 Subject: [PATCH] updated placeholder constants data structure --- .../angular-cld/src/lib/cloudinary-placeholder.component.ts | 2 +- projects/angular-cld/src/lib/constants.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/angular-cld/src/lib/cloudinary-placeholder.component.ts b/projects/angular-cld/src/lib/cloudinary-placeholder.component.ts index 8f4563f7..553d50fc 100644 --- a/projects/angular-cld/src/lib/cloudinary-placeholder.component.ts +++ b/projects/angular-cld/src/lib/cloudinary-placeholder.component.ts @@ -43,7 +43,7 @@ export class CloudinaryPlaceHolder implements AfterContentChecked { if (this.type === 'predominant-color' && this.itemHeight && this.itemWidth) { return this.cloudinary.url(this.publicId, {transformation: [this.options, ...predominantColorTransformPxl]}); } else { - return this.cloudinary.url(this.publicId, {transformation: [this.options, ...placeholderImageOptions[this.type] || placeholderImageOptions['blur']]}); + return this.cloudinary.url(this.publicId, {transformation: [this.options, ...(placeholderImageOptions[this.type] || placeholderImageOptions['blur'])]}); } } } diff --git a/projects/angular-cld/src/lib/constants.ts b/projects/angular-cld/src/lib/constants.ts index 9d79c1a8..f14bc23e 100644 --- a/projects/angular-cld/src/lib/constants.ts +++ b/projects/angular-cld/src/lib/constants.ts @@ -18,8 +18,8 @@ export const predominantColorTransform = [ {fetch_format: 'auto', quality: 'auto'}]; export const placeholderImageOptions = { - 'vectorize': {effect: 'vectorize:3:0.1', fetch_format: 'svg'}, - 'pixelate': {effect: 'pixelate', quality: 1, fetch_format: 'auto'}, - 'blur': {effect: 'blur:2000', quality: 1, fetch_format: 'auto'}, + 'vectorize': [{effect: 'vectorize:3:0.1', fetch_format: 'svg'}], + 'pixelate': [{effect: 'pixelate', quality: 1, fetch_format: 'auto'}], + 'blur': [{effect: 'blur:2000', quality: 1, fetch_format: 'auto'}], 'predominant-color': predominantColorTransform };