AyaWo.Web/Content/zui/dist/lib/selectable/zui.selectable.js
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* ZUI: 拖拽选择 - v1.7.0 - 2017-06-17
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2017 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
* ZUI: selectable.js [1.5.0+]
* http://zui.sexy
* ========================================================================
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
* ======================================================================== */
(function($) {
'use strict';
var name = 'zui.selectable'; // module name
// The selectable modal class
var Selectable = function(element, options) {
this.name = name;
this.$ = $(element);
this.id = $.zui.uuid();
this.selectOrder = 1;
this.selections = {};
this.getOptions(options);
this._init();
};
var isPointInner = function(x, y, a) {
return x >= a.left && x <= (a.left + a.width) && y >= a.top && y <= (a.top + a.height);
};
var isIntersectArea = function(a, b) {
var x1 = Math.max(a.left, b.left),
y1 = Math.max(a.top, b.top),
x2 = Math.min(a.left + a.width, b.left + b.width),
y2 = Math.min(a.top + a.height, b.top + b.height);
return isPointInner(x1, y1, a) && isPointInner(x2, y2, a) && isPointInner(x1, y1, b) && isPointInner(x2, y2, b);
};
// default options
Selectable.DEFAULTS = {
selector: 'li,tr,div',
trigger: '',
selectClass: 'active',
rangeStyle: {
border: '1px solid ' + ($.zui.colorset ? $.zui.colorset.primary : '#3280fc'),
backgroundColor: $.zui.colorset ? (new $.zui.Color($.zui.colorset.primary).fade(20).toCssStr()) : 'rgba(50, 128, 252, 0.2)'
},
clickBehavior: 'toggle',
ignoreVal: 3
// mouseButton: -1 // 0, 1, 2, -1, all, left, right, middle
};
// Get and init options
后面还有 247 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。