I've been noticing for some time that grabbing the handle only works correctly at zoom=1. At other zooms the handle jumps immediately on mouse button down. Should now be fixed.
In on.mouse_press: Move.xoff = mouse_x-vx(node.x) In on.update: node.x = sx(mouse_x-Move.xoff)
When mouse_x stays the same in both, these formulae are now inverses of each other.
W2GO5IRO6GKXJPNWUAB3UNWRXE2XIWODJDKOG3LXZ53J5DMDXYHQC
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x()-Move.xoff)
Move.node.y = sy(App.mouse_y()-Move.yoff)
B()
return
end
end
{"A":831,"move_candidate_to_front_of_manifest":632,"Spawn_point":822,"keychord_press_on_manifest_navigator":765,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"Mouse_cursor":559,"manifest_coord":636,"manifest_index":637,"set_mouse_cursor":562,"manifest_navigator_candidates":638,"draw_ticks":862,"add_def_to_menu":640,"line_height":365,"Definition_background_color":849,"box_height":680,"order_of_magnitude":573,"compute_layout":385,"definition_background_color":859,"on.code_change":924,"approximate":579,"load_manifest":694,"on":1,"get_manifest":768,"approximate_up":658,"snapshot_canvas":913,"Save_viewport":865,"draw_cursor":639,"Ticks_font":669,"zoom_out":908,"Zoomed_out":869,"update_editor_box":711,"initialize_editor":678,"zoom_in":920,"get_default_map":937,"on.mouse_press":916,"fw_app":"driver","on.save_settings":742,"num_lines_for_manifest_navigator":676,"Manifest_navigator":495,"on.code_submit":927,"initialize_manifest_navigator":773,"Menu_background_color":611,"animate_next_frame":915,"Menu_border_color":612,"y_of_schema1":364,"Menu_command_color":613,"Manifest":769,"Menu_highlight_color":614,"copy_viewport":866,"draw_menu_bar":861,"font":353,"add_hotkey_to_menu":616,"animate_next":914,"get_multiple_definitions_from_app":783,"Num_animation_frames":840,"survey_animation":906,"on.load_settings":940,"wait_for_response":781,"on.text_input":855,"fw_parent":944,"sx":544,"maybe_update_key_in_definitions":529,"vx":545,"sy":469,"load_definition":854,"scale":712,"Animating":842,"text_input_on_manifest_navigator":634,"schema1_of_y":667,"tick_spec":660,"on.key_release":720,"on.draw":932,"Page":475,"draw_run_time_error":808,"new_definition":848,"undo_zoom_out":921,"add_thick_line":400,"B":830,"copy_shape":396,"on_handle":547,"Failing_test_definition_background_color":925,"vy":546,"draw_manifest_navigator":677,"draw_test_failure_indicator":935,"on_text":539,"draw_load_time_error":929,"table_and_array_both_empty":689,"reset_manifest_navigator":772,"Cursor_node":172,"on.mouse_release":836,"load_from_iterator":670,"on.update":945,"get_definition_from_app":784,"on.keychord_press":919,"Viewport":604,"Test_definition_background_color":858,"surface_bounds":814,"manifest_navigator_up":628,"Definitions":503,"manifest_navigator_down":635,"Surface":422,"on.initialize":807,"delete_definition":673}
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x()-Move.xoff)
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"A":831,"move_candidate_to_front_of_manifest":632,"Spawn_point":822,"keychord_press_on_manifest_navigator":765,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"Mouse_cursor":559,"manifest_coord":636,"manifest_index":637,"set_mouse_cursor":562,"manifest_navigator_candidates":638,"draw_ticks":862,"add_def_to_menu":640,"line_height":365,"Definition_background_color":849,"box_height":680,"order_of_magnitude":573,"compute_layout":385,"definition_background_color":859,"on.code_change":924,"approximate":579,"load_manifest":694,"on":1,"get_manifest":768,"approximate_up":658,"snapshot_canvas":913,"Save_viewport":865,"draw_cursor":639,"Ticks_font":669,"zoom_out":908,"Zoomed_out":869,"update_editor_box":711,"initialize_editor":678,"zoom_in":920,"get_default_map":937,"on.mouse_press":916,"fw_app":"driver","on.save_settings":742,"num_lines_for_manifest_navigator":676,"Manifest_navigator":495,"on.code_submit":927,"initialize_manifest_navigator":773,"Menu_background_color":611,"animate_next_frame":915,"Menu_border_color":612,"y_of_schema1":364,"Menu_command_color":613,"Manifest":769,"Menu_highlight_color":614,"copy_viewport":866,"draw_menu_bar":861,"font":353,"add_hotkey_to_menu":616,"animate_next":914,"get_multiple_definitions_from_app":783,"Num_animation_frames":840,"survey_animation":906,"on.load_settings":940,"wait_for_response":781,"on.text_input":855,"fw_parent":943,"sx":544,"maybe_update_key_in_definitions":529,"vx":545,"sy":469,"load_definition":854,"scale":712,"Animating":842,"text_input_on_manifest_navigator":634,"schema1_of_y":667,"tick_spec":660,"on.key_release":720,"on.draw":932,"Page":475,"draw_run_time_error":808,"new_definition":848,"undo_zoom_out":921,"add_thick_line":400,"B":830,"copy_shape":396,"on_handle":547,"Failing_test_definition_background_color":925,"vy":546,"draw_manifest_navigator":677,"draw_test_failure_indicator":935,"on_text":539,"draw_load_time_error":929,"table_and_array_both_empty":689,"reset_manifest_navigator":772,"Cursor_node":172,"on.mouse_release":836,"load_from_iterator":670,"on.update":944,"get_definition_from_app":784,"on.keychord_press":919,"Viewport":604,"Test_definition_background_color":858,"surface_bounds":814,"manifest_navigator_up":628,"Definitions":503,"manifest_navigator_down":635,"Surface":422,"on.initialize":807,"delete_definition":673}
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-Move.xoff
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"A":831,"move_candidate_to_front_of_manifest":632,"Spawn_point":822,"keychord_press_on_manifest_navigator":765,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"Mouse_cursor":559,"manifest_coord":636,"manifest_index":637,"set_mouse_cursor":562,"manifest_navigator_candidates":638,"draw_ticks":862,"add_def_to_menu":640,"line_height":365,"Definition_background_color":849,"box_height":680,"order_of_magnitude":573,"compute_layout":385,"definition_background_color":859,"on.code_change":924,"approximate":579,"load_manifest":694,"on":1,"get_manifest":768,"approximate_up":658,"snapshot_canvas":913,"Save_viewport":865,"draw_cursor":639,"Ticks_font":669,"zoom_out":908,"Zoomed_out":869,"update_editor_box":711,"initialize_editor":678,"zoom_in":920,"get_default_map":937,"on.mouse_press":916,"fw_app":"driver","on.save_settings":742,"num_lines_for_manifest_navigator":676,"Manifest_navigator":495,"on.code_submit":927,"initialize_manifest_navigator":773,"Menu_background_color":611,"animate_next_frame":915,"Menu_border_color":612,"y_of_schema1":364,"Menu_command_color":613,"Manifest":769,"Menu_highlight_color":614,"copy_viewport":866,"draw_menu_bar":861,"font":353,"add_hotkey_to_menu":616,"animate_next":914,"get_multiple_definitions_from_app":783,"Num_animation_frames":840,"survey_animation":906,"on.load_settings":940,"wait_for_response":781,"on.text_input":855,"fw_parent":942,"sx":544,"maybe_update_key_in_definitions":529,"vx":545,"sy":469,"load_definition":854,"scale":712,"Animating":842,"text_input_on_manifest_navigator":634,"schema1_of_y":667,"tick_spec":660,"on.key_release":720,"on.draw":932,"Page":475,"draw_run_time_error":808,"new_definition":848,"undo_zoom_out":921,"add_thick_line":400,"B":830,"copy_shape":396,"on_handle":547,"Failing_test_definition_background_color":925,"vy":546,"draw_manifest_navigator":677,"draw_test_failure_indicator":935,"on_text":539,"draw_load_time_error":929,"table_and_array_both_empty":689,"reset_manifest_navigator":772,"Cursor_node":172,"on.mouse_release":836,"load_from_iterator":670,"on.update":943,"get_definition_from_app":784,"on.keychord_press":919,"Viewport":604,"Test_definition_background_color":858,"surface_bounds":814,"manifest_navigator_up":628,"Definitions":503,"manifest_navigator_down":635,"Surface":422,"on.initialize":807,"delete_definition":673}
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-sx(Move.xoff)
Move.node.y = sy(App.mouse_y())-Move.yoff
B()
return
end
end
{"A":831,"move_candidate_to_front_of_manifest":632,"Spawn_point":822,"keychord_press_on_manifest_navigator":765,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"Mouse_cursor":559,"manifest_coord":636,"manifest_index":637,"set_mouse_cursor":562,"manifest_navigator_candidates":638,"draw_ticks":862,"add_def_to_menu":640,"line_height":365,"Definition_background_color":849,"box_height":680,"order_of_magnitude":573,"compute_layout":385,"definition_background_color":859,"on.code_change":924,"approximate":579,"load_manifest":694,"on":1,"get_manifest":768,"approximate_up":658,"snapshot_canvas":913,"Save_viewport":865,"draw_cursor":639,"Ticks_font":669,"zoom_out":908,"Zoomed_out":869,"update_editor_box":711,"initialize_editor":678,"zoom_in":920,"get_default_map":937,"on.mouse_press":916,"fw_app":"driver","on.save_settings":742,"num_lines_for_manifest_navigator":676,"Manifest_navigator":495,"on.code_submit":927,"initialize_manifest_navigator":773,"Menu_background_color":611,"animate_next_frame":915,"Menu_border_color":612,"y_of_schema1":364,"Menu_command_color":613,"Manifest":769,"Menu_highlight_color":614,"copy_viewport":866,"draw_menu_bar":861,"font":353,"add_hotkey_to_menu":616,"animate_next":914,"get_multiple_definitions_from_app":783,"Num_animation_frames":840,"survey_animation":906,"on.load_settings":940,"wait_for_response":781,"on.text_input":855,"fw_parent":941,"sx":544,"maybe_update_key_in_definitions":529,"vx":545,"sy":469,"load_definition":854,"scale":712,"Animating":842,"text_input_on_manifest_navigator":634,"schema1_of_y":667,"tick_spec":660,"on.key_release":720,"on.draw":932,"Page":475,"draw_run_time_error":808,"new_definition":848,"undo_zoom_out":921,"add_thick_line":400,"B":830,"copy_shape":396,"on_handle":547,"Failing_test_definition_background_color":925,"vy":546,"draw_manifest_navigator":677,"draw_test_failure_indicator":935,"on_text":539,"draw_load_time_error":929,"table_and_array_both_empty":689,"reset_manifest_navigator":772,"Cursor_node":172,"on.mouse_release":836,"load_from_iterator":670,"on.update":942,"get_definition_from_app":784,"on.keychord_press":919,"Viewport":604,"Test_definition_background_color":858,"surface_bounds":814,"manifest_navigator_up":628,"Definitions":503,"manifest_navigator_down":635,"Surface":422,"on.initialize":807,"delete_definition":673}
on.update = function(dt)
if Animating then
animate_next(dt)
return
end
if Pan then
set_mouse_cursor('hand')
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
set_mouse_cursor('crosshair')
else
set_mouse_cursor('arrow')
end
if Pan then
Viewport.x = Pan.x - App.mouse_x()
Viewport.y = Pan.y - App.mouse_y()
B()
return
end
if Move then
Move.node.x = sx(App.mouse_x())-sx(Move.xoff)
Move.node.y = sy(App.mouse_y())-sy(Move.yoff)
B()
return
end
end
{"A":831,"move_candidate_to_front_of_manifest":632,"Spawn_point":822,"keychord_press_on_manifest_navigator":765,"from_viewport":823,"mouse_cursor":558,"interpolate_viewport":843,"Mouse_cursor":559,"manifest_coord":636,"manifest_index":637,"set_mouse_cursor":562,"manifest_navigator_candidates":638,"draw_ticks":862,"add_def_to_menu":640,"line_height":365,"Definition_background_color":849,"box_height":680,"order_of_magnitude":573,"compute_layout":385,"definition_background_color":859,"on.code_change":924,"approximate":579,"load_manifest":694,"on":1,"get_manifest":768,"approximate_up":658,"snapshot_canvas":913,"Save_viewport":865,"draw_cursor":639,"Ticks_font":669,"zoom_out":908,"Zoomed_out":869,"update_editor_box":711,"initialize_editor":678,"zoom_in":920,"get_default_map":937,"on.mouse_press":916,"fw_app":"driver","on.save_settings":742,"num_lines_for_manifest_navigator":676,"Manifest_navigator":495,"on.code_submit":927,"initialize_manifest_navigator":773,"Menu_background_color":611,"animate_next_frame":915,"Menu_border_color":612,"y_of_schema1":364,"Menu_command_color":613,"Manifest":769,"Menu_highlight_color":614,"copy_viewport":866,"draw_menu_bar":861,"font":353,"add_hotkey_to_menu":616,"animate_next":914,"get_multiple_definitions_from_app":783,"Num_animation_frames":840,"survey_animation":906,"on.load_settings":940,"wait_for_response":781,"on.text_input":855,"fw_parent":940,"sx":544,"maybe_update_key_in_definitions":529,"vx":545,"sy":469,"load_definition":854,"scale":712,"Animating":842,"text_input_on_manifest_navigator":634,"schema1_of_y":667,"tick_spec":660,"on.key_release":720,"on.draw":932,"Page":475,"draw_run_time_error":808,"new_definition":848,"undo_zoom_out":921,"add_thick_line":400,"B":830,"copy_shape":396,"on_handle":547,"Failing_test_definition_background_color":925,"vy":546,"draw_manifest_navigator":677,"draw_test_failure_indicator":935,"on_text":539,"draw_load_time_error":929,"table_and_array_both_empty":689,"reset_manifest_navigator":772,"Cursor_node":172,"on.mouse_release":836,"load_from_iterator":670,"on.update":941,"get_definition_from_app":784,"on.keychord_press":919,"Viewport":604,"Test_definition_background_color":858,"surface_bounds":814,"manifest_navigator_up":628,"Definitions":503,"manifest_navigator_down":635,"Surface":422,"on.initialize":807,"delete_definition":673}