fix modebar hide/show on hotkeys (#5026)

Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
teh_coderer
2023-05-16 12:25:04 -05:00
committed by GitHub
parent 549613c821
commit fd0ad21873
2 changed files with 3 additions and 3 deletions

View File

@@ -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();
},

File diff suppressed because one or more lines are too long