mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
fix modebar hide/show on hotkeys (#5026)
Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ export function hideModebar(hide: boolean = true) {
|
||||
}
|
||||
let includes_text = "display: none";
|
||||
if (window.MODEBAR) {
|
||||
if (window.MODEBAR.style.cssText.includes("display: none") && !hide) {
|
||||
if (window.MODEBAR.style.cssText.includes("display: none") || !hide) {
|
||||
includes_text = "display: flex";
|
||||
window.MODEBAR.style.cssText = `${window.MODEBAR.style.cssText}; display:flex;`;
|
||||
} else {
|
||||
@@ -61,7 +61,7 @@ export function PlotConfig({
|
||||
{ preventDefault: true }
|
||||
);
|
||||
useHotkeys(
|
||||
"ctrl+shift+h",
|
||||
["ctrl+shift+h", "ctrl+h"],
|
||||
() => {
|
||||
hideModebar();
|
||||
},
|
||||
|
||||
2
openbb_terminal/core/plots/plotly.html
vendored
2
openbb_terminal/core/plots/plotly.html
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user