Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right border not showing #25

Open
martinmanzo opened this issue Jan 15, 2018 · 7 comments
Open

Right border not showing #25

martinmanzo opened this issue Jan 15, 2018 · 7 comments

Comments

@martinmanzo
Copy link

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

2.4.10

Repro steps.

  • Create a switch with this options:
    <bSwitch
    [switch-base-class]="'bootstrap-switch'"
    [switch-wrapper-class]="'bootstrap-switch-wrapper'"
    [switch-off-text]="'Excluir'"
    [switch-on-text]="'Incluir'"
    [switch-size]="'small'"
    [switch-disabled]="false"
    [switch-readonly]="false"
    [switch-animate]="true"
    [switch-inverse]="false"
    [switch-handle-width]="60"
    [ngModel]="inc"
    (onChangeState)="modifyFilterInclusive($event, fld)">

and this is the result:
image

The log given by the failure.

None

Desired functionality.

Adding 2px to the width is enough to show the border, example:
image

Mention any other details that might be useful.

By looking at the source code the change should be made to this line:
https://github.com/JulioWar/jw-bootstrap-switch-ng2/blob/master/src/directive.ts#L32
<div class="{{ getWrapperClasses() }}" [style.width]=" (handleWidth + labelWidth ) +'px'">
and transform it into:
<div class="{{ getWrapperClasses() }}" [style.width]=" (handleWidth + labelWidth + 2) +'px'">

I could do a pull request if you need.

Thanks!

@JulioWar
Copy link
Owner

JulioWar commented Jan 15, 2018

Hi @martinmanzo, I just wanna know why you are using the property switch-handle-width.

@martinmanzo
Copy link
Author

martinmanzo commented Jan 15, 2018

Hi @JulioWar, thanks for the response. I had some Issues getting the switch to display correctly and turned into old issues to now if someone else had had the same problem and if there was a solution. I found this issue #2 and in an answer you state to try with that. I did it and the switch started to display correctly.

@JulioWar
Copy link
Owner

Ok, I understand. Can you please make the pull request I gonna take the time to test that on my side. Thanks

@martinmanzo
Copy link
Author

Sure, I'll do it in the next days.
Thanks!

@hashmed
Copy link

hashmed commented May 15, 2019

This is still an issue. Fix that @martinmanzo suggested seems to work.
Why not upgrade it? This is by far the best switch toggle package out there (for Angular), and the missing right border is so...difficult to look at.

@JulioWar
Copy link
Owner

Hi @hashmed

This an issue that I can't reproduce and I don't know if I make this changes, others can be affected. people using this package that doesn't have this issue. That is the case for me.
I have a demo site for this package here: https://juliowar.github.io/jw-bootstrap-switch-ng2/

Can you tell me if you see the issue there ?

Because that demo is based on the same code and on my side I don't see the issue

Thanks in advance for using my package 👍

@hashmed
Copy link

hashmed commented May 16, 2019

@JulioWar
Oh, I didn't know that was the case. Applying the "fix" might do more damage then, for sure.

I do not see the issue on demo site, border is there. I'm now suspecting that some other css files might be interfering with it. I will let you know if I pinpoint the issue.

But your library is probably good as it is. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants