Skip to content

Commit

Permalink
re-introduce handle lower/upper classes
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Dec 10, 2016
1 parent 299ed4b commit 0683284
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@
animate: true,
animationDuration: 300,
format: defaultFormatter
}, tests;
};

// Tests are executed in the order they are presented here.
tests = {
var tests = {
'step': { r: false, t: testStep },
'start': { r: true, t: testStart },
'connect': { r: true, t: testConnect },
Expand Down Expand Up @@ -353,6 +353,8 @@
base: 'base',
origin: 'origin',
handle: 'handle',
handleLower: 'handle-lower',
handleUpper: 'handle-upper',
horizontal: 'horizontal',
vertical: 'vertical',
background: 'background',
Expand Down
9 changes: 9 additions & 0 deletions src/js/structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
var origin = addNodeTo(base, options.cssClasses.origin);
var handle = addNodeTo(origin, options.cssClasses.handle);
handle.setAttribute('data-handle', handleNumber);

if ( handleNumber === 0 ) {
addClass(handle, options.cssClasses.handleLower);
}

else if ( handleNumber === options.handles - 1 ) {
addClass(handle, options.cssClasses.handleUpper);
}

return origin;
}

Expand Down

0 comments on commit 0683284

Please sign in to comment.