jQRangeSlider icon indicating copy to clipboard operation
jQRangeSlider copied to clipboard

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

Open nickatedge opened this issue 9 years ago • 2 comments

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!

nickatedge avatar Nov 10 '15 13:11 nickatedge

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 [email protected] 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 https://github.com/ghusse/jQRangeSlider/issues/203.

ghusse avatar Nov 10 '15 14:11 ghusse

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. :-)

nickatedge avatar Nov 10 '15 15:11 nickatedge