CRM_EasyUI_2016/Scripts/easyui/src/jquery.resizable.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* resizable - jQuery EasyUI
*
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
*
* Licensed under the GPL or commercial licenses
* To use it on other terms please contact us: jeasyui@gmail.com
* http://www.gnu.org/licenses/gpl.txt
* http://www.jeasyui.com/license_commercial.php
*/
(function($){
var isResizing = false;
$.fn.resizable = function(options, param){
if (typeof options == 'string'){
return $.fn.resizable.methods[options](this, param);
}
function resize(e){
var resizeData = e.data;
var options = $.data(resizeData.target, 'resizable').options;
if (resizeData.dir.indexOf('e') != -1) {
var width = resizeData.startWidth + e.pageX - resizeData.startX;
width = Math.min(
Math.max(width, options.minWidth),
options.maxWidth
);
resizeData.width = width;
}
if (resizeData.dir.indexOf('s') != -1) {
var height = resizeData.startHeight + e.pageY - resizeData.startY;
height = Math.min(
Math.max(height, options.minHeight),
options.maxHeight
);
resizeData.height = height;
}
if (resizeData.dir.indexOf('w') != -1) {
resizeData.width = resizeData.startWidth - e.pageX + resizeData.startX;
if (resizeData.width >= options.minWidth && resizeData.width <= options.maxWidth) {
resizeData.left = resizeData.startLeft + e.pageX - resizeData.startX;
}
}
if (resizeData.dir.indexOf('n') != -1) {
resizeData.height = resizeData.startHeight - e.pageY + resizeData.startY;
if (resizeData.height >= options.minHeight && resizeData.height <= options.maxHeight) {
resizeData.top = resizeData.startTop + e.pageY - resizeData.startY;
}
}
}
function applySize(e){
var resizeData = e.data;
var target = resizeData.target;
$(target).css({
left: resizeData.left,
top: resizeData.top
});
$(target)._outerWidth(resizeData.width)._outerHeight(resizeData.height);
}
后面还有 161 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
