mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 21:39:43 +00:00
parent
a6af283f29
commit
ea006a72c0
|
@ -57,6 +57,7 @@ export class ProgressBar extends Disposable {
|
|||
private create(container: HTMLElement): void {
|
||||
this.element = document.createElement('div');
|
||||
this.element.classList.add('monaco-progress-container');
|
||||
this.element.setAttribute('role', 'progressbar');
|
||||
container.appendChild(this.element);
|
||||
|
||||
this.bit = document.createElement('div');
|
||||
|
@ -136,6 +137,7 @@ export class ProgressBar extends Disposable {
|
|||
total(value: number): ProgressBar {
|
||||
this.workedVal = 0;
|
||||
this.totalWork = value;
|
||||
this.element.setAttribute('aria-valuemax', value.toString());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
@ -173,6 +175,7 @@ export class ProgressBar extends Disposable {
|
|||
|
||||
this.element.classList.remove(CSS_INFINITE, CSS_DONE);
|
||||
this.element.classList.add(CSS_ACTIVE, CSS_DISCRETE);
|
||||
this.element.setAttribute('aria-valuenow', value.toString());
|
||||
|
||||
this.bit.style.width = 100 * (this.workedVal / (totalWork)) + '%';
|
||||
|
||||
|
|
Loading…
Reference in a new issue