Skip to content

Progress Spinner diameter and strokeWidth bound vs unbound #7790

@paqogomez

Description

@paqogomez

Bug, feature request, or proposal:

Bug

What is the expected behavior?

<mat-progress-spinner diameter="30" strokeWidth="10"></mat-progress-spinner>
Should work the same as
<mat-progress-spinner [diameter]="myValueOf30" [strokeWidth]="myValueOf10"></mat-progress-spinner>

What is the current behavior?

While the size of the spinner adjusts the same in both versions, without binding to the values, the underlying svg object increases exponentially in size with the strokeWidth and diameter.

What are the steps to reproduce?

Two spinners, one bound to both variables with sliders and it performs as expected, one with hard coded values. Notice the space that the second takes up. Try increasing the strokeWidth of the second, and watch as the svg gets enormous.
https://plnkr.co/edit/NxWjkzGkcpfsgRi1R3VA?p=preview

What is the use-case or motivation for changing an existing behavior?

Perhaps its my ignorance, but it seems like we should be able to just set a value w/o binding to angular.
It is worth noting that binding to the properties and simply passing in a value works just fine.
<mat-progress-spinner [diameter]="30" [strokeWidth]="10"></mat-progress-spinner>

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.4.5
Material 2.0.0-beta.12

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions