seat-editor 3.6.17 → 3.6.18
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.
|
@@ -9,7 +9,7 @@ import { selection } from "./selection";
|
|
|
9
9
|
export default function GraphView() {
|
|
10
10
|
const [isConnecting, setIsConnecting] = useState(false);
|
|
11
11
|
const [actionPrivileged, setActionPrivileged] = useState({
|
|
12
|
-
select:
|
|
12
|
+
select: false,
|
|
13
13
|
move: false,
|
|
14
14
|
switch: false,
|
|
15
15
|
drop: false,
|
|
@@ -8,7 +8,7 @@ import { selection } from "./selection";
|
|
|
8
8
|
export default function GraphView() {
|
|
9
9
|
const [isConnecting, setIsConnecting] = useState(false);
|
|
10
10
|
const [actionPrivileged, setActionPrivileged] = useState({
|
|
11
|
-
select:
|
|
11
|
+
select: false,
|
|
12
12
|
move: false,
|
|
13
13
|
switch: false,
|
|
14
14
|
drop: false,
|
|
@@ -275,7 +275,7 @@ 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
|
-
const makeSelection = downOutTable && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
278
|
+
const makeSelection = (downOutTable || !(hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.closest("g[data-id]"))) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
279
279
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
280
280
|
const downInOutSelection = hadSelection && makeSelection;
|
|
281
281
|
if (downOutTable) {
|
|
@@ -274,7 +274,7 @@ 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
|
-
const makeSelection = downOutTable && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
277
|
+
const makeSelection = (downOutTable || !(hitPoint === null || hitPoint === void 0 ? void 0 : hitPoint.closest("g[data-id]"))) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.selection);
|
|
278
278
|
const hadSelection = dataElementSelectionGroupRef.current.length > 0;
|
|
279
279
|
const downInOutSelection = hadSelection && makeSelection;
|
|
280
280
|
if (downOutTable) {
|