var box; switch(arguments.length){ case 0: box = dojo.marginBox(this.node); break; case 1: box = width; break; default: box = {w: width, h: height}; break; } dojo.marginBox(this.node, box); this.surface.setDimensions(box.w, box.h); this.dirty = true; this.coords = null; return this.render();