Skip to content

Commit

Permalink
Implement tests for #697
Browse files Browse the repository at this point in the history
One currently failing due to caching issues.
  • Loading branch information
lehni committed Feb 2, 2016
1 parent 340a1e2 commit 21dce1a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/tests/Path_Bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,32 @@ test('path.strokeBounds with rectangles', function() {
new Rectangle(75, 75, 150, 150),
'path.strokeBounds');
});

test('path.strokeBounds without strokeScaling and zoomed view', function() {
var path = new Path.Circle({
center: [0, 0],
radius: 100,
strokeColor: 'black',
strokeWidth: 15,
strokeScaling: false
});

view.zoom = 2;

new Path.Rectangle({
rectangle: path.strokeBounds,
strokeColor: 'red',
strokeScaling: false
});

equals(path.strokeBounds,
new Rectangle(-103.75, -103.75, 207.5, 207.5),
'path.strokeBounds with zoomed view');

view.zoom = 1;

equals(path.strokeBounds,
new Rectangle(-107.5, -107.5, 215, 215),
'path.strokeBounds without zoomed view');
});

0 comments on commit 21dce1a

Please sign in to comment.