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

The slider appears one pixel off to the left when turning off arrows. #203

Open
nickatedge opened this issue Nov 10, 2015 · 2 comments
Open

Comments

@nickatedge
Copy link

Thanks for the awesome widget, but I encountered an issue and would like to report it and see if there is a possible fix or work around.

I am using an existing jsfiddle that I found in the forum and I tried it with the latest code base, jquery-ui, jQRangeSlider library, the issue is still there.

http://jsfiddle.net/vM844/1218/

When the slider is expanded to its max, the left side of slider appears to be flushed with its container, but the right side of slider appears to be one pixel off with the right edge of the container. If you enlarge the screen or shorten the width of the display, the issue becomes more noticeable.

It seems that ui-rangeSlider-bar has a "left" value of a negative value but the "right" value is correct.

issue1

Any suggestion to make both ends look the same will be greatly appreciated!

@ghusse
Copy link
Owner

ghusse commented Nov 10, 2015

Wow. Thanks for reporting the issue.

I've no idea why there is such difference. If you can investigate and fix
the issue, I'll be glad to merge your correction.

On Tue, Nov 10, 2015 at 2:26 PM, Nick notifications@github.com wrote:

Thanks for the awesome widget, but I encountered an issue and would like
to report it and see if there is a possible fix or work around.

I am using an existing jsfiddle that I found in the forum and I tried it
with the latest code base, jquery-ui, jQRangeSlider library, the issue is
still there.

http://jsfiddle.net/vM844/1218/

When the slider is expanded to its max, the left side of slider appears to
be flushed with its container, but the right side of slider appears to be
one pixel off with the right edge of the container. If you enlarge the
screen or shorten the width of the display, the issue becomes more
noticeable.

It seems that ui-rangeSlider-bar has a "left" value of a negative value
but the "right" value is correct.

[image: issue1]
https://cloud.githubusercontent.com/assets/12766081/11063427/8f027862-8784-11e5-87c6-1693e368d73f.png

Any suggestion to make both ends look the same will be greatly appreciated!


Reply to this email directly or view it on GitHub
#203.

@nickatedge
Copy link
Author

This could be related to iThing.css style only. I found a way to work around it by adding a small adjustment to a value in _applyPosition(). This function is called from _mouseDrag()

_applyPosition: function(a) {
a+=0.5;
var b = {
top: this.cache.offset.top,
left: a
};
this.element.offset({
left: a
}), this.cache.offset = b
},

Not sure if this is a hack or a solution. :-)

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

2 participants