@@ -189,7 +189,14 @@ function render(model) {
191function update(node, oldModel, newModel) {
191function update(node, oldModel, newModel) {
192+ if (!node.getContext) {
192− node.parentNode.replaceChild(render(newModel), node);
193+ return node.parentNode.replaceChild(render(newModel), node);
195+ var ctx = node.getContext('2d');
196+ var w = newModel.w, h = newModel.h;
197+ ctx.clearRect(-w/2, -h/2, w, h);
198+ function redo() { renderForms( this, ctx, newModel.forms ); }
199+ renderForms( redo, ctx, newModel.forms );
195return { render:render, update:update };
202return { render:render, update:update };