Skip to content
This repository
  • 1 commit
  • 1 file changed
  • 0 comments
  • 1 contributor
Sep 05, 2011
Jason Johnston Partial fix for issue #79: explicitly set the size of the background …
…image fill tile in pixels so that IE will automatically adjust it to the user's zoom level.
d97c930

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 sources/BackgroundRenderer.js
5 sources/BackgroundRenderer.js
@@ -153,6 +153,11 @@ PIE.BackgroundRenderer = PIE.RendererBase.newRenderer( {
153 153 pxY = Math.round( bgPos.y ) + bwT + 0.5;
154 154 fill.position = ( pxX / elW ) + ',' + ( pxY / elH );
155 155
  156 + // Set the size of the image. We have to actually set it to px values otherwise it will not honor
  157 + // the user's browser zoom level and always display at its natural screen size.
  158 + fill['size']['x'] = 1; //Can be any value, just has to be set to "prime" it so the next line works. Weird!
  159 + fill['size'] = size.w + 'px,' + size.h + 'px';
  160 +
156 161 // Repeating - clip the image shape
157 162 if( repeat && repeat !== 'repeat' ) {
158 163 if( repeat === 'repeat-x' || repeat === 'no-repeat' ) {

No commit comments for this range

Something went wrong with that request. Please try again.