Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiuch committed May 11, 2015
2 parents 13ab1a3 + 6600482 commit ecd121e
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
sauce_connect.log*
src/dragdealer.min.js
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Specs & (sweet) demos: __http://skidding.github.io/dragdealer__

## Install

The basic way to install Dragdealer is to include the [minified](https://raw.github.com/skidding/dragdealer/master/lib/dragdealer.min.js)
The basic way to install Dragdealer is to include the [minified](https://cdnjs.cloudflare.com/ajax/libs/dragdealer/0.9.8/dragdealer.min.js)
script into your web page.

### Node package
Expand Down Expand Up @@ -36,7 +36,7 @@ If you have SauceLabs credentials (SAUCE_USERNAME and SAUCE_ACCESS_KEY), run the

## Minifying

`./node_modules/.bin/uglifyjs src/dragdealer.js -o lib/dragdealer.min.js`
`node_modules/.bin/uglifyjs src/dragdealer.js -o src/dragdealer.min.js`

Make sure you ran `npm install` in the project directory first. Also, you can use global paths if you have the npm modules installed globally (-g), but you shouldn't _need_ to.

Expand Down
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ <h4>Options</h4>
<strong>callback(x, y)</strong>
<span class="description">Called when releasing handle, with the projected x, y position of the handle. Projected value means the value the slider will have after finishing a sliding animation, caused by either a step restriction or drag motion (see <em>steps</em> and <em>slide</em> options.)</span>
</li>
<li>
<span class="type">fn</span>
<strong>dragStopCallback(x, y)</strong>
<span class="description">Same as callback(x,y) but only called after a drag motion, not after setting the step manually.</span>
</li>
<li>
<span class="type">fn</span>
<strong>dragStartCallback(x, y)</strong>
<span class="description">Same as dragStopCallback(x,y) but called at the beginning of a drag motion and with the sliders initial x, y values.</span>
</li>
<li>
<span class="type">fn</span>
<strong>animationCallback(x, y)</strong>
Expand Down
1 change: 0 additions & 1 deletion lib/dragdealer.min.js

This file was deleted.

8 changes: 8 additions & 0 deletions spec/apiSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ describe("Dragdealer API", function() {
expect(dragdealer.getStep()).toEqual([4, 1]);
});

it("should get initial value on getStep() if only one step is available", function() {
var dragdealer = helpers.initDragdealer('square-slider', {
steps: 1
});

expect(dragdealer.getStep()).toEqual([1,1]);
});

it("should slide handle to position on setValue(x, y)", function() {
var callback = jasmine.createSpy(),
animationCallback = jasmine.createSpy(),
Expand Down
Loading

0 comments on commit ecd121e

Please sign in to comment.