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