flymis/WebRoot/dojojs/src/widget/TreeDndControllerV3.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.TreeDndControllerV3");
dojo.require("dojo.dnd.TreeDragAndDropV3");
dojo.widget.defineWidget(
"dojo.widget.TreeDndControllerV3",
[dojo.widget.HtmlWidget, dojo.widget.TreeCommon],
function() {
this.dragSources = {};
this.dropTargets = {};
this.listenedTrees = {};
},
{
listenTreeEvents: ["afterChangeTree","beforeTreeDestroy", "afterAddChild"],
listenNodeFilter: function(elem) { return elem instanceof dojo.widget.Widget},
initialize: function(args) {
this.treeController = dojo.lang.isString(args.controller) ? dojo.widget.byId(args.controller) : args.controller;
if (!this.treeController) {
dojo.raise("treeController must be declared");
}
},
onBeforeTreeDestroy: function(message) {
this.unlistenTree(message.source);
},
// first Dnd registration happens in addChild
// because I have information about parent on this stage and can use it
// to check locking or other things
onAfterAddChild: function(message) {
//dojo.debug("Dnd addChild "+message.child);
this.listenNode(message.child);
},
onAfterChangeTree: function(message) {
/* catch new nodes on afterAddChild, because I need parent */
if (!message.oldTree) return;
//dojo.debug("HERE");
if (!message.newTree || !this.listenedTrees[message.newTree.widgetId]) {
this.processDescendants(message.node, this.listenNodeFilter, this.unlistenNode);
}
if (!this.listenedTrees[message.oldTree.widgetId]) {
后面还有 77 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。