mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-09-01 18:35:24 +00:00
load diagram in read only mode from previous version
This commit is contained in:
@@ -257,6 +257,7 @@ function EditPopoverContent({ data }) {
|
||||
const { updateArea, deleteArea } = useAreas();
|
||||
const { setUndoStack, setRedoStack } = useUndoRedo();
|
||||
const { t } = useTranslation();
|
||||
const {layout} = useLayout();
|
||||
const initialColorRef = useRef(data.color);
|
||||
|
||||
const handleColorPick = (color) => {
|
||||
@@ -302,6 +303,7 @@ function EditPopoverContent({ data }) {
|
||||
value={data.name}
|
||||
placeholder={t("name")}
|
||||
className="me-2"
|
||||
readOnly={layout.readOnly}
|
||||
onChange={(value) => updateArea(data.id, { name: value })}
|
||||
onFocus={(e) => setEditField({ name: e.target.value })}
|
||||
onBlur={(e) => {
|
||||
@@ -325,6 +327,7 @@ function EditPopoverContent({ data }) {
|
||||
/>
|
||||
<ColorPicker
|
||||
usePopover={true}
|
||||
readOnly={true}
|
||||
value={data.color}
|
||||
onChange={(color) => updateArea(data.id, { color })}
|
||||
onColorPick={(color) => handleColorPick(color)}
|
||||
|
Reference in New Issue
Block a user