TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/174097

Change subject: Remove superfluous parseInt()
......................................................................

Remove superfluous parseInt()

Requires testing. If this was for rounding, we should use Math.round
or floor/ceil instead (and probably for the other corresponding dimension
as well.

Change-Id: I7ff3e85fcdb7646f9ebe62bdd7d928d46db6bac3
---
M resources/mw.MediaWikiPlayerSupport.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/97/174097/1

diff --git a/resources/mw.MediaWikiPlayerSupport.js 
b/resources/mw.MediaWikiPlayerSupport.js
index 65247dd..8d50d65 100644
--- a/resources/mw.MediaWikiPlayerSupport.js
+++ b/resources/mw.MediaWikiPlayerSupport.js
@@ -91,7 +91,7 @@
                                // Set the width height
                                // Make sure we have an accurate aspect ratio
                                if ( imageinfo.height != 0 && imageinfo.width 
!= 0 ) {
-                                       embedPlayer.height = parseInt( 
embedPlayer.width * ( imageinfo.height / imageinfo.width ) );
+                                       embedPlayer.height = embedPlayer.width 
* ( imageinfo.height / imageinfo.width );
                                }
 
                                // Update the css for the player interface
@@ -176,7 +176,7 @@
                                imgSize.height = imgSize.width = ( 
embedPlayer.controlBuilder.getOverlayWidth() < 250 ) ? 45 : 80;
                        } else {
                                imgSize.width = ( 
embedPlayer.controlBuilder.getOverlayWidth() < 250 ) ? 45 : 120;
-                               imgSize.height = parseInt( imgSize.width * ( 
embedPlayer.getHeight() / embedPlayer.getWidth() ) );
+                               imgSize.height = imgSize.width * ( 
embedPlayer.getHeight() / embedPlayer.getWidth() );
                        }
                        return $( '<div/>' ).addClass( 'creditline' )
                                .append(

-- 
To view, visit https://gerrit.wikimedia.org/r/174097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ff3e85fcdb7646f9ebe62bdd7d928d46db6bac3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to