jquery-imagepreview
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -47,3 +47,3 @@ /** | ||
var file = $(options.file)[0], | ||
img = $(options.img)[0], | ||
img = $(options.img), | ||
preloadImg = $('<img style="position:absolute;top:-9999px;left:-9999px;visibility:hidden;" />').appendTo(document.body)[0], | ||
@@ -59,5 +59,7 @@ blankSrc = $.browser.msie && $.browser.version <= 7 ? | ||
); | ||
img.style.width = Math.round(width * ratio) + 'px'; | ||
img.style.height = Math.round(height * ratio) + 'px'; | ||
img.src = src; | ||
$.each(img, function(i, n){ | ||
n.style.width = Math.round(width * ratio) + 'px'; | ||
n.style.height = Math.round(height * ratio) + 'px'; | ||
n.src = src; | ||
}); | ||
} | ||
@@ -70,3 +72,5 @@ // get image size and show image | ||
showImg(blankSrc, preloadImg.offsetWidth, preloadImg.offsetHeight); | ||
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale',src=\"" + src + "\")"; | ||
$.each(img, function(i, n){ | ||
n.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale',src=\"" + src + "\")"; | ||
}); | ||
} else { | ||
@@ -73,0 +77,0 @@ preloadImg.onload = function() { |
{ | ||
"name": "jquery-imagepreview", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "基于jquery实现的本地图片预览功能", | ||
@@ -5,0 +5,0 @@ "main": "jquery.imagepreview.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102071
7
376
1