Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js |
— | — | @@ -670,11 +670,11 @@ |
671 | 671 | }; |
672 | 672 | } |
673 | 673 | // Fit the image per the provided targetWidth closure |
674 | | - /* mw.log( 'getDominateAspectTransform:: naspect:' + |
| 674 | + /*mw.log( 'getDominateAspectTransform:: naspect:' + |
675 | 675 | ( natrualSize.width / natrualSize.height ) + |
676 | 676 | ' taspect: ' + targetSize.width + '/' + targetSize.height + ' = ' + ( targetSize.width / targetSize.height ) |
677 | | - ); |
678 | | - */ |
| 677 | + );*/ |
| 678 | + |
679 | 679 | var targetAspect = ( parseFloat( targetSize.width ) / parseFloat( targetSize.height ) ) |
680 | 680 | var natrualAspect = ( natrualSize.width / natrualSize.height ); |
681 | 681 | |
— | — | @@ -682,20 +682,20 @@ |
683 | 683 | // xxx height domination here may be confused refactor this check |
684 | 684 | if( natrualAspect >= targetAspect ){ |
685 | 685 | transformCss.width = parseFloat( transformPercent ) + '%'; |
686 | | - transformCss.height = ( parseFloat( transformPercent ) * ( |
| 686 | + /*transformCss.height = ( parseFloat( transformPercent ) * ( |
687 | 687 | ( natrualSize.height / natrualSize.width ) / |
688 | 688 | ( targetSize.height / targetSize.width ) |
689 | 689 | ) |
690 | | - ) + '%'; |
| 690 | + ) + '%';*/ |
691 | 691 | } |
692 | 692 | |
693 | 693 | // Fit vertically |
694 | 694 | if(! transformCss.height || natrualAspect < targetAspect ){ |
695 | 695 | transformCss.height = parseFloat( transformPercent ) + '%'; |
696 | | - transformCss.width = ( parseFloat( transformPercent ) * |
697 | | - ( natrualSize.width / natrualSize.height ) / |
| 696 | + /*transformCss.width = ( parseFloat( transformPercent ) * |
| 697 | + ( natrualSize.height / natrualSize.width ) / |
698 | 698 | ( targetSize.width / targetSize.height ) |
699 | | - ) + '%'; |
| 699 | + ) + '%';*/ |
700 | 700 | } |
701 | 701 | return transformCss; |
702 | 702 | }, |