mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
#27rmqyt: fix
This commit is contained in:
parent
64e365b908
commit
fd601200ef
2 changed files with 11 additions and 5 deletions
|
@ -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; }
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue