mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Fixed progress bar animation
This commit is contained in:
@@ -12,9 +12,15 @@ export class ProgressBarDirective {
|
||||
this.progress(percent)
|
||||
}
|
||||
|
||||
constructor(element: ElementRef) {
|
||||
const $progressBar = $(element.nativeElement)
|
||||
this.progress = _.throttle((percent: number) => $progressBar.progress({ percent }), 100)
|
||||
this.percent = 0
|
||||
constructor(private element: ElementRef) {
|
||||
this.progress = _.throttle((percent: number) => this.$progressBar.progress('set').percent(percent), 100)
|
||||
}
|
||||
|
||||
private get $progressBar() {
|
||||
if (!this._$progressBar) {
|
||||
this._$progressBar = $(this.element.nativeElement)
|
||||
}
|
||||
return this._$progressBar
|
||||
}
|
||||
private _$progressBar: any
|
||||
}
|
||||
Reference in New Issue
Block a user