ngx-blurred-image
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -12,6 +12,6 @@ import { Component, ElementRef, HostListener, OnInit, Input, ViewChild } from '@angular/core'; | ||
elem: any; | ||
preview: any = {}; | ||
preview: any = {}; | ||
small: any = {}; | ||
@Input('small') | ||
@Input('small') | ||
set smallPath(value: any) { | ||
@@ -23,3 +23,3 @@ if (value) { | ||
@Input('preview') | ||
@Input('preview') | ||
set previewPath(value: any) { | ||
@@ -31,2 +31,3 @@ if (value) { | ||
@Input() delay: number = 1000; | ||
@Input() size: any = {}; | ||
@@ -36,3 +37,3 @@ | ||
constructor(private elementRef: ElementRef){ | ||
constructor(private elementRef: ElementRef){ | ||
this.elem = this.elementRef.nativeElement; | ||
@@ -44,3 +45,3 @@ } | ||
if (this.checkElemPosition()){ | ||
this.show(); | ||
this.show(); | ||
} | ||
@@ -63,3 +64,3 @@ } | ||
show(){ | ||
this.preview.ready = true; | ||
this.preview.ready = true; | ||
this.small.ready = true; | ||
@@ -71,7 +72,7 @@ } | ||
this.small.loaded = true; | ||
}, 500); | ||
}, this.delay/2); | ||
setTimeout(() => { | ||
this.preview.loaded = true; | ||
}, 1000); | ||
}, this.delay); | ||
} | ||
@@ -78,0 +79,0 @@ |
{ | ||
"name": "ngx-blurred-image", | ||
"version": "1.0.0", | ||
"description": "Angular2 blurred image component.", | ||
"version": "1.1.0", | ||
"description": "AngularX blurred image component.", | ||
"main": "blurred-image.component.js", | ||
@@ -15,6 +15,6 @@ "scripts": { | ||
"keywords": [ | ||
"Angular 2", | ||
"Angular 4", | ||
"Library", | ||
"Seed" | ||
"angular", | ||
"angular 2", | ||
"ng2", | ||
"blurred" | ||
], | ||
@@ -21,0 +21,0 @@ "author": "drozhzhin.n.e@gmail.com", |
@@ -12,13 +12,7 @@ ## Installation | ||
```ts | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { AppComponent } from './app.component'; | ||
import { BlurredImageComponent } from 'ngx-blurred-image/components'; | ||
@NgModule({ | ||
imports: [ BrowserModule ], | ||
declarations: [ AppComponent, BlurredImageComponent ], | ||
bootstrap: [ AppComponent ] | ||
declarations: [ BlurredImageComponent ] | ||
}) | ||
export class AppModule { } | ||
``` | ||
@@ -42,4 +36,5 @@ | ||
| size | object | Width and height of the container with the image. | | ||
| delay | number | The delay in ms before showing the image. | | ||
## Demo | ||
http://crystalui.org/components/blurred-image/example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93
4638
38