ng2-progressbar
Advanced tools
Comparing version 1.1.5-alpha.0 to 1.1.5-alpha.1
@@ -10,7 +10,7 @@ import { OnChanges, SimpleChanges } from '@angular/core'; | ||
direction: string; | ||
color: any; | ||
thick: any; | ||
minimum: any; | ||
speed: any; | ||
trickleSpeed: any; | ||
color: string; | ||
thick: boolean; | ||
minimum: number; | ||
speed: number; | ||
trickleSpeed: number; | ||
/** Start/Stop Progressbar */ | ||
@@ -17,0 +17,0 @@ toggle: any; |
@@ -8,19 +8,24 @@ import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core'; | ||
this.ease = 'linear'; | ||
this.positionUsing = ''; | ||
this.positionUsing = 'margin'; | ||
this.showSpinner = true; | ||
this.direction = "leftToRightIncreased"; | ||
this.color = '#29d'; | ||
this.thick = false; | ||
this.minimum = 0.08; | ||
this.speed = 200; | ||
this.trickleSpeed = 300; | ||
} | ||
ProgressComponent.prototype.ngOnChanges = function (changes) { | ||
var minimumChange = changes['minimum']; | ||
var speedChange = changes['speed']; | ||
var trickleSpeedChange = changes['trickleSpeed']; | ||
var toggleChange = changes['toggle']; | ||
if (minimumChange && minimumChange.currentValue !== minimumChange.previousValue) | ||
this.progress.minimum = minimumChange.currentValue; | ||
if (speedChange && speedChange.currentValue !== speedChange.previousValue) | ||
this.progress.speed = speedChange.currentValue; | ||
if (trickleSpeedChange && trickleSpeedChange.currentValue !== trickleSpeedChange.previousValue) | ||
this.progress.trickleSpeed = trickleSpeedChange.currentValue; | ||
if (toggleChange) | ||
toggleChange.currentValue ? this.progress.start() : this.progress.done(); | ||
var minChng = changes['minimum']; | ||
var spdChng = changes['speed']; | ||
var tklSpdChng = changes['trickleSpeed']; | ||
var tglChng = changes['toggle']; | ||
this.progress.minimum = (minChng !== undefined && minChng.currentValue !== minChng.previousValue) ? | ||
minChng.currentValue : this.minimum; | ||
this.progress.speed = (spdChng && spdChng.currentValue !== spdChng.previousValue) ? | ||
spdChng.currentValue : this.speed; | ||
this.progress.trickleSpeed = (tklSpdChng && tklSpdChng.currentValue !== tklSpdChng.previousValue) ? | ||
tklSpdChng.currentValue : this.trickleSpeed; | ||
if (tglChng && tglChng.currentValue !== tglChng.previousValue) | ||
tglChng.currentValue ? this.progress.start() : this.progress.done(); | ||
}; | ||
@@ -27,0 +32,0 @@ ; |
{ | ||
"name": "ng2-progressbar", | ||
"version": "1.1.5-alpha.0", | ||
"version": "1.1.5-alpha.1", | ||
"description": "A slim customizable progressbar for angular2", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,5 +9,5 @@ import { Subject } from "rxjs/Subject"; | ||
export declare class NgProgressService { | ||
minimum: number; | ||
speed: number; | ||
trickleSpeed: number; | ||
minimum: any; | ||
speed: any; | ||
trickleSpeed: any; | ||
progress: number; | ||
@@ -14,0 +14,0 @@ /** Progress state */ |
@@ -13,5 +13,2 @@ import { Injectable } from "@angular/core"; | ||
var _this = this; | ||
this.minimum = 0; | ||
this.speed = 200; | ||
this.trickleSpeed = 300; | ||
this.progress = 0; | ||
@@ -18,0 +15,0 @@ /** Helper */ |
Sorry, the diff of this file is not supported yet
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
53089
367