root / trunk / web / dojo / dojox / drawing / manager / _registry.js
History | View | Annotate | Download (810 Bytes)
1 | 9 | andrej.cim | /*
|
---|---|---|---|
2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||
3 | Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||
4 | see: http://dojotoolkit.org/license for details
|
||
5 | */
|
||
6 | |||
7 | |||
8 | if(!dojo._hasResource["dojox.drawing.manager._registry"]){ |
||
9 | dojo._hasResource["dojox.drawing.manager._registry"]=true; |
||
10 | dojo.provide("dojox.drawing.manager._registry");
|
||
11 | (function(){
|
||
12 | var _1={tool:{},stencil:{},drawing:{},plugin:{},button:{}}; |
||
13 | dojox.drawing.register=function(_2,_3){ |
||
14 | if(_3=="drawing"){ |
||
15 | _1.drawing[_2.id]=_2; |
||
16 | }else{
|
||
17 | if(_3=="tool"){ |
||
18 | _1.tool[_2.name]=_2; |
||
19 | }else{
|
||
20 | if(_3=="stencil"){ |
||
21 | _1.stencil[_2.name]=_2; |
||
22 | }else{
|
||
23 | if(_3=="plugin"){ |
||
24 | _1.plugin[_2.name]=_2; |
||
25 | }else{
|
||
26 | if(_3=="button"){ |
||
27 | _1.button[_2.toolType]=_2; |
||
28 | } |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 | }; |
||
34 | dojox.drawing.getRegistered=function(_4,id){ |
||
35 | return id?_1[_4][id]:_1[_4];
|
||
36 | }; |
||
37 | })(); |
||
38 | } |