mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-17 16:51:40 +00:00
fixed typo and moved from CONFIG.max_screen_images to a more screen size neutral CONFIG.min_image_size...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bc91949196
commit
147a28ed27
@ -378,7 +378,7 @@ function filterImagesDialog(){
|
|||||||
} else if(/^Flipped/.test(field) && res[field].trim() != ''){
|
} else if(/^Flipped/.test(field) && res[field].trim() != ''){
|
||||||
if(res[field] == 'no'){
|
if(res[field] == 'no'){
|
||||||
filter['flipped'] = 'undefined|null'
|
filter['flipped'] = 'undefined|null'
|
||||||
if(res[field] == 'any'){
|
} else if(res[field] == 'any'){
|
||||||
filter['flipped'] = '.*'
|
filter['flipped'] = '.*'
|
||||||
} else {
|
} else {
|
||||||
filter['flipped'] = res[field]
|
filter['flipped'] = res[field]
|
||||||
|
|||||||
@ -124,7 +124,7 @@ var CONFIG = {
|
|||||||
zoom_step_scale: 1.2,
|
zoom_step_scale: 1.2,
|
||||||
|
|
||||||
// ribbon scaling limits and defaults...
|
// ribbon scaling limits and defaults...
|
||||||
max_screen_images: 12,
|
min_image_size: 100,
|
||||||
default_screen_images: 4,
|
default_screen_images: 4,
|
||||||
|
|
||||||
// localStorage prefix...
|
// localStorage prefix...
|
||||||
@ -2272,7 +2272,7 @@ function reloadViewer(reuse_current_structure, images_per_screen){
|
|||||||
var current = DATA.current
|
var current = DATA.current
|
||||||
// if no width is given, use the current or default...
|
// if no width is given, use the current or default...
|
||||||
var w = images_per_screen == null ? getScreenWidthInImages() : images_per_screen
|
var w = images_per_screen == null ? getScreenWidthInImages() : images_per_screen
|
||||||
w = w > CONFIG.max_screen_images ? CONFIG.default_screen_images : w
|
w = w > getScreenWidthInImages(CONFIG.min_image_size) ? CONFIG.default_screen_images : w
|
||||||
|
|
||||||
// reset data structure...
|
// reset data structure...
|
||||||
if(!reuse_current_structure){
|
if(!reuse_current_structure){
|
||||||
|
|||||||
@ -388,7 +388,7 @@ var KEYBOARD_CONFIG = {
|
|||||||
'#7': doc('Fit seven images', function(){ fitNImages(7) }),
|
'#7': doc('Fit seven images', function(){ fitNImages(7) }),
|
||||||
'#8': doc('Fit eight images', function(){ fitNImages(8) }),
|
'#8': doc('Fit eight images', function(){ fitNImages(8) }),
|
||||||
'#9': doc('Fit nine images', function(){ fitNImages(9) }),
|
'#9': doc('Fit nine images', function(){ fitNImages(9) }),
|
||||||
'#0': doc('Fit maximum images', function(){ fitNImages(CONFIG.max_screen_images) }),
|
'#0': doc('Fit maximum images', function(){ fitNImages(getScreenWidthInImages(CONFIG.min_image_size)) }),
|
||||||
|
|
||||||
// cropping...
|
// cropping...
|
||||||
C: doc('Show ribbon crop dialog', cropImagesDialog),
|
C: doc('Show ribbon crop dialog', cropImagesDialog),
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
var CONFIG = {
|
var CONFIG = {
|
||||||
max_screen_images: 12,
|
min_image_size: 100,
|
||||||
zoom_step_scale: 1.2,
|
zoom_step_scale: 1.2,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1160,9 +1160,10 @@ function zoomIn(){
|
|||||||
}
|
}
|
||||||
function zoomOut(){
|
function zoomOut(){
|
||||||
var w = getScreenWidthInImages()
|
var w = getScreenWidthInImages()
|
||||||
if(w <= CONFIG.max_screen_images){
|
var max = getScreenWidthInImages(CONFIG.min_image_size)
|
||||||
|
if(w <= max){
|
||||||
w = w * CONFIG.zoom_step_scale
|
w = w * CONFIG.zoom_step_scale
|
||||||
fitNImages(w <= CONFIG.max_screen_images ? w : CONFIG.max_screen_images)
|
fitNImages(w <= max ? w : max)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user