-
Notifications
You must be signed in to change notification settings - Fork 0
/
canvasWithEvents.js
50 lines (50 loc) · 1.73 KB
/
canvasWithEvents.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
define([
"gfx/canvas",
"gfx/canvas/_base",
"./canvasWithEvents/Shape",
"./canvasWithEvents/Container",
"./canvasWithEvents/Surface",
"./canvasWithEvents/Group",
"./canvasWithEvents/Rect",
"./canvasWithEvents/Ellipse",
"./canvasWithEvents/Circle",
"./canvasWithEvents/Line",
"./canvasWithEvents/Polyline",
"./canvasWithEvents/Image",
"./canvasWithEvents/Path",
"./canvasWithEvents/Text",
"./canvasWithEvents/TextPath",
"./canvasWithEvents/Creator"
], function(canvasRenderer, canvas, Shape, Container, Surface, Group, Rect, Ellipse, Circle, Line, Polyline, Image, Path, Text, TextPath, Creator){
return {
// summary:
// This the graphics rendering bridge for W3C Canvas compliant browsers.
// Since Canvas is an immediate mode graphics api, with no object graph or
// eventing capabilities, use of this module alone will only add in drawing support.
// The additional module, canvasWithEvents extends this module with additional support
// for handling events on Canvas. By default, the support for events is now included
// however, if only drawing capabilities are needed, canvas event module can be disabled
// using the dojoConfig option, canvasEvents:true|false.
// The id of the Canvas renderer is 'canvas'. This id can be used when switch Dojo's
// graphics context between renderer implementations. See gfx/_base.switchRenderer
// API.
id: "canvasWithEvents",
Shape: Shape,
Container: Container,
Surface: Surface,
Group: Group,
Rect: Rect,
Ellipse: Ellipse,
Circle: Circle,
Line: Line,
Polyline: Polyline,
Image: Image,
Path: Path,
Text: Text,
TextPath: TextPath,
Creator: Creator,
createSurface: function(node, width, height){
return new Surface(node, width, height);
}
};
});