Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit d97c93097d5ed0dc880a5d432e70ee097c9da7f9 1 parent 401e817
Jason Johnston authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 sources/BackgroundRenderer.js
View
5 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' ) {
Please sign in to comment.
Something went wrong with that request. Please try again.