mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
minor tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
38505aa948
commit
f3d7472cd4
@ -133,6 +133,8 @@ module.ViewerActions = actions.Actions({
|
|||||||
config: {
|
config: {
|
||||||
// make the direction steps depend on screen size...
|
// make the direction steps depend on screen size...
|
||||||
'steps-to-change-direction': 'screenwidth',
|
'steps-to-change-direction': 'screenwidth',
|
||||||
|
'steps-to-change-direction-min': 2,
|
||||||
|
'steps-to-change-direction-max': 6,
|
||||||
|
|
||||||
// The maximum screen width allowed when zooming...
|
// The maximum screen width allowed when zooming...
|
||||||
'max-screen-images': 30,
|
'max-screen-images': 30,
|
||||||
@ -324,12 +326,12 @@ module.ViewerActions = actions.Actions({
|
|||||||
|
|
||||||
// XXX EXPERIMENTAL: direction...
|
// XXX EXPERIMENTAL: direction...
|
||||||
get direction_change_steps(){
|
get direction_change_steps(){
|
||||||
var steps = this.config['steps-to-change-direction']
|
var steps = this.config['steps-to-change-direction']
|
||||||
return steps == 'screenwidth' ?
|
var min = this.config['steps-to-change-direction-min'] || 3
|
||||||
Math.ceil(this.screenwidth / 2)
|
var max = this.config['steps-to-change-direction-max'] || 6
|
||||||
: typeof(steps) == typeof(123) ?
|
return typeof(steps) == typeof(123) ?
|
||||||
steps
|
steps
|
||||||
: Math.ceil(this.screenwidth / 2) },
|
: Math.min(Math.max(Math.ceil(this.screenwidth / 2), min), max) },
|
||||||
|
|
||||||
|
|
||||||
// Navigation...
|
// Navigation...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user