window/jquery.treeview/jquery.treeview.sortable.js
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* jQuery UI Sortable
*
* Copyright (c) 2008 Paul Bakaus
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Sortables
*
* Depends:
* ui.base.js
*
* Revision: $Id: ui.sortable.js 5262 2008-04-17 13:13:51Z paul.bakaus $
*/
;(function($) {
if (window.Node && Node.prototype && !Node.prototype.contains) {
Node.prototype.contains = function (arg) {
return !!(this.compareDocumentPosition(arg) & 16);
};
}
$.widget("ui.sortableTree", $.extend($.ui.mouse, {
init: function() {
//Initialize needed constants
var self = this, o = this.options;
this.containerCache = {};
this.element.addClass("ui-sortableTree");
//Get the items
this.refresh();
//Let's determine the parent's offset
if(!(/(relative|absolute|fixed)/).test(this.element.css('position'))) this.element.css('position', 'relative');
this.offset = this.element.offset();
//Initialize mouse events for interaction
this.mouseInit();
//Prepare cursorAt
if(o.cursorAt && o.cursorAt.constructor == Array)
o.cursorAt = { left: o.cursorAt[0], top: o.cursorAt[1] };
},
plugins: {},
ui: function(inst) {
return {
helper: (inst || this)["helper"],
position: (inst || this)["position"].current,
absolutePosition: (inst || this)["position"].absolute,
instance: this,
options: this.options,
element: this.element,
item: (inst || this)["currentItem"],
sender: inst ? inst.element : null
};
},
propagate: function(n,e,inst) {
后面还有 318 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。