thanhlong203 / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.style.setWidth / setHeight should work on canvas objects #247

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call goog.style.setWidth(goog.dom.getElement('canvas_element_id'), width)
2. Nothing happens, expect width to be set

What is the expected output? What do you see instead?
Ideally setWidth/setHeight should determine wether the Element is a canvas 
element.  If it is call element.setAttribute('width', width);

What version of the product are you using? On what operating system?
Latest trunk

Original issue reported on code.google.com by guido.tapia@gmail.com on 20 Dec 2010 at 9:13

GoogleCodeExporter commented 8 years ago
goog.style.setWidth is meant for updating elem.style.width.  You can just 
assign canvas.width if you want to. changing the style of a canvas will still 
resize it.  If not, please give us a description of browser/OS for which it 
doesn't work.

Original comment by nn...@google.com on 27 Apr 2012 at 10:15

GoogleCodeExporter commented 8 years ago

Original comment by nn...@google.com on 27 Apr 2012 at 10:16