http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72320
Revision: 72320
Author: dale
Date: 2010-09-03 22:00:15 +0000 (Fri, 03 Sep 2010)
Log Message:
-----------
fixed dominate aspect ratio calculation to just let the browser determine the
non-domintate size
Modified Paths:
--------------
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
2010-09-03 21:53:02 UTC (rev 72319)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
2010-09-03 22:00:15 UTC (rev 72320)
@@ -670,11 +670,11 @@
};
}
// Fit the image per the provided targetWidth closure
- /* mw.log( 'getDominateAspectTransform:: naspect:' +
+ /*mw.log( 'getDominateAspectTransform:: naspect:' +
( natrualSize.width / natrualSize.height ) +
' taspect: ' + targetSize.width + '/' +
targetSize.height + ' = ' + ( targetSize.width / targetSize.height )
- );
- */
+ );*/
+
var targetAspect = ( parseFloat( targetSize.width ) /
parseFloat( targetSize.height ) )
var natrualAspect = ( natrualSize.width / natrualSize.height );
@@ -682,20 +682,20 @@
// xxx height domination here may be confused refactor this
check
if( natrualAspect >= targetAspect ){
transformCss.width = parseFloat( transformPercent ) +
'%';
- transformCss.height = ( parseFloat( transformPercent )
* (
+ /*transformCss.height = ( parseFloat( transformPercent
) * (
( natrualSize.height /
natrualSize.width ) /
( targetSize.height /
targetSize.width )
)
- ) + '%';
+ ) + '%';*/
}
// Fit vertically
if(! transformCss.height || natrualAspect < targetAspect ){
transformCss.height = parseFloat( transformPercent ) +
'%';
- transformCss.width = ( parseFloat( transformPercent ) *
- ( natrualSize.width /
natrualSize.height ) /
+ /*transformCss.width = ( parseFloat( transformPercent )
*
+ ( natrualSize.height /
natrualSize.width ) /
( targetSize.width / targetSize.height )
- ) + '%';
+ ) + '%';*/
}
return transformCss;
},
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs