mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9ade2d1dda
commit
0fdea710a7
@ -2257,24 +2257,27 @@ var RibbonsPrototype = {
|
||||
// non-square image...
|
||||
if(w != h){
|
||||
|
||||
// NOTE: we need to use the default (CSS) value when
|
||||
// possible, to avoid sizing issues...
|
||||
var dfl_w = image[0].style.width == ''
|
||||
var dfl_h = image[0].style.height == ''
|
||||
|
||||
var image_p = w > h ? 'landscape' : 'portrait'
|
||||
|
||||
// when the image is turned 90deg/270deg and its
|
||||
// proportions are the same as the screen...
|
||||
if((o == 90 || o == 270) && image_p == viewer_p){
|
||||
image.css({
|
||||
width: h,
|
||||
height: w,
|
||||
width: dfl_h ? '' : h,
|
||||
height: dfl_w ? '' : w,
|
||||
|
||||
margin: -((w - h)/2) +'px '+ (w - h)/2 + 'px'
|
||||
})
|
||||
|
||||
} else if((o == 0 || o == 180) && image_p != viewer_p){
|
||||
image.css({
|
||||
//width: h,
|
||||
//height: w,
|
||||
width: '',
|
||||
height: '',
|
||||
width: dfl_h ? '' : h,
|
||||
height: dfl_w ? '' : w,
|
||||
|
||||
margin: '',
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user