function magnet_click(event) {
    magnet_flag = true;
    mouse_x = getMousePos(event).x;
    mouse_y = getMousePos(event).y;
}
//flags to indicate user is magnetizing 
flags to indicate user is magnetizing
flags to indicate user is magnetizing
function magnet_click(event) {
    magnet_flag = true;
    mouse_x = getMousePos(event).x;
    mouse_y = getMousePos(event).y;
}
function magnet_click ( event ) { magnet_flag = true ; mouse_x = getMousePos ( event ) . x ; mouse_y = getMousePos ( event ) . y ; }
flags to indicate user is magnetizing
flags to indicate user is magnetizing