Permalink
Browse files

Merge branch 'zoom'

  • Loading branch information...
2 parents 67094db + d97c930 commit c8a3864fae75b4e840cce5d9278f874ae8e32d52 Jason Johnston committed Sep 10, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 sources/BackgroundRenderer.js
@@ -153,6 +153,11 @@ PIE.BackgroundRenderer = PIE.RendererBase.newRenderer( {
pxY = Math.round( bgPos.y ) + bwT + 0.5;
fill.position = ( pxX / elW ) + ',' + ( pxY / elH );
+ // Set the size of the image. We have to actually set it to px values otherwise it will not honor
+ // the user's browser zoom level and always display at its natural screen size.
+ fill['size']['x'] = 1; //Can be any value, just has to be set to "prime" it so the next line works. Weird!
+ fill['size'] = size.w + 'px,' + size.h + 'px';
+
// Repeating - clip the image shape
if( repeat && repeat !== 'repeat' ) {
if( repeat === 'repeat-x' || repeat === 'no-repeat' ) {

0 comments on commit c8a3864

Please sign in to comment.