Skip to content

Commit d346c48

Browse files
LizaRoelofsentpike3
authored andcommitted
width and height were changed up
This meant you could not change up the canvas space to make it rectangle.
1 parent c2b38b6 commit d346c48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/boid_flockers/boid_flockers/simple_continuous_canvas.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var ContinuousVisualization = function(height, width, context) {
1+
var ContinuousVisualization = function(width, height, context) {
22
var height = height;
33
var width = width;
44
var context = context;
@@ -51,7 +51,7 @@ var ContinuousVisualization = function(height, width, context) {
5151
};
5252

5353
this.resetCanvas = function() {
54-
context.clearRect(0, 0, height, width);
54+
context.clearRect(0, 0, width, height);
5555
context.beginPath();
5656
};
5757
};
@@ -80,4 +80,4 @@ var Simple_Continuous_Module = function(canvas_width, canvas_height) {
8080
canvasDraw.resetCanvas();
8181
};
8282

83-
};
83+
};

0 commit comments

Comments
 (0)