diff options
author | 2018-10-10 12:08:26 +0530 | |
---|---|---|
committer | 2018-10-11 05:49:34 +0000 | |
commit | e1a89b4c9b95a1b0d75b870a8c60034986229b2e (patch) | |
tree | af9d9ebc029ca4b0628710cc22f9c91116be8649 /catalog-ui/src/app/directives/graphs-v2/image-creator | |
parent | ee2eb99f5e996b941757c2e747af6df0db61ffc6 (diff) |
graph-v2 refactoring
Issue-ID: SDC-1789
Change-Id: Ic06c392a62a9db35d561e62c95ecb2a53e428cd9
Signed-off-by: Anjali walsatwar <anjali.walsatwar@huawei.com>
Diffstat (limited to 'catalog-ui/src/app/directives/graphs-v2/image-creator')
-rw-r--r-- | catalog-ui/src/app/directives/graphs-v2/image-creator/image-creator.service.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/catalog-ui/src/app/directives/graphs-v2/image-creator/image-creator.service.ts b/catalog-ui/src/app/directives/graphs-v2/image-creator/image-creator.service.ts index 68c9e9a459..19c86a254b 100644 --- a/catalog-ui/src/app/directives/graphs-v2/image-creator/image-creator.service.ts +++ b/catalog-ui/src/app/directives/graphs-v2/image-creator/image-creator.service.ts @@ -29,9 +29,9 @@ export interface ICanvasImage { 'use strict'; export class ImageCreatorService { static '$inject' = ['$q']; - private _canvas:HTMLCanvasElement; + private _canvas: HTMLCanvasElement; - constructor(private $q:ng.IQService) { + constructor(private $q: ng.IQService) { this._canvas = <HTMLCanvasElement>$('<canvas>')[0]; this._canvas.setAttribute('style', 'display:none'); @@ -46,10 +46,10 @@ export class ImageCreatorService { * @param canvasHeight * returns a PROMISE */ - getMultiLayerBase64Image(canvasImages: ICanvasImage[], canvasWidth?:number, canvasHeight?:number):ng.IPromise<string> { + getMultiLayerBase64Image(canvasImages: ICanvasImage[], canvasWidth?: number, canvasHeight?: number): ng.IPromise<string> { const deferred = this.$q.defer<string>(); - if(canvasImages && canvasImages.length === 0){ + if (canvasImages && canvasImages.length === 0) { return null; } @@ -61,7 +61,7 @@ export class ImageCreatorService { let imagesLoaded = 0; const onImageLoaded = () => { imagesLoaded++; - if(imagesLoaded < canvasImages.length){ + if (imagesLoaded < canvasImages.length) { return; } this._canvas.setAttribute('width', canvasWidth.toString()); |