Comments (24)
Agreed
@ProLoser I'm working on a fork to drop this dependence.
from ui-slider.
Just saying that I didn't drop the issue
I have a early version here
from ui-slider.
Update : http://plnkr.co/guRVnr
- Change position parsing
- Add style example
- Observe max and min attributes
from ui-slider.
K I'm releasing a early version
from ui-slider.
@douglasduteil Extremely great work, can't wait to get handson with the early version. Don't forget the callbacks, especially onRelease, as it will be critical for inline editing application and promises. Also I can give a hand for the mobile version of this, if needed.
from ui-slider.
K @j8 I wasn't happy about the templating system in this directive. So I made a verbose version of it.
Before :
<ui-slider></ui-slider>
After
<ui-slider class="ui-slider-default">
<slider-track>
<slider-thumb ng-model="_"/>
</slider-track>
</ui-slider>
The thumb is now customizable and the value of each thumb can be binded.
Here is a demo of how it look
from ui-slider.
@douglasduteil How far along was this? I see the build is currently failing on travis but not sure if that's a setup issue or not.
Will the no-jquery branch eventually be (or merged to) master?
from ui-slider.
Hi @Nate-Wilkins
I was near a official release but presently I don't have the time to do it... If I remember right the branch I was working on was the pure-angular
on the 'scenar' tests
from ui-slider.
I have been using this branch (no-jqui-here) for a while now....really like the features and lack of jQuery.
from ui-slider.
Sounds promising. We should definitely make this the master if it is ready
for release. I haven't had the opportunity to use this branch myself so far.
//John
Den 19 apr 2014 07:18 skrev "Andrew Pitts" [email protected]:
I have been using this branch for a while now....really like the features
and lack of jQuery.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-40861194
.
from ui-slider.
The only issue I have found so far is that it does not seem to handle decimals well. For example, a slider with a range of 0 to 5 (step of 0.02) and starting values of 0.3 and 1.0 doesn't seem to work well. It starts at 0 and 1.0. A chance this could be an error I'm making though.
from ui-slider.
@douglasduteil @johnparn any further thoughts about making the no-jqui-here branch master? Thanks.
By the way, I'm not certain, but I think the issue with decimal places is being caused by Math.floor.
from ui-slider.
@douglasduteil no problem I can look through the code test out any remaining bugs. I'll report back when/if I find any. Thanks!
from ui-slider.
Sharing the below in case it is helpful.
So, I think that the issue that I was having with the decimal places is now resolved. Once I added a step on each ui-slider-thumb that was the same as the step that I had on the ui-slider, I no longer had the issue. What I believe was happening is that the default values for the thumb (i.e. 1 was overriding the value I expected from the ui-slider).
I did however notice a couple of other things. I was getting this issue with values over 100 but only where I had two thumbs and a range (obviously the proposed solution doesn't really apply to this branch or at least I couldn't see how): #20. What I did to fix this (hopefully) is to change _cache.[x] to iAttrs.[x], e.g.:
_cache.min = (angular.isDefined(iAttrs.min)) ? _cache.min : uiSliderCtrl.min;
to
_cache.min = (angular.isDefined(iAttrs.min)) ? iAttrs.min : uiSliderCtrl.min;
This change is in a fork I created today...seems OK at the moment but I haven't thoroughly tested it: https://github.com/apitts/ui-slider
Another issue I had was in passing an expression for a step size. If the max value was not a multiple of the step size, the max value displayed would be slightly less than the inputted max value due to rounding I believe caused by these lines:
formattedValue = Math.floor(formattedValue / step) * step;
return Math.floor(value / _cache.step) * _cache.step;
Basically, I was choosing a step value that divided evenly into (max - min) which I think makes sense but these calculations seem to require that it divides evenly into max. For the moment I have fixed this by choosing a step value that divides evenly into max.
from ui-slider.
@douglasduteil ... very nice slider ... small request (which you can ignore if you don't think it worth it).
The no-jqui slider is not compatible with Angular 1.1.x as it's using one 1.2.x feature which makes this not work on 1.1.x angular.
it's: $isEmpty
Could you consider null/empty check without use of $isEmpty?
https://github.com/angular-ui/ui-slider/blob/no-jqui-here/src/ui-slider.js#L273
https://github.com/angular-ui/ui-slider/blob/no-jqui-here/src/ui-slider.js#L288
https://github.com/angular-ui/ui-slider/blob/no-jqui-here/src/ui-slider.js#L303
https://github.com/angular-ui/ui-slider/blob/no-jqui-here/src/ui-slider.js#L315
from ui-slider.
Hi all I made another poke for this. An 'official' update will be made soon enough.
from ui-slider.
@douglasduteil you should take a look at apitts improvements made here: https://github.com/apitts/ui-slider
from ui-slider.
@rzschech @apitts That looks cool.
I'm looking forward to merge some of those changed 👍
from ui-slider.
Excellent! 👍 Thanks @douglasduteil!
from ui-slider.
@douglasduteil I've added support for step="any" similar to:
<input type="number" step="any">
from ui-slider.
@douglasduteil where are we with the no-jquery version ? anything that should be merged here ? or did it become an independent project ? should this issue be closed ?
from ui-slider.
Hi. Good timing @PowerKiKi I'm actually working on a new version of it :)
my last attempt
from ui-slider.
let us know if/when something should be merged here
from ui-slider.
Closing as obsolete
from ui-slider.
Related Issues (20)
- Updated demo page HOT 2
- Please publish 0.1.3 on NPM HOT 8
- add touchdrag support for handles - Feature HOT 3
- Version problem HOT 2
- Range-Slider locks on max value if ng-model-options: debounce is used
- Can we add this package to the npm registry? HOT 1
- Max/Min dynamically range changes.
- Slide event cancellation doesn't keep previous slider values HOT 2
- Update angular version
- Ticks does not get updated when the Max value is changed dynamically.
- The slider is not working on IE-8 and IE-9 browser?
- Upgrade to jQuery UI 1.11 HOT 3
- elm.slider is not a function HOT 4
- Setting min and max values dynamically. HOT 1
- model to define steps array with numbers to allow slider to snap into defined numbers only HOT 1
- uh - zero size HOT 3
- If you have multiple ui-slider's with different min/max values, but the same option object, the mix/max become the same for all the sliders. HOT 2
- Dual Knobs would be great! HOT 1
- Feature, use dates?
- Changing min/max values after slider creation? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-slider.