func (c *Canvas) UpdateSize(width int) {
	c.draw.width = width
	c.draw.textOffset = (c.draw.tileLength * 3) / 20
	c.draw.unusedMin.x = padding
	c.draw.unusedMin.y = c.draw.tileLength
	c.draw.usedMin.x = padding
	c.draw.usedMin.y = c.draw.tileLength * 4
	c.draw.numCols = (c.draw.width - 2*padding) / c.draw.tileLength
	c.draw.numRows = 500 / c.draw.numCols
	c.draw.height = c.draw.usedMin.y + c.draw.numRows*c.draw.tileLength
	c.element.Set("width", c.draw.width)
	c.element.Set("height", c.draw.height)
	c.parentDiv.Set("width", c.draw.width)
	c.parentDiv.Set("height", c.draw.height)
	c.ctx.SetFont(strconv.Itoa(c.draw.tileLength) + "px sans-serif")
	c.ctx.SetLineWidth(float64(c.draw.tileLength) / 10)
}
// UpdateSize sets the draw properties of the canvas for it's current size in the window.
UpdateSize sets the draw properties of the canvas for it's current size in the window.
// UpdateSize sets the draw properties of the canvas for it ' s current size in the window .
func (c *Canvas) UpdateSize(width int) {
	c.draw.width = width
	c.draw.textOffset = (c.draw.tileLength * 3) / 20
	c.draw.unusedMin.x = padding
	c.draw.unusedMin.y = c.draw.tileLength
	c.draw.usedMin.x = padding
	c.draw.usedMin.y = c.draw.tileLength * 4
	c.draw.numCols = (c.draw.width - 2*padding) / c.draw.tileLength
	c.draw.numRows = 500 / c.draw.numCols
	c.draw.height = c.draw.usedMin.y + c.draw.numRows*c.draw.tileLength
	c.element.Set("width", c.draw.width)
	c.element.Set("height", c.draw.height)
	c.parentDiv.Set("width", c.draw.width)
	c.parentDiv.Set("height", c.draw.height)
	c.ctx.SetFont(strconv.Itoa(c.draw.tileLength) + "px sans-serif")
	c.ctx.SetLineWidth(float64(c.draw.tileLength) / 10)
}
func ( c * Canvas ) UpdateSize ( width int ) { c . draw . width = width c . draw . textOffset = ( c . draw . tileLength * 3 ) / 20 c . draw . unusedMin . x = padding c . draw . unusedMin . y = c . draw . tileLength c . draw . usedMin . x = padding c . draw . usedMin . y = c . draw . tileLength * 4 c . draw . numCols = ( c . draw . width - 2 * padding ) / c . draw . tileLength c . draw . numRows = 500 / c . draw . numCols c . draw . height = c . draw . usedMin . y + c . draw . numRows * c . draw . tileLength c . element . Set ( " " , c . draw . width ) c . element . Set ( " " , c . draw . height ) c . parentDiv . Set ( " " , c . draw . width ) c . parentDiv . Set ( " " , c . draw . height ) c . ctx . SetFont ( strconv . Itoa ( c . draw . tileLength ) + " " ) c . ctx . SetLineWidth ( float64 ( c . draw . tileLength ) / 10 ) }
UpdateSize sets the draw properties of the canvas for it's current size in the window.
UpdateSize sets the draw properties of the canvas for it ' s current size in the window .