fix for fallthrough bug

This commit is contained in:
James Campos 2011-01-18 03:00:33 -08:00
parent d20a08080f
commit 7441b1a2dc
2 changed files with 3 additions and 1 deletions

View File

@ -435,6 +435,7 @@ imageResize = (cw, ch, imageType, image) ->
if iw > cw
image.style.width = '100%'
image.style.margin = '0px'
break
when 'fit screen'
ratio = Math.min cw/iw, ch/ih
if ratio < 1

View File

@ -620,8 +620,9 @@
case 'fit width':
if (iw > cw) {
image.style.width = '100%';
return image.style.margin = '0px';
image.style.margin = '0px';
}
break;
case 'fit screen':
ratio = Math.min(cw / iw, ch / ih);
if (ratio < 1) {