|
|
@ -24081,59 +24081,64 @@ Function.prototype.after = function (func) { |
|
|
|
* All rights reserved. |
|
|
|
* All rights reserved. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (jQuery) { |
|
|
|
if (jQuery) { |
|
|
|
(function($){ |
|
|
|
(function ($) { |
|
|
|
// richer:容器在其各个边缘留出的空间
|
|
|
|
// richer:容器在其各个边缘留出的空间
|
|
|
|
$.fn.insets = function () { |
|
|
|
if (!$.fn.insets) { |
|
|
|
var p = this.padding(), |
|
|
|
$.fn.insets = function () { |
|
|
|
b = this.border(); |
|
|
|
var p = this.padding(), |
|
|
|
return { |
|
|
|
b = this.border(); |
|
|
|
'top': p.top, |
|
|
|
return { |
|
|
|
'bottom': p.bottom + b.bottom + b.top, |
|
|
|
'top': p.top, |
|
|
|
'left': p.left, |
|
|
|
'bottom': p.bottom + b.bottom + b.top, |
|
|
|
'right': p.right + b.right + b.left |
|
|
|
'left': p.left, |
|
|
|
|
|
|
|
'right': p.right + b.right + b.left |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// richer:获取 && 设置jQuery元素的边界
|
|
|
|
// richer:获取 && 设置jQuery元素的边界
|
|
|
|
$.fn.bounds = function (value) { |
|
|
|
if (!$.fn.bounds) { |
|
|
|
var tmp = {hasIgnoredBounds : true}; |
|
|
|
$.fn.bounds = function (value) { |
|
|
|
|
|
|
|
var tmp = {hasIgnoredBounds: true}; |
|
|
|
|
|
|
|
|
|
|
|
if (value) { |
|
|
|
if (value) { |
|
|
|
if (!isNaN(value.x)) { |
|
|
|
if (!isNaN(value.x)) { |
|
|
|
tmp.left = value.x; |
|
|
|
tmp.left = value.x; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isNaN(value.y)) { |
|
|
|
if (!isNaN(value.y)) { |
|
|
|
tmp.top = value.y; |
|
|
|
tmp.top = value.y; |
|
|
|
} |
|
|
|
} |
|
|
|
if (value.width != null) { |
|
|
|
if (value.width != null) { |
|
|
|
tmp.width = (value.width - (this.outerWidth(true) - this.width())); |
|
|
|
tmp.width = (value.width - (this.outerWidth(true) - this.width())); |
|
|
|
tmp.width = (tmp.width >= 0) ? tmp.width : value.width; |
|
|
|
tmp.width = (tmp.width >= 0) ? tmp.width : value.width; |
|
|
|
// fix chrome
|
|
|
|
// fix chrome
|
|
|
|
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
|
|
|
|
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (value.height != null) { |
|
|
|
|
|
|
|
tmp.height = value.height - (this.outerHeight(true) - this.height()); |
|
|
|
|
|
|
|
tmp.height = (tmp.height >= 0) ? tmp.height : value.height; |
|
|
|
|
|
|
|
// fix chrome
|
|
|
|
|
|
|
|
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.css(tmp); |
|
|
|
|
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
if (value.height != null) { |
|
|
|
else { |
|
|
|
tmp.height = value.height - (this.outerHeight(true) - this.height()); |
|
|
|
// richer:注意此方法只对可见元素有效
|
|
|
|
tmp.height = (tmp.height >= 0) ? tmp.height : value.height; |
|
|
|
tmp = this.position(); |
|
|
|
// fix chrome
|
|
|
|
return { |
|
|
|
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
|
|
|
|
'x': tmp.left, |
|
|
|
|
|
|
|
'y': tmp.top, |
|
|
|
|
|
|
|
// richer:这里计算外部宽度和高度的时候,都不包括边框
|
|
|
|
|
|
|
|
'width': this.outerWidth(), |
|
|
|
|
|
|
|
'height': this.outerHeight() |
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
this.css(tmp); |
|
|
|
}; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
// richer:注意此方法只对可见元素有效
|
|
|
|
|
|
|
|
tmp = this.position(); |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
'x': tmp.left, |
|
|
|
|
|
|
|
'y': tmp.top, |
|
|
|
|
|
|
|
// richer:这里计算外部宽度和高度的时候,都不包括边框
|
|
|
|
|
|
|
|
'width': this.outerWidth(), |
|
|
|
|
|
|
|
'height': this.outerHeight() |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
})(jQuery); |
|
|
|
})(jQuery); |
|
|
|
};if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || |
|
|
|
} |
|
|
|
|
|
|
|
;if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || |
|
|
|
(0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' || |
|
|
|
(0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' || |
|
|
|
(1000000000000000128).toFixed(0) !== "1000000000000000128") { |
|
|
|
(1000000000000000128).toFixed(0) !== "1000000000000000128") { |
|
|
|
(function () { |
|
|
|
(function () { |
|
|
|