From dfb673bd63735e45e987fd047ca66659d34fe071 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Fri, 8 Nov 2019 13:43:29 -0600 Subject: [PATCH] recenters all ladders via posting to appropriate tag to bus when spacebar is pressed over a ladder --- src/client/spark/Modules/Trading/Ladder/VM/LadderVM.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/spark/Modules/Trading/Ladder/VM/LadderVM.cs b/src/client/spark/Modules/Trading/Ladder/VM/LadderVM.cs index 174a14b69..199530408 100644 --- a/src/client/spark/Modules/Trading/Ladder/VM/LadderVM.cs +++ b/src/client/spark/Modules/Trading/Ladder/VM/LadderVM.cs @@ -447,6 +447,9 @@ namespace mbts.spark { public void key_down(KeyEventArgs e) { if (order_properties_vm == null) return; + if (KeyboardExtensions.IsDown(Key.Space)) { + _bus?.post(SparkTags.RequestRecenterLadder, null); + } // the ctrl modifier requirement helps avoid keyboard-input collisions w/ algo-templates popup if (!KeyboardExtensions.IsCtrlDown()) return; var new_algo = order_properties_vm.algo_definitions.FirstOrDefault(o => o.algo_root.key_match(e));