root / trunk / web / dojo / dojox / drawing / defaults.js @ 13
History | View | Annotate | Download (2.56 KB)
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.defaults"]){ |
||
9 | dojo._hasResource["dojox.drawing.defaults"]=true; |
||
10 | dojo.provide("dojox.drawing.defaults");
|
||
11 | dojox.drawing.defaults={clickMode:true,clickable:true,current:null,currentHit:null,angleSnap:1,zAxis:false,zAxisEnabled:true,zAngle:225,renderHitLines:true,renderHitLayer:true,labelSameColor:false,useSelectedStyle:true,norm:{width:1,color:"#000000",style:"Solid",cap:"round",fill:"#CCCCCC"},selected:{width:6,color:"#00FF00"},highlighted:{width:6,color:"#FF00FF",style:"Solid",cap:"round",fill:"#E11EBB"},disabled:{width:1,color:"#666666",style:"solid",cap:"round",fill:"#cccccc"},hitNorm:{width:6,color:{r:0,g:255,b:255,a:0},style:"Solid",cap:"round",fill:{r:255,g:255,b:255,a:0}},hitSelected:{width:6,color:"#FF9900",style:"Solid",cap:"round",fill:{r:255,g:255,b:255,a:0}},hitHighlighted:{width:6,color:"#FFFF00",style:"Solid",cap:"round",fill:{r:255,g:255,b:255,a:0}},anchors:{size:10,width:2,color:"#999",style:"solid",fill:"#fff",cap:"square",minSize:10,marginZero:5},arrows:{length:30,width:16},text:{minWidth:100,deleteEmptyCreate:true,deleteEmptyModify:true,pad:3,size:"18px",family:"sans-serif",weight:"normal",color:"#000000"},textDisabled:{size:"18px",family:"sans-serif",weight:"normal",color:"#cccccc"},textMode:{create:{width:2,style:"dotted",color:"#666666",fill:null},edit:{width:1,style:"dashed",color:"#666",fill:null}},button:{norm:{"color":"#cccccc","fill":{type:"linear",x1:0,x2:0,y1:0,y2:100,colors:[{offset:0.5,color:"#ffffff"},{offset:1,color:"#e5e5e5"}]}},over:{"fill":{type:"linear",x1:0,x2:0,y1:0,y2:100,colors:[{offset:0.5,color:"#ffffff"},{offset:1,color:"#e1eaf5"}]},"color":"#92a0b3"},down:{"fill":{type:"linear",x1:0,x2:0,y1:0,y2:100,colors:[{offset:0,color:"#e1eaf5"},{offset:1,color:"#ffffff"}]},"color":"#92a0b3"},selected:{"fill":{type:"linear",x1:0,x2:0,y1:0,y2:100,colors:[{offset:0,color:"#97b4bf"},{offset:1,color:"#c8dae1"}]},"color":"#92a0b3"},icon:{norm:{fill:null,color:"#92a0b3"},selected:{fill:"#ffffff",color:"#92a0b3"}}},copy:function(){ |
||
12 | var _1=function(_2){ |
||
13 | if(typeof (_2)!="object"||_2===null||_2===undefined){ |
||
14 | return _2;
|
||
15 | } |
||
16 | var o;
|
||
17 | if(_2.push){
|
||
18 | o=[]; |
||
19 | for(var i=0;i<_2.length;i++){ |
||
20 | o.push(_1(_2[i])); |
||
21 | } |
||
22 | return o;
|
||
23 | } |
||
24 | o={}; |
||
25 | for(var nm in _2){ |
||
26 | if(nm!="copy"){ |
||
27 | if(typeof (_2[nm])=="object"){ |
||
28 | o[nm]=_1(_2[nm]); |
||
29 | }else{
|
||
30 | o[nm]=_2[nm]; |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 | return o;
|
||
35 | }; |
||
36 | var o=_1(this); |
||
37 | o.current=o.norm; |
||
38 | o.currentHit=o.hitNorm; |
||
39 | o.currentText=o.text; |
||
40 | return o;
|
||
41 | }}; |
||
42 | } |