|
@@ -4,6 +4,7 @@ import React, {
|
|
|
useMemo,
|
|
useMemo,
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
|
|
|
|
|
|
|
+import { useDrawioModalForEditor } from '@growi/editor/src/stores/use-drawio';
|
|
|
import {
|
|
import {
|
|
|
Modal,
|
|
Modal,
|
|
|
ModalBody,
|
|
ModalBody,
|
|
@@ -47,7 +48,9 @@ export const DrawioModal = (): JSX.Element => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const { data: drawioModalData, close: closeDrawioModal } = useDrawioModal();
|
|
const { data: drawioModalData, close: closeDrawioModal } = useDrawioModal();
|
|
|
|
|
+ const { data: drawioModalDataInEditor } = useDrawioModalForEditor();
|
|
|
const isOpened = drawioModalData?.isOpened ?? false;
|
|
const isOpened = drawioModalData?.isOpened ?? false;
|
|
|
|
|
+ const isOpendInEditor = drawioModalDataInEditor?.isOpened ?? false;
|
|
|
|
|
|
|
|
const drawioUriWithParams = useMemo(() => {
|
|
const drawioUriWithParams = useMemo(() => {
|
|
|
if (rendererConfig == null) {
|
|
if (rendererConfig == null) {
|
|
@@ -109,7 +112,7 @@ export const DrawioModal = (): JSX.Element => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<Modal
|
|
<Modal
|
|
|
- isOpen={isOpened}
|
|
|
|
|
|
|
+ isOpen={isOpened || isOpendInEditor}
|
|
|
toggle={() => closeDrawioModal()}
|
|
toggle={() => closeDrawioModal()}
|
|
|
backdrop="static"
|
|
backdrop="static"
|
|
|
className="drawio-modal grw-body-only-modal-expanded"
|
|
className="drawio-modal grw-body-only-modal-expanded"
|