-
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1272 from 5andr0/master
Inverted Connects for unconstrained behavior
- Loading branch information
Showing
5 changed files
with
135 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var invertConnectsValues = document.getElementById('invert-connects-values'); | ||
|
||
invertConnectsSlider.noUiSlider.on('update', function (values) { | ||
var minToHHMM = function(mins) { | ||
var pad = function(n) { return ('0'+n).slice(-2); }; | ||
return [mins / 60 ^ 0, mins % 60].map(pad).join(':'); | ||
}; | ||
invertConnectsValues.innerHTML = values.map(minToHHMM).join(' - '); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var invertConnectsSlider = document.getElementById('invert-connects'); | ||
|
||
noUiSlider.create(invertConnectsSlider, { | ||
start: [20*60, 8*60], | ||
behaviour: 'unconstrained-invert-connects', | ||
step: 15, | ||
connect: true, | ||
range: { | ||
'min': 0, | ||
'max': 24*60 | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters