From fd601200ef9eaeee4255c20ad32b88a6852c9799 Mon Sep 17 00:00:00 2001 From: Andrew Simachev Date: Wed, 4 May 2022 12:57:26 +0300 Subject: [PATCH] #27rmqyt: fix --- src/scss/component/sidebar.scss | 4 ++++ src/ts/lib/keyboard.tsx | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/scss/component/sidebar.scss b/src/scss/component/sidebar.scss index 27790af198..ff18e9af58 100644 --- a/src/scss/component/sidebar.scss +++ b/src/scss/component/sidebar.scss @@ -22,6 +22,10 @@ .sidebar.right { .resize-h { right: auto; left: -5px; } + + .foot { + .icon.collapse { transform: rotateZ(180deg); } + } } .sidebar.fixed.right { border-left: 1px solid $colorLightGrey; border-right: 0px; } diff --git a/src/ts/lib/keyboard.tsx b/src/ts/lib/keyboard.tsx index b4b97ad1b5..f149e606f9 100644 --- a/src/ts/lib/keyboard.tsx +++ b/src/ts/lib/keyboard.tsx @@ -92,9 +92,11 @@ class Keyboard { onMouseMove (e: any) { const { sidebar, autoSidebar } = commonStore; const { snap, fixed, width } = sidebar; + const x = e.pageX; + const y = e.pageY; this.mouse = { - page: { x: e.pageX, y: e.pageY }, + page: { x, y }, client: { x: e.clientX, y: e.clientY }, }; @@ -114,19 +116,19 @@ class Keyboard { let remove = false; if (snap == I.MenuDirection.Left) { - if (this.mouse.page.x <= 20) { + if (x <= 20) { add = true; }; - if (this.mouse.page.x > width + 10) { + if (x > width + 10) { remove = true; }; }; if (snap == I.MenuDirection.Right) { - if (this.mouse.page.x >= ww - 20) { + if (x >= ww - 20) { add = true; }; - if (this.mouse.page.x > ww - width - 10) { + if (x < ww - width - 10) { remove = true; }; };