EasyUI Forum
December 16, 2025, 05:37:20 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Slider step size is ignored for negative values  (Read 8688 times)
JeroenvdV
Newbie
*
Posts: 21


View Profile Email
« on: April 10, 2022, 06:53:55 AM »

Hi,

I have a slider with a range of -60 to 160 and a step size 10.
For posivite values the step size works fine, however for negative values the configured step size seems to be ignored and becomes 1 or something.



Could this be a bug?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2305


View Profile Email
« Reply #1 on: April 10, 2022, 11:50:28 PM »

Please set the 'min' and 'max' properties for the slider component. This example works fine.
Code:
<input class="easyui-slider" style="width:300px" data-options="
showTip:true,
min: -100,
max: 100,
rule: [-100,'|',-75,'|',-50,'|',-25,'|',0,'|',25,'|',50,'|',75,'|',100]
">
Logged
JeroenvdV
Newbie
*
Posts: 21


View Profile Email
« Reply #2 on: April 11, 2022, 03:21:30 AM »

Hi Jarry,

Thanks for your reply.
Indeed, your example works fine because the default step size is 1.
However, if you change the step size to e.g. 5, you will see that for negative values the step size/interval is not 5, but 1 while changing the position of the slider.
Code:
        <input class="easyui-slider" style="width:300px" data-options="
                                showTip:true,
                                min: -100,
                                max: 100,
                                step: 5,
                                rule: [-100,'|',-75,'|',-50,'|',-25,'|',0,'|',25,'|',50,'|',75,'|',100]
                        ">
« Last Edit: April 11, 2022, 07:29:38 AM by JeroenvdV » Logged
jarry
Administrator
Hero Member
*****
Posts: 2305


View Profile Email
« Reply #3 on: April 11, 2022, 08:14:15 PM »

Please try to update the library to the newest version.
Logged
JeroenvdV
Newbie
*
Posts: 21


View Profile Email
« Reply #4 on: April 11, 2022, 10:21:33 PM »

Thanks Jarry!

Problem solved.

Cheers
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!