seat-editor 3.5.11 → 3.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Modal } from "antd";
|
|
4
4
|
import { useAppSelector, useAppDispatch } from "../../hooks/use-redux";
|
|
5
|
+
import { useEffect } from "react";
|
|
5
6
|
const ModalPreview = ({ children }) => {
|
|
6
7
|
const { isPreview } = useAppSelector((state) => state.tool);
|
|
7
8
|
const dispatch = useAppDispatch();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!isPreview) {
|
|
11
|
+
dispatch({
|
|
12
|
+
type: "board/setTagType",
|
|
13
|
+
payload: "default",
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}, [isPreview]);
|
|
8
17
|
return (_jsx(Modal, { open: isPreview, onCancel: () => dispatch({ type: "tool/setTooglePreview", payload: false }), width: 700, title: "Preview Board", centered: true, footer: null, children: _jsx("div", { className: "flex flex-col p-4 h-[500px]", children: children }) }));
|
|
9
18
|
};
|
|
10
19
|
export default ModalPreview;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Modal } from "antd";
|
|
3
3
|
import { useAppSelector, useAppDispatch } from "../../hooks/use-redux";
|
|
4
|
+
import { useEffect } from "react";
|
|
4
5
|
const ModalPreview = ({ children }) => {
|
|
5
6
|
const { isPreview } = useAppSelector((state) => state.tool);
|
|
6
7
|
const dispatch = useAppDispatch();
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (!isPreview) {
|
|
10
|
+
dispatch({
|
|
11
|
+
type: "board/setTagType",
|
|
12
|
+
payload: "default",
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}, [isPreview]);
|
|
7
16
|
return (<Modal open={isPreview} onCancel={() => dispatch({ type: "tool/setTooglePreview", payload: false })} width={700} title="Preview Board" centered footer={null}>
|
|
8
17
|
<div className="flex flex-col p-4 h-[500px]">{children}</div>
|
|
9
18
|
</Modal>);
|
|
@@ -122,7 +122,6 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
|
|
|
122
122
|
const allBox = groupIdSelection === null || groupIdSelection === void 0 ? void 0 : groupIdSelection.map((id) => {
|
|
123
123
|
var _a;
|
|
124
124
|
const { g } = (_a = getAttributeElements(svgRef.current, [String(id)])) === null || _a === void 0 ? void 0 : _a[0];
|
|
125
|
-
const translate = getTranslate(g);
|
|
126
125
|
const size = getGlobalBBox(svgRef.current, g);
|
|
127
126
|
return Object.assign({}, size);
|
|
128
127
|
});
|
|
@@ -121,7 +121,6 @@ const BoardTemplate = ({ refs, loadingRender, disabled = false, }) => {
|
|
|
121
121
|
const allBox = groupIdSelection === null || groupIdSelection === void 0 ? void 0 : groupIdSelection.map((id) => {
|
|
122
122
|
var _a;
|
|
123
123
|
const { g } = (_a = getAttributeElements(svgRef.current, [String(id)])) === null || _a === void 0 ? void 0 : _a[0];
|
|
124
|
-
const translate = getTranslate(g);
|
|
125
124
|
const size = getGlobalBBox(svgRef.current, g);
|
|
126
125
|
return Object.assign({}, size);
|
|
127
126
|
});
|