mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
fixed a scaling issue in full screen mode...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
64e9284273
commit
0cde7eae42
@ -93,8 +93,8 @@ Roadmap
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[_] 27% Gen 3 current todo
|
[_] 28% Gen 3 current todo
|
||||||
[_] 55% High priority
|
[_] 56% High priority
|
||||||
[_] 33% mormalize ribbons -- top-align sorted chunks
|
[_] 33% mormalize ribbons -- top-align sorted chunks
|
||||||
[X] basic mechanics
|
[X] basic mechanics
|
||||||
| splitData(...)
|
| splitData(...)
|
||||||
@ -102,6 +102,9 @@ Roadmap
|
|||||||
| alignDataToRibbon(...)
|
| alignDataToRibbon(...)
|
||||||
| shiftRibbonBy(...)
|
| shiftRibbonBy(...)
|
||||||
[_] manual invoke mechanics
|
[_] manual invoke mechanics
|
||||||
|
| ctrl-s is a good candidate
|
||||||
|
|
|
||||||
|
| NOTE: might need a good preview to make this understandable...
|
||||||
[_] auto-invoke mechanics
|
[_] auto-invoke mechanics
|
||||||
[_] update data set...
|
[_] update data set...
|
||||||
| - add new images to the set
|
| - add new images to the set
|
||||||
@ -321,6 +324,7 @@ Roadmap
|
|||||||
[_] remove extra and repetitive actions
|
[_] remove extra and repetitive actions
|
||||||
[_] caching config
|
[_] caching config
|
||||||
[_] side-by side view...
|
[_] side-by side view...
|
||||||
|
[X] BUG: scaling #2 in single image mode fits image to screen on wide screens
|
||||||
[X] BUG: cropping in cropped mode will not save the whole data...
|
[X] BUG: cropping in cropped mode will not save the whole data...
|
||||||
[X] 100% BUG: sometimes the previews are not updated...
|
[X] 100% BUG: sometimes the previews are not updated...
|
||||||
[X] wrong resolution preview is loaded
|
[X] wrong resolution preview is loaded
|
||||||
|
|||||||
18
ui/base.js
18
ui/base.js
@ -983,8 +983,7 @@ function resetToOriginalImage(image){
|
|||||||
// NOTE: fixed_proportions if true will make this set the size using the
|
// NOTE: fixed_proportions if true will make this set the size using the
|
||||||
// image square, disregarding actual proportions.
|
// image square, disregarding actual proportions.
|
||||||
// NOTE: fixed_proportions may result in and image bleading off screen.
|
// NOTE: fixed_proportions may result in and image bleading off screen.
|
||||||
// XXX needs more testing...
|
function fitNImages(n, fixed_proportions, no_strict_fit){
|
||||||
function fitNImages(n, fixed_proportions){
|
|
||||||
var viewer = $('.viewer')
|
var viewer = $('.viewer')
|
||||||
|
|
||||||
viewer.trigger('preFittingImages', [n])
|
viewer.trigger('preFittingImages', [n])
|
||||||
@ -1004,10 +1003,17 @@ function fitNImages(n, fixed_proportions){
|
|||||||
var W = viewer.innerWidth()
|
var W = viewer.innerWidth()
|
||||||
var H = viewer.innerHeight()
|
var H = viewer.innerHeight()
|
||||||
|
|
||||||
// XXX this may not work correctly for portrait proportioned viewers...
|
|
||||||
var scale = Math.min(W / (w * n), H / h)
|
var scale = Math.min(W / (w * n), H / h)
|
||||||
|
|
||||||
// NOTE: if animating, the next two likes must be animated together...
|
// special case: unless fitting one image to screen, do not fill the
|
||||||
|
// whole height...
|
||||||
|
// NOTE: we do not need to check width as it's already used for
|
||||||
|
// scaling...
|
||||||
|
if(!no_strict_fit && n != 1 && h*scale == H){
|
||||||
|
scale *= 0.8
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: if animating, the next two lines must be animated together...
|
||||||
setElementScale($('.ribbon-set'), scale)
|
setElementScale($('.ribbon-set'), scale)
|
||||||
centerView(image, 'css')
|
centerView(image, 'css')
|
||||||
|
|
||||||
@ -1017,10 +1023,7 @@ function fitNImages(n, fixed_proportions){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// NOTE: here we measure image height as width may change depending on
|
|
||||||
// proportions...
|
|
||||||
function zoomIn(){
|
function zoomIn(){
|
||||||
//var w = getScreenWidthInImages(getVisibleImageSize('height'))
|
|
||||||
var w = getScreenWidthInImages()
|
var w = getScreenWidthInImages()
|
||||||
if(w > 1){
|
if(w > 1){
|
||||||
w = w / ZOOM_SCALE
|
w = w / ZOOM_SCALE
|
||||||
@ -1028,7 +1031,6 @@ function zoomIn(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function zoomOut(){
|
function zoomOut(){
|
||||||
//var w = getScreenWidthInImages(getVisibleImageSize('height'))
|
|
||||||
var w = getScreenWidthInImages()
|
var w = getScreenWidthInImages()
|
||||||
if(w <= MAX_SCREEN_IMAGES){
|
if(w <= MAX_SCREEN_IMAGES){
|
||||||
w = w * ZOOM_SCALE
|
w = w * ZOOM_SCALE
|
||||||
|
|||||||
@ -444,6 +444,7 @@ var KEYBOARD_CONFIG = {
|
|||||||
|
|
||||||
// zooming...
|
// zooming...
|
||||||
'#1': doc('Fit image to screen', function(){ fitNImages(1) }),
|
'#1': doc('Fit image to screen', function(){ fitNImages(1) }),
|
||||||
|
// XXX this will do different stuff for different proportioned screens...
|
||||||
'#2': doc('Show big image', function(){ fitNImages(1.5, true) }),
|
'#2': doc('Show big image', function(){ fitNImages(1.5, true) }),
|
||||||
'#3': doc('Show small image', function(){ fitNImages(3, true) }),
|
'#3': doc('Show small image', function(){ fitNImages(3, true) }),
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user