RTL
This commit is contained in:
parent
1f2cde6d04
commit
0e490542a7
196 changed files with 2117 additions and 1217 deletions
|
@ -431,12 +431,16 @@ export function LeftPane({
|
|||
|
||||
const onMouseMove = (event: MouseEvent) => {
|
||||
let width: number;
|
||||
|
||||
const isRTL = i18n.getLocaleDirection() === 'rtl';
|
||||
const x = isRTL ? window.innerWidth - event.clientX : event.clientX;
|
||||
|
||||
if (requiresFullWidth) {
|
||||
width = Math.max(event.clientX, MIN_FULL_WIDTH);
|
||||
} else if (event.clientX < SNAP_WIDTH) {
|
||||
width = Math.max(x, MIN_FULL_WIDTH);
|
||||
} else if (x < SNAP_WIDTH) {
|
||||
width = MIN_WIDTH;
|
||||
} else {
|
||||
width = clamp(event.clientX, MIN_FULL_WIDTH, MAX_WIDTH);
|
||||
width = clamp(x, MIN_FULL_WIDTH, MAX_WIDTH);
|
||||
}
|
||||
setPreferredWidth(Math.min(width, MAX_WIDTH));
|
||||
|
||||
|
@ -456,7 +460,7 @@ export function LeftPane({
|
|||
document.body.removeEventListener('mouseup', stopResizing);
|
||||
document.body.removeEventListener('mouseleave', stopResizing);
|
||||
};
|
||||
}, [isResizing, requiresFullWidth]);
|
||||
}, [i18n, isResizing, requiresFullWidth]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isResizing) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue