ngc-float-button
Advanced tools
Comparing version 0.0.8 to 0.1.0
@@ -82,3 +82,3 @@ /* created by @GustavoCostaW https://github.com/gustavocostaw/ngc-float-button */ | ||
// transition | ||
private animateButtons() { | ||
private animateButtons(eventType) { | ||
this.buttons.toArray().forEach( (btn, i) => { | ||
@@ -88,5 +88,7 @@ i+=1; | ||
if (this.state.getValue().display) { | ||
style['display'] = 'flex'; | ||
if (eventType !== 'directionChanged' && this.state.getValue().display) { | ||
style['transform'] = 'scale(1)'; | ||
style['transition-duration'] = '0s'; | ||
if (btn.timeout) { | ||
@@ -100,10 +102,9 @@ clearTimeout(btn.timeout); | ||
style['transform'] = this.state.getValue().display ? this.getTranslate(i) : ''; | ||
}); | ||
}, 50); | ||
if (!this.state.getValue().display) { | ||
if (eventType !== 'directionChanged' && !this.state.getValue().display) { | ||
btn.timeout = setTimeout( () => { | ||
style['display'] = 'none'; | ||
style['transform'] = 'scale(0)'; | ||
}, 90 + (100 * i) ); | ||
} | ||
}); | ||
@@ -156,3 +157,3 @@ } | ||
const sub = this.state.subscribe( v => { | ||
this.animateButtons(); | ||
this.animateButtons(v.event); | ||
@@ -165,3 +166,2 @@ this.events.next({ | ||
}); | ||
this.subs.push(sub); | ||
@@ -168,0 +168,0 @@ } |
@@ -9,4 +9,3 @@ /* created by @GustavoCostaW https://github.com/gustavocostaw/ngc-float-button */ | ||
ViewChild, | ||
ChangeDetectionStrategy, | ||
ViewEncapsulation | ||
ChangeDetectionStrategy | ||
} from '@angular/core'; | ||
@@ -23,3 +22,3 @@ | ||
<a class="fab-item"> | ||
<md-icon class="material-content-icon"> {{icon}} </md-icon> | ||
<md-icon class="material-content-icon"> {{icon}} </md-icon> | ||
</a> | ||
@@ -26,0 +25,0 @@ </div> |
{ | ||
"name": "ngc-float-button", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"description": "Google Material Float Button - Implementation for Angular v4+", | ||
@@ -27,5 +27,10 @@ "scripts": { | ||
"dependencies": { | ||
"@angular/animations": "^4.3.3", | ||
"@angular/cdk": "^2.0.0-beta.8", | ||
"@angular/common": "^4.0.0", | ||
"@angular/compiler": "^4.0.0", | ||
"@angular/compiler-cli": "^4.3.3", | ||
"@angular/core": "^4.0.0", | ||
"@angular/forms": "^4.3.3", | ||
"@angular/http": "^4.3.3", | ||
"@angular/material": "^2.0.0-beta.5", | ||
@@ -35,8 +40,16 @@ "@angular/platform-browser": "^4.0.0", | ||
"@angular/platform-server": "^4.0.0", | ||
"rxjs": "^5.4.2" | ||
"@angular/router": "^4.3.3", | ||
"ngc-float-button": "^0.0.8", | ||
"rxjs": "^5.4.2", | ||
"zone.js": "0.8.13" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "1.2.1", | ||
"@angular/compiler-cli": "4.2.6", | ||
"@types/node": "^8.0.7", | ||
"typescript": "^2.4.1" | ||
"typescript": "^2.4.1", | ||
"codelyzer": "2.0.0", | ||
"ts-node": "2.1.2", | ||
"tslint": "4.5.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
20972
22
481
16
7
+ Added@angular/animations@^4.3.3
+ Added@angular/cdk@^2.0.0-beta.8
+ Added@angular/compiler-cli@^4.3.3
+ Added@angular/forms@^4.3.3
+ Added@angular/http@^4.3.3
+ Added@angular/router@^4.3.3
+ Addedngc-float-button@^0.0.8
+ Addedzone.js@0.8.13
+ Added@angular/compiler-cli@4.4.7(transitive)
+ Added@angular/forms@4.4.7(transitive)
+ Added@angular/http@4.4.7(transitive)
+ Added@angular/router@4.4.7(transitive)
+ Added@angular/tsc-wrapped@4.4.7(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedngc-float-button@0.0.8(transitive)
+ Addedreflect-metadata@0.1.14(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedtsickle@0.21.6(transitive)
+ Addedtypescript@2.9.2(transitive)
+ Addedzone.js@0.8.13(transitive)
- Removedzone.js@0.8.29(transitive)