darul75 / angular-awesome-slider

:arrows_clockwise: Angular slider control directive
http://darul75.github.io/angular-awesome-slider/
MIT License
143 stars 63 forks source link

Slider reset not working as expected #113

Closed praswebdev closed 9 years ago

praswebdev commented 9 years ago

Hi, I am using a slider with two pointers. when you move the slider pointers to left most and click on reset button, the slider is not resetting properly. for example,

in the fiddle below, on load i set the age to 34 and 67, and then u move the left pointer to 53 and the click reset, the pointer movers to default age 34.

Then move the left pointer to 26 and the right one to 29 and then click on rest button, left pointer is not resetting to default age 34.

I am using version 2.2.2, and unfortunately at this point cannot upgrade.

http://jsfiddle.net/dmohan/hkp72ftL/10/

darul75 commented 9 years ago

hi I have seen it, I try to ckeck it tonight, sorry for delay

praswebdev commented 9 years ago

Thanks a lot. Could you please let me know the fix for it too. So I can put in version 2.2.2. At this point of my project I cannot upgrade to latest .

Sent from my iPhone

On Jun 15, 2015, at 7:09 AM, Julien Valéry notifications@github.com wrote:

hi I have seen it, I try to ckeck it tonight, sorry for delay

— Reply to this email directly or view it on GitHub.

darul75 commented 9 years ago

I have reproduced, so I gonna check with new version to see if it has been solved and replace 2.2.2 tag with this fix.

darul75 commented 9 years ago

hi a fix is available here,

https://github.com/darul75/angular-awesome-slider/releases/tag/2.2.6-patch

you can check here

http://jsfiddle.net/darul75/q0ong5ot/

it includes all fix or enhancement to 2.2.6 but it does not change directive name, still ng-slider

2.2.6: refactoring classnames 2.2.5: skin availables + less all css 2.2.4: fix when 2 pointers overlap on limits 2.2.3: mouse up event indicator in callback

praswebdev commented 9 years ago

Thanks a lot. I will test and let you know

darul75 commented 9 years ago

main change is from $watch for options object made with equality and not reference..so it was not triggering change event.

https://github.com/darul75/angular-awesome-slider/blob/patch/src/core/ng-slider.js#L133

can you then give me some tips to make slider working under ie8, someone (I realize it you ;) ) was asking for it here https://github.com/darul75/angular-awesome-slider/issues/56

praswebdev commented 9 years ago

Hi tested it. but could find label and pointer overlapping after reset is clicked

slider

i tried to integrate with 2..2.6, but found that template classes changed and and we have custom styles on these. Unfortunately i cannot upgrade to 2.2.6

praswebdev commented 9 years ago

For IE8 I have made the following fix

  1. replaced pageX and pageY with clientX and clientY, as these were not defined in IE8
    ex: x: a.pageX || a.clientX, y: a.pageY || a.clientY
  2. Same with textContent , if not defined changed to innerText
praswebdev commented 9 years ago

Hi Looks like the threshold is not setting properly on reset.Could you please take a look at this issue?

darul75 commented 9 years ago

yes it is fixed on same release, I have erased previous one so you can give a try and dowload it. but code needs to be refactored...so dirty there sometimes, I will do it in current release not for previous

praswebdev commented 9 years ago

you mean it is fixed for version 2.2.2? Also we have the label overlap issue after reset clicked in 2.2.6 patch too? was that too fixed? http://jsfiddle.net/darul75/q0ong5ot/

darul75 commented 9 years ago

Well I have to move what I have done inn patch for a 2.2.2 version forget the 2.2.6 fix..too much thing at same time here. I try to create a patch tomorrow :)

praswebdev commented 9 years ago

I verified this is in 2.2.6 patch and looks fixed. I shall do some more testing. Let me try to pull those changes in 2.2.2 and see if i can fix this. Thanks a lot for fixing this one. Unfortunately we have a dependency with the templates and styles, so i cannot easily upgrade to higher versions.

darul75 commented 9 years ago

No problem, it just take me a while to maintain it and go into code, long time ago it exists now ;) i check too what ican do to help you

darul75 commented 9 years ago

can you check this one : https://github.com/darul75/angular-awesome-slider/releases/tag/2.2.2-patch

darul75 commented 9 years ago

thx for IE info

praswebdev commented 9 years ago

thanks a lot. it worked :-)