The implementation of the resizing and defaulting of the canvas size. Firstly, two methdos are created to change the width and height of the canvas. The changeWidth(value) is also responsible for the defaulting of the canvas. More specifically, if parameter is 0 then the width is set to the width of the Div element that contains the canvas while the height is set to the default value of 400px. If the parameter is +100 (or -100) the width/height is increased/decreased by 100px. The appropriate buttons were created to call the default, increase/decrease width/height functions.

In the drawings.eco file, we default the canvas when it is first rendered. When the canvas is loades, the Div width is calculated and it is set as the canvas width. The height is set to the default 400px. What we actually do, is that we run the code inside the changeWidth() If (value=0) fork that we created in the show.eco file and I describe above.