fix for fallthrough bug
This commit is contained in:
parent
d20a08080f
commit
7441b1a2dc
@ -435,6 +435,7 @@ imageResize = (cw, ch, imageType, image) ->
|
|||||||
if iw > cw
|
if iw > cw
|
||||||
image.style.width = '100%'
|
image.style.width = '100%'
|
||||||
image.style.margin = '0px'
|
image.style.margin = '0px'
|
||||||
|
break
|
||||||
when 'fit screen'
|
when 'fit screen'
|
||||||
ratio = Math.min cw/iw, ch/ih
|
ratio = Math.min cw/iw, ch/ih
|
||||||
if ratio < 1
|
if ratio < 1
|
||||||
|
|||||||
@ -620,8 +620,9 @@
|
|||||||
case 'fit width':
|
case 'fit width':
|
||||||
if (iw > cw) {
|
if (iw > cw) {
|
||||||
image.style.width = '100%';
|
image.style.width = '100%';
|
||||||
return image.style.margin = '0px';
|
image.style.margin = '0px';
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case 'fit screen':
|
case 'fit screen':
|
||||||
ratio = Math.min(cw / iw, ch / ih);
|
ratio = Math.min(cw / iw, ch / ih);
|
||||||
if (ratio < 1) {
|
if (ratio < 1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user