summaryrefslogtreecommitdiff
path: root/itjs/it.js
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2008-10-07 13:06:10 +0000
committerThomas BrĂ¼derli2008-10-07 13:06:10 +0000
commit0f392cf619e6c5227f47c497c4049d4d23c681a6 (patch)
treed047b4a5aa7de338d649c3daa8cc8459bb45d9d1 /itjs/it.js
parent9b06a4bae8933c29015616177872a90cac5ef177 (diff)
downloaditools-0f392cf619e6c5227f47c497c4049d4d23c681a6.tar.gz
itools-0f392cf619e6c5227f47c497c4049d4d23c681a6.tar.bz2
itools-0f392cf619e6c5227f47c497c4049d4d23c681a6.zip
Make png-filter mode configurable by the app
Diffstat (limited to 'itjs/it.js')
-rw-r--r--itjs/it.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/itjs/it.js b/itjs/it.js
index 407688c..9727cb8 100644
--- a/itjs/it.js
+++ b/itjs/it.js
@@ -210,13 +210,13 @@ function it_url_encode(str)
/**
* Patch PNG transparency for IE 5.5-6 on the given image
*/
-function it_pngfix(img, w, h)
+function it_pngfix(img, w, h, mode)
{
var old_IE = navigator.platform == "Win32" && String(navigator.userAgent).match(/MSIE ((5\.5)|6)/);
if (img.src && img.src.match(/\.png($|\?)/) && old_IE) {
img.style.width = (w || img.width) + 'px';
img.style.height = (h || img.height) + 'px';
- img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='crop')";
+ img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='"+(mode ? mode : 'crop')+"')";
img.src = '/images/0.gif';
}
else if (img && old_IE)