Skip to content

Commit 72c2b53

Browse files
author
Paul Shannon
committed
Added tests/dojox to tsconfig so it would include it in the travis build. Fixed some usage errors.
1 parent df21978 commit 72c2b53

File tree

7 files changed

+34
-6
lines changed

7 files changed

+34
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
_build
22
node_modules
33
**/node_modules
4+
tests/**/*.js

tests/dojox/1.11/gfx/Move.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
import * as gfx from 'dojox/gfx';
44
import * as Moveable from 'dojox/gfx/Moveable';
55
import * as Mover from 'dojox/gfx/Mover';
6+
import SimpleRectangle = dojox.gfx.SimpleRectangle;
67

78
let node: Node;
89
let surface = gfx.createSurface(node, 100, 100);
9-
let rect = surface.createRect();
10+
const options: SimpleRectangle = {
11+
height: 100,
12+
width: 100,
13+
x: 0,
14+
y: 0
15+
};
16+
let rect = surface.createRect(options);
1017

1118
let mover: Mover;
1219
mover = new Mover();

tests/dojox/1.11/gfx/_base.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import * as gfx from 'dojox/gfx/_base';
55
import { CubicBezierCurve, defaultCircle, Group } from 'dojox/gfx/_base';
66
import * as shape from 'dojox/gfx/shape';
7+
import SimpleEllipse = dojox.gfx.SimpleEllipse;
78

89
let node: Node;
910
let surface: gfx.Surface = gfx.createSurface(node, 100, 100);
@@ -21,7 +22,13 @@ curve2 = [1, 1, 1, 2, 2, 2];
2122
let group: Group;
2223
group = new Group();
2324
group.add(new shape.Circle(defaultCircle));
24-
group.add(group.createEllipse());
25+
const options: SimpleEllipse = {
26+
cx: 1,
27+
cy: 1,
28+
rx: 10,
29+
ry: 10
30+
};
31+
group.add(group.createEllipse(options));
2532

2633
let nodeType: string;
2734
nodeType = Group.nodeType;

tests/dojox/1.11/gfx/fx.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ anim = fx.animateFill({
1111
b: 2
1212
}
1313
});
14-

tests/dojox/1.11/gfx/gfx.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import * as gfx from 'dojox/gfx';
55
import { CubicBezierCurve, defaultCircle, Group } from 'dojox/gfx';
66
import * as shape from 'dojox/gfx/shape';
7+
import SimpleEllipse = dojox.gfx.SimpleEllipse;
78

89
let node: Node;
910
let surface: gfx.Surface = gfx.createSurface(node, 100, 100);
@@ -21,7 +22,13 @@ curve2 = [1, 1, 1, 2, 2, 2];
2122
let group: Group;
2223
group = new Group();
2324
group.add(new shape.Circle(defaultCircle));
24-
group.add(group.createEllipse());
25+
const options: SimpleEllipse = {
26+
cx: 1,
27+
cy: 1,
28+
rx: 10,
29+
ry: 10
30+
};
31+
group.add(group.createEllipse(options));
2532

2633
let nodeType: string;
2734
nodeType = Group.nodeType;

tests/dojox/1.11/gfx/shape.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
import * as gfx from 'dojox/gfx';
44
import * as shape from 'dojox/gfx/shape';
55
import { Clip, Circle, Surface } from 'dojox/gfx/shape';
6+
import SimpleCircle = dojox.gfx.SimpleCircle;
67

78
let node: Node;
89
let surface: Surface;
910
surface = gfx.createSurface(node, 100, 100);
1011

1112
let circle: shape.Circle;
1213
circle = new shape.Circle();
13-
circle = shape.Creator.createCircle();
14-
circle = surface.createCircle();
14+
const options: SimpleCircle = {
15+
cx: 1,
16+
cy: 1,
17+
r: 10
18+
};
19+
circle = shape.Creator.createCircle(options);
20+
circle = surface.createCircle(options);
1521

1622
let clip: Clip;
1723
circle.setClip(clip);

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"./dijit/**/*.ts",
1717
"./dojox/**/*.ts",
1818
"./doh/**/*.ts",
19+
"./tests/dojox/**/*.ts",
1920
"./typings/index.d.ts"
2021
]
2122
}

0 commit comments

Comments
 (0)