]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#475] bandaid for rounding error on chrome
authorScottDowne <sdowne@learn.senecac.on.ca>
Thu, 21 Apr 2011 17:03:31 +0000 (13:03 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Thu, 21 Apr 2011 17:03:31 +0000 (13:03 -0400)
players/baseplayer/popcorn.baseplayer.js

index ba0d056543a882a51e90403c2e2b73d8f57452e7..1f421d1b18a3c0ca7ce32f10e3411b7895913835 100644 (file)
         b = this._resource.getBoundingClientRect();
         
         return {
-          bottom: b.bottom,
-          left: b.left,
-          right: b.right,
-          top: b.top,
+          bottom: Math.ceil( b.bottom ),
+          left: Math.ceil( b.left ),
+          right: Math.ceil( b.right ),
+          top: Math.ceil( b.top ),
           
           //  These not guaranteed to be in there
           width: b.width || ( b.right - b.left ),
       }
     }
   };
-})( window, document );
\ No newline at end of file
+})( window, document );