rtl-fix address issues
This commit is contained in:
parent
048704f572
commit
94a076c9bc
@ -1385,7 +1385,7 @@ export default function ControlPanel({
|
||||
<Divider layout="vertical" margin="8px" />
|
||||
<Dropdown
|
||||
style={{ width: "240px" }}
|
||||
position="bottomLeft"
|
||||
position={isRtl(i18n.language) ? "bottomRight" : "bottomLeft"}
|
||||
render={
|
||||
<Dropdown.Menu
|
||||
style={isRtl(i18n.language) ? { direction: "rtl" } : {}}
|
||||
|
@ -63,6 +63,7 @@ export default function TableInfo({ data }) {
|
||||
<div
|
||||
key={"field_" + j}
|
||||
className={`cursor-pointer ${drag.draggingOverIndexList.includes(j) ? "opacity-25" : ""}`}
|
||||
style={{ direction: "ltr" }}
|
||||
draggable
|
||||
onDragStart={() => {
|
||||
setDrag((prev) => ({ ...prev, draggingElementIndex: j }));
|
||||
|
@ -23,7 +23,6 @@ import { Modal } from "@douyinfe/semi-ui";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { databases } from "../data/databases";
|
||||
import { isRtl } from "../i18n/utils/rtl";
|
||||
import i18n from "../i18n/i18n";
|
||||
|
||||
export default function WorkSpace() {
|
||||
const [id, setId] = useState(0);
|
||||
@ -51,11 +50,11 @@ export default function WorkSpace() {
|
||||
setDatabase,
|
||||
} = useDiagram();
|
||||
const { undoStack, redoStack, setUndoStack, setRedoStack } = useUndoRedo();
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
const handleResize = (e) => {
|
||||
if (!resize) return;
|
||||
const w = e.clientX;
|
||||
const w = isRtl(i18n.language) ? window.innerWidth - e.clientX : e.clientX;
|
||||
if (w > 340) setWidth(w);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user