var element = $('#target_div');
element.dual_canvas_helper(config);
element.circle({name: "Colonel Mustard", x:100, y:150, r:90, color:"yellow"});
element.rect({name: "Miss Scarlett", x:100, y:130, w:100, h:20, color: "red"});
name: "Mrs. White", x:100, y:150, r:58, fill:false,
color:"white", lineWidth: 14});
name: "Mrs. Peacock", x:40, y:110, w:100, h:20,
color: "blue", lineWidth: 10, degrees:70, fill:false});
name: "Professor Plum", x1:190, y1:100, x2:10, y2:200,
color:"purple", lineWidth: 20})
points: [[210, 10], [210, 110], [290, 60]],
name: "Mr. Green", fill:false, close:false, color: "green",
lineWidth: 14, points: [[210, 10], [210, 110], [290, 60]]
name: "Pluto", text: "The Republic", font: "20px Arial",
x: 20, y:20, degrees: 5, color:"magenta"
x: 310, y: 50, side:200, font: "normal 7px Arial",
callback: function(color_array, color_string) { chosen_color = color_string; }
var tracker = element.circle({
x:0, y:0, color:"black", hide:true});
x:10, y:-10, name: "explanation",
text: "Choose a color then click an object to change its color",
var on_mouse_move = function(event) {
var name = event.canvas_name;
var location = element.event_model_location(event);
if ((chosen_color) && (name) && (location.x < 310)) {
{hide:false, x:location.x, y:location.y, color:chosen_color});
if (event.type == "click") {
element.transition(name, {color: chosen_color});
tracker.change({hide: true});
element.on_canvas_event("mousemove", on_mouse_move);
element.on_canvas_event("click", on_mouse_move);