seat-editor 3.6.21 → 3.6.22
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,7 @@ export default function GraphView() {
|
|
|
162
162
|
colorGroupSelection: COLORS_SECTION,
|
|
163
163
|
dataKey: "uuid_table",
|
|
164
164
|
selection: selection
|
|
165
|
+
}, onRightClick: (e, data) => {
|
|
166
|
+
console.log({ e, data });
|
|
165
167
|
}, 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
168
|
}
|
|
@@ -168,6 +168,8 @@ export default function GraphView() {
|
|
|
168
168
|
colorGroupSelection: COLORS_SECTION,
|
|
169
169
|
dataKey: "uuid_table",
|
|
170
170
|
selection: selection
|
|
171
|
+
}} onRightClick={(e, data) => {
|
|
172
|
+
console.log({ e, data });
|
|
171
173
|
}} allowTooltip={true}/>
|
|
172
174
|
<div className="w-1/5 p-4" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>
|
|
173
175
|
<div id="table"/>
|
|
@@ -276,14 +276,13 @@ const LayerView = (props) => {
|
|
|
276
276
|
const { x, y } = getSvgCoords(e);
|
|
277
277
|
const targetGroup = e.target.closest("g[data-id]");
|
|
278
278
|
const targetSelectionGroup = e.target.closest("g[data-selection]");
|
|
279
|
-
console.log({ targetGroup, targetSelectionGroup });
|
|
280
279
|
const { clientX, clientY } = e;
|
|
281
280
|
const hitPoint = document.elementFromPoint(clientX, clientY);
|
|
282
281
|
const downOutTable = (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) === "svg";
|
|
283
282
|
const makeSelection = (downOutTable || !targetGroup) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
284
283
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
285
284
|
const downInOutSelection = hadSelection && makeSelection && e.button !== 2;
|
|
286
|
-
|
|
285
|
+
const unSelectAll = hadSelection && e.button === 2 && targetGroup && !targetSelectionGroup;
|
|
287
286
|
const hasSelectionDownOutSelection = !targetSelectionGroup && targetGroup && hadSelection;
|
|
288
287
|
if (downOutTable) {
|
|
289
288
|
if (graph.connecting) {
|
|
@@ -302,7 +301,7 @@ const LayerView = (props) => {
|
|
|
302
301
|
});
|
|
303
302
|
(_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(boxSelection);
|
|
304
303
|
}
|
|
305
|
-
if (downInOutSelection || hasSelectionDownOutSelection) {
|
|
304
|
+
if (downInOutSelection || hasSelectionDownOutSelection || unSelectAll) {
|
|
306
305
|
handleUnSelectComponent();
|
|
307
306
|
}
|
|
308
307
|
setPanningGroup(true);
|
|
@@ -275,14 +275,13 @@ const LayerView = (props) => {
|
|
|
275
275
|
const { x, y } = getSvgCoords(e);
|
|
276
276
|
const targetGroup = e.target.closest("g[data-id]");
|
|
277
277
|
const targetSelectionGroup = e.target.closest("g[data-selection]");
|
|
278
|
-
console.log({ targetGroup, targetSelectionGroup });
|
|
279
278
|
const { clientX, clientY } = e;
|
|
280
279
|
const hitPoint = document.elementFromPoint(clientX, clientY);
|
|
281
280
|
const downOutTable = (hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.nodeName) === "svg";
|
|
282
281
|
const makeSelection = (downOutTable || !targetGroup) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
283
282
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
284
283
|
const downInOutSelection = hadSelection && makeSelection && e.button !== 2;
|
|
285
|
-
|
|
284
|
+
const unSelectAll = hadSelection && e.button === 2 && targetGroup && !targetSelectionGroup;
|
|
286
285
|
const hasSelectionDownOutSelection = !targetSelectionGroup && targetGroup && hadSelection;
|
|
287
286
|
if (downOutTable) {
|
|
288
287
|
if (graph.connecting) {
|
|
@@ -301,7 +300,7 @@ const LayerView = (props) => {
|
|
|
301
300
|
});
|
|
302
301
|
(_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(boxSelection);
|
|
303
302
|
}
|
|
304
|
-
if (downInOutSelection || hasSelectionDownOutSelection) {
|
|
303
|
+
if (downInOutSelection || hasSelectionDownOutSelection || unSelectAll) {
|
|
305
304
|
handleUnSelectComponent();
|
|
306
305
|
}
|
|
307
306
|
setPanningGroup(true);
|