Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
drgould committed Apr 16, 2014
1 parent 03dbdbb commit 9da9c9a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# angular-slider [![Build Status](https://secure.travis-ci.org/Venturocket/angular-slider.png?branch=master)](http://travis-ci.org/Venturocket/angular-slider)
Slider directive for AngularJS. https://venturocket.github.io/angular-slider
Slider directive for AngularJS. https://venturocket.github.io/angular-slider
License: MIT

## Features
Expand All @@ -12,7 +12,7 @@ License: MIT
- Full touch event support

## Known Issues
- When hidden during initialization (`display: none;`) the slider might not display correctly when shown. Issue a `$scope.$broadcast('refreshSlider');` in a parent scope to tell the slider to update the DOM.
- When hidden during initialization (`display: none;`) the slider might not display correctly when shown. Issue `$scope.$broadcast('refreshSlider');` in a parent scope to tell the slider to update the DOM.

## Installation

Expand Down Expand Up @@ -85,9 +85,9 @@ As an attribute:
|step |float |No |inf |The width between each tick. |
|precision |integer|No |0 |The numerical precision to which to round the value. |
|stretch |integer|No |3 |How sticky the knobs will act. 1 = no stickiness |
|translate-fn |string |No |none |A translation function to apply to all view values. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|scale-fn |string |No |none |A scaling function to apply to the value. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|inverse-scale-fn |string|No |none |The inverse of the scaling function. This is required if a scaling function is specified. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|translate-fn |string |No |none |A translation function to apply to all view values. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|scale-fn |string |No |none |A scaling function to apply to the value. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|inverse-scale-fn |string|No |none |The inverse of the scaling function. This is required if a scaling function is specified. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
--
### Dual Knob
#### Markup
Expand Down Expand Up @@ -132,19 +132,19 @@ As an attribute:
#### Parameters
|Param |Type |Required |Default |Details |
|-----------|-------|---------|--------|--------|
|ng-model|string|Yes |none |Assignable angular expression to which to data-bind the low value. |
|ng-model-range|string|Yes |none |Assignable angular expression to which to data-bind the high value. |
|ng-model |string |Yes |none |Assignable angular expression to which to data-bind the low value. |
|ng-model-range|string|Yes |none |Assignable angular expression to which to data-bind the high value. |
|floor |float |Yes |none |The lowest value possible |
|ceiling |float |Yes |none |The highest value possible |
|buffer |float |No |0 |The minimum difference between the low and high values |
|step |float |No |inf |The width between each tick. |
|precision |integer|No |0 |The numerical precision to which to round the value. |
|stretch |float |No |3 |How sticky the knobs will act. 1 = no stickiness |
|translate-fn |string |No |none |A translation function to apply to most of the view values. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|translate-range-fn|string|No |none |A translation function to apply to the range value. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|translate-combined-fn|string|No |none |A translation function to apply to the combined value (when the knobs are too close together). Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|scale-fn |string |No |none |A scaling function to apply to the value. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|inverse-scale-fn|string|No |none |The inverse of the scaling function. This is required if a scaling function is specified. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|translate-fn |string |No |none |A translation function to apply to most of the view values. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|translate-range-fn|string|No |none |A translation function to apply to the range value. Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|translate-combined-fn|string|No |none |A translation function to apply to the combined value (when the knobs are too close together). Be sure to omit the parentheses (e.g. "transFunc" instead of "transFunc()") |
|scale-fn |string |No |none |A scaling function to apply to the value. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |
|inverse-scale-fn|string|No |none |The inverse of the scaling function. This is required if a scaling function is specified. See the `Scaling` section below for more details. Be sure to omit the parentheses (e.g. "scaleFunc" instead of "scaleFunc()") |


## Scaling
Expand All @@ -164,3 +164,8 @@ A few notes:
- scaleFn(inverseScaleFn(x)) MUST produce x or you're gonna have a bad time
- If your scale function returns the same y for multiple x's within the range of the slider you're gonna have a bad time
- If the floor of your slider dips into negative numbers and you don't account for possible imaginary numbers you're gonna have a bad time

## Additional Features
- `ngChange` support ([docs](http://docs.angularjs.org/api/ng/directive/ngChange))
- `ngDisabled` support ([docs](http://docs.angularjs.org/api/ng/directive/ngDisabled))
- implements `ngModelController` for form validation and dirty/pristine states ([docs](http://docs.angularjs.org/api/ng/type/ngModel.NgModelController))
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"angular-scenario": "*"
},
"resolutions": {
"angular": "v1.2.14"
"angular": "v1.2.16"

This comment has been minimized.

Copy link
@danielhokanson

danielhokanson Oct 27, 2014

The static dependency here is making it so I can't bring my overall solution up to the 1.3.0 angular version. I can fork/fix/push if you like, but I am not as familiar with the source as yourself.

}
}

0 comments on commit 9da9c9a

Please sign in to comment.