Authored by ZhongW

图片限制判断

@@ -96,8 +96,8 @@ $.fn.ajaxfileupload = function(options) { @@ -96,8 +96,8 @@ $.fn.ajaxfileupload = function(options) {
96 height = $(img).height(); 96 height = $(img).height();
97 97
98 if (settings.valid_spec == true 98 if (settings.valid_spec == true
99 - && Math.abs(width - settings.width_limit) > 10  
100 - && Math.abs(height - settings.height_limit) > 10 ) { 99 + && (Math.abs(width - settings.width_limit) > 10
  100 + || Math.abs(height - settings.height_limit) > 10) ) {
101 // 图片规格超出限制 101 // 图片规格超出限制
102 settings.onComplete.apply($element, [{ 102 settings.onComplete.apply($element, [{
103 status: false, 103 status: false,