webui-aria2/js/libs/dojox/drawing/manager/_registry.js.uncompressed.js
2012-05-01 19:52:07 +08:00

36 lines
808 B
JavaScript

//>>built
// wrapped by build app
define("dojox/drawing/manager/_registry", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.manager._registry");
(function(){
var _registered = {
tool:{},
stencil:{},
drawing:{},
plugin:{},
button:{}
};
dojox.drawing.register = function(item, type){
if(type=="drawing"){
_registered.drawing[item.id] = item;
}else if(type=="tool"){
_registered.tool[item.name] = item;
}else if(type=="stencil"){
_registered.stencil[item.name] = item;
}else if(type=="plugin"){
_registered.plugin[item.name] = item;
}else if(type=="button"){
_registered.button[item.toolType] = item;
}
};
dojox.drawing.getRegistered = function(type, id){
return id ? _registered[type][id] : _registered[type];
}
})();
});