Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
if(!dojo._hasResource["dojox.gfx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2
dojo._hasResource["dojox.gfx"] = true;
3
dojo.provide("dojox.gfx");
4
 
5
dojo.require("dojox.gfx.matrix");
6
dojo.require("dojox.gfx._base");
7
 
8
(function(){
9
	var renderers = (typeof djConfig["gfxRenderer"] == "string" ?
10
		djConfig["gfxRenderer"] : "svg,vml,silverlight,canvas").split(",");
11
	for(var i = 0; i < renderers.length; ++i){
12
		switch(renderers[i]){
13
			case "svg":
14
				//TODO: need more comprehensive test for SVG
15
				if(!dojo.isIE && (navigator.userAgent.indexOf("iPhone") < 0) && (navigator.userAgent.indexOf("iPod") < 0)){ dojox.gfx.renderer = "svg"; }
16
				break;
17
			case "vml":
18
				if(dojo.isIE != 0){ dojox.gfx.renderer = "vml"; }
19
				break;
20
			case "silverlight":
21
				//TODO: need more comprehensive test for Silverlight
22
				if(window.Silverlight){ dojox.gfx.renderer = "silverlight"; }
23
				break;
24
			case "canvas":
25
				//TODO: need more comprehensive test for Canvas
26
				if(dojo.isIE == 0){ dojox.gfx.renderer = "canvas"; }
27
				break;
28
		}
29
		if(dojox.gfx.renderer){ break; }
30
	}
31
})();
32
 
33
// include a renderer conditionally
34
dojo.requireIf(dojox.gfx.renderer == "svg", "dojox.gfx.svg");
35
dojo.requireIf(dojox.gfx.renderer == "vml", "dojox.gfx.vml");
36
dojo.requireIf(dojox.gfx.renderer == "silverlight", "dojox.gfx.silverlight");
37
dojo.requireIf(dojox.gfx.renderer == "canvas", "dojox.gfx.canvas");
38
 
39
}