mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 04:28:12 +08:00
Add auto-panning when pointer goes beyond viewport edge with Select tool (#1625)
* Add code to shift viewport if mouse is beyond edge * Allow shifting viewport if mouse is stationary too * Group all modifier keys into SelectToolPointerKeys * Cleanup message ordering to remove shifting during resize * Slow down shifting by half * Clamp speed; code review cleanup --------- Co-authored-by: 0hypercube <0hypercube@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
0hypercube
Keavon Chambers
parent
4405e01f55
commit
8e769e37f6
@@ -239,6 +239,12 @@ impl JsEditorHandle {
|
||||
*g.borrow_mut() = Some(Closure::new(move || {
|
||||
wasm_bindgen_futures::spawn_local(poll_node_graph_evaluation());
|
||||
|
||||
call_closure_with_editor_and_handle(|editor, handle| {
|
||||
for message in editor.handle_message(BroadcastMessage::TriggerEvent(BroadcastEvent::AnimationFrame)) {
|
||||
handle.send_frontend_message_to_js(message);
|
||||
}
|
||||
});
|
||||
|
||||
// Schedule ourself for another requestAnimationFrame callback
|
||||
request_animation_frame(f.borrow().as_ref().unwrap());
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user