seat-editor 3.6.19 → 3.6.20
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.
|
@@ -162,5 +162,5 @@ export default function GraphView() {
|
|
|
162
162
|
colorGroupSelection: COLORS_SECTION,
|
|
163
163
|
dataKey: "uuid_table",
|
|
164
164
|
selection: selection
|
|
165
|
-
} }), _jsxs("div", { className: "w-1/5 p-4", onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: [_jsx("div", { id: "table" }), _jsxs("div", { className: "rounded-lg bg-white p-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Section" }), sections.map((section) => (_jsxs("div", { className: clsx("font-bold text-white rounded-md p-2 cursor-pointer", sectionActive === section.id && "!bg-blue-500"), style: { backgroundColor: section.color }, onClick: () => setSectionActive(section.id), children: [_jsx("h2", { className: "text-lg", children: section.name }), section.items.length > 0 && (_jsx("ul", { className: "list-disc pl-5 bg-opacity-50 bg-white p-2 rounded ", children: section.items.map((item) => (_jsx("li", { children: item.name }, item.id))) }))] }, section.id)))] })] }), _jsx("div", { className: "w-1/5 p-4", children: _jsx("div", { className: "rounded-lg bg-white p-4", children: _jsx("h1", { className: "text-2xl font-bold", children: "Nodes" }) }) })] }) }));
|
|
165
|
+
}, allowTooltip: true }), _jsxs("div", { className: "w-1/5 p-4", onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: [_jsx("div", { id: "table" }), _jsxs("div", { className: "rounded-lg bg-white p-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Section" }), sections.map((section) => (_jsxs("div", { className: clsx("font-bold text-white rounded-md p-2 cursor-pointer", sectionActive === section.id && "!bg-blue-500"), style: { backgroundColor: section.color }, onClick: () => setSectionActive(section.id), children: [_jsx("h2", { className: "text-lg", children: section.name }), section.items.length > 0 && (_jsx("ul", { className: "list-disc pl-5 bg-opacity-50 bg-white p-2 rounded ", children: section.items.map((item) => (_jsx("li", { children: item.name }, item.id))) }))] }, section.id)))] })] }), _jsx("div", { className: "w-1/5 p-4", children: _jsx("div", { className: "rounded-lg bg-white p-4", children: _jsx("h1", { className: "text-2xl font-bold", children: "Nodes" }) }) })] }) }));
|
|
166
166
|
}
|
|
@@ -168,7 +168,7 @@ export default function GraphView() {
|
|
|
168
168
|
colorGroupSelection: COLORS_SECTION,
|
|
169
169
|
dataKey: "uuid_table",
|
|
170
170
|
selection: selection
|
|
171
|
-
}}/>
|
|
171
|
+
}} allowTooltip={true}/>
|
|
172
172
|
<div className="w-1/5 p-4" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>
|
|
173
173
|
<div id="table"/>
|
|
174
174
|
<div className="rounded-lg bg-white p-4">
|
|
@@ -121,6 +121,7 @@ const LayerView = (props) => {
|
|
|
121
121
|
const handleUnSelectComponent = () => {
|
|
122
122
|
setSelectedLines(null);
|
|
123
123
|
dataElementSelectionGroupRef.current = [];
|
|
124
|
+
onMakeSelection && onMakeSelection([]);
|
|
124
125
|
};
|
|
125
126
|
const handleDoubleClick = (items, e) => {
|
|
126
127
|
const find = componentsEditor.find((item) => {
|
|
@@ -262,7 +263,6 @@ const LayerView = (props) => {
|
|
|
262
263
|
}, [actionPrivileged]);
|
|
263
264
|
const handlePointerDown = (e) => {
|
|
264
265
|
var _a, _b, _c;
|
|
265
|
-
console.log("handlePointerDown");
|
|
266
266
|
const svg = svgRef.current;
|
|
267
267
|
if (!e.isPrimary || !svg)
|
|
268
268
|
return;
|
|
@@ -275,7 +275,6 @@ const LayerView = (props) => {
|
|
|
275
275
|
const { clientX, clientY } = e;
|
|
276
276
|
const hitPoint = document.elementFromPoint(clientX, clientY);
|
|
277
277
|
const downOutTable = (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) === "svg";
|
|
278
|
-
console.log(hitPoint, "hit", targetGroup);
|
|
279
278
|
const makeSelection = (downOutTable || !targetGroup) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
280
279
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
281
280
|
const downInOutSelection = hadSelection && makeSelection;
|
|
@@ -300,7 +299,7 @@ const LayerView = (props) => {
|
|
|
300
299
|
handleUnSelectComponent();
|
|
301
300
|
}
|
|
302
301
|
setPanningGroup(true);
|
|
303
|
-
if (
|
|
302
|
+
if (makeSelection && (props === null || props === void 0 ? void 0 : props.allowTooltip) && (tooltip === null || tooltip === void 0 ? void 0 : tooltip.visible)) {
|
|
304
303
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
305
304
|
return;
|
|
306
305
|
}
|
|
@@ -120,6 +120,7 @@ const LayerView = (props) => {
|
|
|
120
120
|
const handleUnSelectComponent = () => {
|
|
121
121
|
setSelectedLines(null);
|
|
122
122
|
dataElementSelectionGroupRef.current = [];
|
|
123
|
+
onMakeSelection && onMakeSelection([]);
|
|
123
124
|
};
|
|
124
125
|
const handleDoubleClick = (items, e) => {
|
|
125
126
|
const find = componentsEditor.find((item) => {
|
|
@@ -261,7 +262,6 @@ const LayerView = (props) => {
|
|
|
261
262
|
}, [actionPrivileged]);
|
|
262
263
|
const handlePointerDown = (e) => {
|
|
263
264
|
var _a, _b, _c;
|
|
264
|
-
console.log("handlePointerDown");
|
|
265
265
|
const svg = svgRef.current;
|
|
266
266
|
if (!e.isPrimary || !svg)
|
|
267
267
|
return;
|
|
@@ -274,7 +274,6 @@ const LayerView = (props) => {
|
|
|
274
274
|
const { clientX, clientY } = e;
|
|
275
275
|
const hitPoint = document.elementFromPoint(clientX, clientY);
|
|
276
276
|
const downOutTable = (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) === "svg";
|
|
277
|
-
console.log(hitPoint, "hit", targetGroup);
|
|
278
277
|
const makeSelection = (downOutTable || !targetGroup) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
279
278
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
280
279
|
const downInOutSelection = hadSelection && makeSelection;
|
|
@@ -299,7 +298,7 @@ const LayerView = (props) => {
|
|
|
299
298
|
handleUnSelectComponent();
|
|
300
299
|
}
|
|
301
300
|
setPanningGroup(true);
|
|
302
|
-
if (
|
|
301
|
+
if (makeSelection && (props === null || props === void 0 ? void 0 : props.allowTooltip) && (tooltip === null || tooltip === void 0 ? void 0 : tooltip.visible)) {
|
|
303
302
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
304
303
|
return;
|
|
305
304
|
}
|