-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
When using the on and off attributes to set labels with relatively long text (10 to 20 chars), the width of the toggle wrapper doesn't adjust properly.
Example:
<toggle ng-model="$ctrl.someValue" on="My Long Toggle" off="Is Not Well Adjusted"></toggle>This is because the width of the toggleWrapper div is based on offsetWidth of the on and off labels, which doesn't include the part of the label that may be clipped and not visible, which is the case with labels in toggle.
Suggestion: Use the scrollWidth property instead
Also: add 24px to adjust for the padding...
Metadata
Metadata
Assignees
Labels
No labels