Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

show reset icon with zoom percentage during zen mode (#1540)

Aakansha Doshi5b80ad045baf
diff --git a/src/components/LayerUI.scss b/src/components/LayerUI.scss
index 32c851a9d3..3fb1b9236a 100644
--- a/src/components/LayerUI.scss
+++ b/src/components/LayerUI.scss
@@ -105,6 +105,10 @@
:root[dir="rtl"] &.transition-right {
transform: translate(-999px, 0);
}
+
+ &.App-menu_bottom--transition-left {
+ transform: translate(-92px, 0);
+ }
}
.disable-zen-mode {
@@ -127,7 +131,3 @@
}
}
}
-
-.disable-pointerEvents {
- pointer-events: none !important;
-}
diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx
index ac9e111d41..f59c147a2f 100644
--- a/src/components/LayerUI.tsx
+++ b/src/components/LayerUI.tsx
@@ -62,7 +62,9 @@ const LayerUI = ({
const renderEncryptedIcon = () => (
<a
- className="encrypted-icon tooltip"
+ className={`encrypted-icon tooltip zen-mode-visibility ${
+ zenModeEnabled ? "zen-mode-visibility--hidden" : ""
+ }`}
href="https://blog.excalidraw.com/end-to-end-encryption/"
target="_blank"
rel="noopener noreferrer"
@@ -204,7 +206,7 @@ const LayerUI = ({
{
<div
className={`App-menu App-menu_bottom zen-mode-transition ${
- zenModeEnabled && "transition-left disable-pointerEvents"
+ zenModeEnabled && "App-menu_bottom--transition-left"
}`}
>
<Stack.Col gap={2}>
diff --git a/src/components/LockIcon.tsx b/src/components/LockIcon.tsx
index b73c15c6c6..dfd3298022 100644
--- a/src/components/LockIcon.tsx
+++ b/src/components/LockIcon.tsx
@@ -46,7 +46,7 @@ export function LockIcon(props: LockIconProps) {
return (
<label
className={`ToolIcon ToolIcon__lock ToolIcon_type_floating ${sizeCn} zen-mode-visibility ${
- props.zenModeEnabled && "hidden disable-pointerEvents"
+ props.zenModeEnabled && "zen-mode-visibility--hidden"
}`}
title={`${props.title} — Q`}
>
diff --git a/src/components/ToolIcon.scss b/src/components/ToolIcon.scss
index 845dfcca7a..17d7b3e000 100644
--- a/src/components/ToolIcon.scss
+++ b/src/components/ToolIcon.scss
@@ -167,15 +167,3 @@
right: 2px;
}
}
-
-.zen-mode-visibility {
- visibility: visible;
- opacity: 1;
- transition: visibility 0s linear 0s, opacity 0.5s;
-
- &.hidden {
- visibility: hidden;
- opacity: 0;
- transition: visibility 0s linear 300ms, opacity 0.5s;
- }
-}
diff --git a/src/css/styles.scss b/src/css/styles.scss
index 949959cd27..202dbc39a1 100644
--- a/src/css/styles.scss
+++ b/src/css/styles.scss
@@ -267,6 +267,12 @@ button,
cursor: default;
pointer-events: none !important;
+ &--transition-left {
+ section {
+ width: 185px;
+ }
+ }
+
section {
display: flex;
}
@@ -458,3 +464,23 @@ button,
left: 0;
}
}
+
+.zen-mode-visibility {
+ visibility: visible;
+ opacity: 1;
+ height: auto;
+ width: auto;
+ transition: opacity 0.5s;
+
+ &.zen-mode-visibility--hidden {
+ visibility: hidden;
+ opacity: 0;
+ height: 0;
+ width: 0;
+ transition: opacity 0.5s;
+ }
+}
+
+.disable-pointerEvents {
+ pointer-events: none !important;
+}