Skip to content

Commit b6c0f26

Browse files
committed
Fix paper.project access in tests.
1 parent 88e6ac0 commit b6c0f26

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

test/tests/SvgImporter.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test('make an svg line', function() {
3030
shape.setAttribute('x2', x2);
3131
shape.setAttribute('y2', y2);
3232

33-
var importedLine = project.importSvg(shape);
33+
var importedLine = paper.project.importSvg(shape);
3434

3535
var line = new Path.Line([x1, y1], [x2, y2]);
3636

@@ -45,7 +45,7 @@ test('make an svg line with invalid values', function() {
4545
shape.setAttribute('x2', null);
4646
shape.setAttribute('y2', null);
4747

48-
var importedLine = project.importSvg(shape);
48+
var importedLine = paper.project.importSvg(shape);
4949

5050
var line = new Path.Line([0, 0], [0, 0]);
5151

@@ -64,7 +64,7 @@ test('compare rectangle values', function() {
6464
shape.setAttribute('width', width);
6565
shape.setAttribute('height', height);
6666

67-
var importedRectangle = project.importSvg(shape);
67+
var importedRectangle = paper.project.importSvg(shape);
6868

6969
var topLeft = new Point(x, y);
7070
var size = new Size(width, height);
@@ -87,7 +87,7 @@ test('compare negative rectangle values', function() {
8787
shape.setAttribute('width', width);
8888
shape.setAttribute('height', height);
8989

90-
var importedRectangle = project.importSvg(shape);
90+
var importedRectangle = paper.project.importSvg(shape);
9191
var topLeft = new Point(x, y);
9292
var size = new Size(width, height);
9393
var rectangle = new Rectangle(topLeft, size);
@@ -106,7 +106,7 @@ test('compare invalid rectangle values', function() {
106106
shape.setAttribute('width', null);
107107
shape.setAttribute('height', null);
108108

109-
var importedRectangle = project.importSvg(shape);
109+
var importedRectangle = paper.project.importSvg(shape);
110110

111111
var topLeft = new Point(0, 0);
112112
var size = new Size(0, 0);
@@ -132,7 +132,7 @@ test('compare round rectangle values', function() {
132132
shape.setAttribute('width', width);
133133
shape.setAttribute('height', height);
134134

135-
var importedRectangle = project.importSvg(shape);
135+
var importedRectangle = paper.project.importSvg(shape);
136136

137137
var topLeft = new Point(x, y);
138138
var size = new Size(width, height);
@@ -159,7 +159,7 @@ test('compare negative round rectangle values', function() {
159159
shape.setAttribute('width', width);
160160
shape.setAttribute('height', height);
161161

162-
var importedRectangle = project.importSvg(shape);
162+
var importedRectangle = paper.project.importSvg(shape);
163163

164164
var topLeft = new Point(x, y);
165165
var size = new Size(width, height);
@@ -186,7 +186,7 @@ test('compare invalid round rectangle values', function() {
186186
shape.setAttribute('width', width);
187187
shape.setAttribute('height', height);
188188

189-
var importedRectangle = project.importSvg(shape);
189+
var importedRectangle = paper.project.importSvg(shape);
190190

191191
var topLeft = new Point(x, y);
192192
var size = new Size(width, height);
@@ -209,7 +209,7 @@ test('compare ellipse values', function() {
209209
shape.setAttribute('rx', rx);
210210
shape.setAttribute('ry', ry);
211211

212-
var importedEllipse = project.importSvg(shape);
212+
var importedEllipse = paper.project.importSvg(shape);
213213

214214
var center = new Point(cx, cy);
215215
var offset = new Point(rx, ry);
@@ -234,7 +234,7 @@ test('compare negative ellipse values', function() {
234234
shape.setAttribute('rx', rx);
235235
shape.setAttribute('ry', ry);
236236

237-
var importedEllipse = project.importSvg(shape);
237+
var importedEllipse = paper.project.importSvg(shape);
238238

239239
var center = new Point(cx, cy);
240240
var offset = new Point(rx, ry);
@@ -255,7 +255,7 @@ test('compare invalid ellipse values', function() {
255255
shape.setAttribute('rx', null);
256256
shape.setAttribute('ry', null);
257257

258-
var importedEllipse = project.importSvg(shape);
258+
var importedEllipse = paper.project.importSvg(shape);
259259

260260
var center = new Point(0, 0);
261261
var offset = new Point(0, 0);
@@ -278,7 +278,7 @@ test('compare circle values', function() {
278278
shape.setAttribute('cy', cy);
279279
shape.setAttribute('r', r);
280280

281-
var importedCircle = project.importSvg(shape);
281+
var importedCircle = paper.project.importSvg(shape);
282282

283283
var center = new Point(cx, cy);
284284
var circle = new Path.Circle(center, r);
@@ -296,7 +296,7 @@ test('compare negative circle values', function() {
296296
shape.setAttribute('cy', cy);
297297
shape.setAttribute('r', r);
298298

299-
var importedCircle = project.importSvg(shape);
299+
var importedCircle = paper.project.importSvg(shape);
300300

301301
var center = new Point(cx, cy);
302302
var circle = new Path.Circle(center, r);
@@ -312,7 +312,7 @@ test('compare invalid circle values', function() {
312312
shape.setAttribute('cy', null);
313313
shape.setAttribute('r', null);
314314

315-
var importedCircle = project.importSvg(shape);
315+
var importedCircle = paper.project.importSvg(shape);
316316

317317
var center = new Point(0, 0);
318318
var circle = new Path.Circle(center, 0);
@@ -327,7 +327,7 @@ test('compare polygon values', function() {
327327
var svgpoints = "100,10 40,180 190,60 10,60 160,180";
328328
shape.setAttribute('points', svgpoints);
329329

330-
var importedPolygon = project.importSvg(shape);
330+
var importedPolygon = paper.project.importSvg(shape);
331331

332332
var poly = new Path();
333333
var points = shape.points;
@@ -348,7 +348,7 @@ test('compare negative polygon values', function() {
348348
var svgpoints = "-100,-10 -40,-180 -190,-60 -10,-60 -160,-180";
349349
shape.setAttribute('points', svgpoints);
350350

351-
var importedPolygon = project.importSvg(shape);
351+
var importedPolygon = paper.project.importSvg(shape);
352352

353353
var poly = new Path();
354354
var points = shape.points;
@@ -369,7 +369,7 @@ test('compare polyline values', function() {
369369
var svgpoints = "5,5 45,45 5,45 45,5";
370370
shape.setAttribute('points', svgpoints);
371371

372-
var importedPolyline = project.importSvg(shape);
372+
var importedPolyline = paper.project.importSvg(shape);
373373

374374
var poly = new Path();
375375
var points = shape.points;
@@ -390,7 +390,7 @@ test('compare negative polyline values', function() {
390390
var svgpoints = "-5,-5 -45,-45 -5,-45 -45,-5";
391391
shape.setAttribute('points', svgpoints);
392392

393-
var importedPolyline = project.importSvg(shape);
393+
var importedPolyline = paper.project.importSvg(shape);
394394

395395
var poly = new Path();
396396
var points = shape.points;

0 commit comments

Comments
 (0)