Closed GoogleCodeExporter closed 8 years ago
Original comment by bfatt...@gmail.com
on 4 Jan 2011 at 2:30
Original comment by bfatt...@gmail.com
on 4 Jan 2011 at 2:30
This is not necessary since it is possible to convert an existing element in an
HTML page into an HTMLElementContext, and then add the CanvasContext to that
context. For example:
{{{
// Convert an existing element into a context. Notice that the second argument
// is the *actual element* and not a jQuery object. Also note that the Id of
// the element will be assigned the object's Id, overriding any existing
element Id
var div = R.rendercontexts.HTMLElementContext.create("existingDiv",
$("div.foo")[0]);
var canvas = R.rendercontexts.CanvasContext.create("playfield", 500, 500);
// Add the canvas to the DIV element
div.add(canvas);
// Make sure the engine knows to update DIV, which will update Canvas
R.Engine.getDefaultContext().add(div);
}}}
Original comment by bfatt...@gmail.com
on 2 Jun 2011 at 1:02
Original issue reported on code.google.com by
tokei...@gmail.com
on 13 Dec 2010 at 4:23