seat-editor 3.6.16 → 3.6.17
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.
|
@@ -262,6 +262,7 @@ const LayerView = (props) => {
|
|
|
262
262
|
}, [actionPrivileged]);
|
|
263
263
|
const handlePointerDown = (e) => {
|
|
264
264
|
var _a, _b, _c;
|
|
265
|
+
console.log("handlePointerDown");
|
|
265
266
|
const svg = svgRef.current;
|
|
266
267
|
if (!e.isPrimary || !svg)
|
|
267
268
|
return;
|
|
@@ -298,12 +299,12 @@ const LayerView = (props) => {
|
|
|
298
299
|
handleUnSelectComponent();
|
|
299
300
|
}
|
|
300
301
|
setPanningGroup(true);
|
|
301
|
-
if (!targetGroup) {
|
|
302
|
+
if (!targetGroup && (props === null || props === void 0 ? void 0 : props.allowTooltip)) {
|
|
302
303
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
303
304
|
return;
|
|
304
305
|
}
|
|
305
|
-
let ghost = targetGroup.cloneNode(true);
|
|
306
|
-
const ghostId = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
|
|
306
|
+
let ghost = targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.cloneNode(true);
|
|
307
|
+
const ghostId = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
307
308
|
const allowedDrag = (!(props === null || props === void 0 ? void 0 : props.dragTableBlockKey)
|
|
308
309
|
? true
|
|
309
310
|
: !((_b = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _b === void 0 ? void 0 : _b.some((_) => {
|
|
@@ -319,14 +320,16 @@ const LayerView = (props) => {
|
|
|
319
320
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
320
321
|
(actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable) && (props === null || props === void 0 ? void 0 : props.onDragTable) && props.onDragTable(e, dataRaw);
|
|
321
322
|
}
|
|
322
|
-
ghost.setAttribute("opacity", "0.5");
|
|
323
|
-
ghost.setAttribute("pointer-events", "none");
|
|
324
|
-
ghost.setAttribute("stroke-width", "1");
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("opacity", "0.5");
|
|
324
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("pointer-events", "none");
|
|
325
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("stroke-width", "1");
|
|
326
|
+
if (ghost) {
|
|
327
|
+
svg.appendChild(ghost);
|
|
328
|
+
tableGhost.current = ghost;
|
|
329
|
+
}
|
|
327
330
|
const startBox = getTranslate(targetGroup);
|
|
328
|
-
const groupCTM = targetGroup.getCTM();
|
|
329
|
-
if (!groupCTM) {
|
|
331
|
+
const groupCTM = targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getCTM();
|
|
332
|
+
if (!groupCTM && targetGroup) {
|
|
330
333
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
331
334
|
return;
|
|
332
335
|
}
|
|
@@ -261,6 +261,7 @@ const LayerView = (props) => {
|
|
|
261
261
|
}, [actionPrivileged]);
|
|
262
262
|
const handlePointerDown = (e) => {
|
|
263
263
|
var _a, _b, _c;
|
|
264
|
+
console.log("handlePointerDown");
|
|
264
265
|
const svg = svgRef.current;
|
|
265
266
|
if (!e.isPrimary || !svg)
|
|
266
267
|
return;
|
|
@@ -297,12 +298,12 @@ const LayerView = (props) => {
|
|
|
297
298
|
handleUnSelectComponent();
|
|
298
299
|
}
|
|
299
300
|
setPanningGroup(true);
|
|
300
|
-
if (!targetGroup) {
|
|
301
|
+
if (!targetGroup && (props === null || props === void 0 ? void 0 : props.allowTooltip)) {
|
|
301
302
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
let ghost = targetGroup.cloneNode(true);
|
|
305
|
-
const ghostId = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
|
|
305
|
+
let ghost = targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.cloneNode(true);
|
|
306
|
+
const ghostId = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
|
|
306
307
|
const allowedDrag = (!(props === null || props === void 0 ? void 0 : props.dragTableBlockKey)
|
|
307
308
|
? true
|
|
308
309
|
: !((_b = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _b === void 0 ? void 0 : _b.some((_) => {
|
|
@@ -318,14 +319,16 @@ const LayerView = (props) => {
|
|
|
318
319
|
const dataRaw = originalData({ id: ghostId, type: "find" });
|
|
319
320
|
(actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable) && (props === null || props === void 0 ? void 0 : props.onDragTable) && props.onDragTable(e, dataRaw);
|
|
320
321
|
}
|
|
321
|
-
ghost.setAttribute("opacity", "0.5");
|
|
322
|
-
ghost.setAttribute("pointer-events", "none");
|
|
323
|
-
ghost.setAttribute("stroke-width", "1");
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("opacity", "0.5");
|
|
323
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("pointer-events", "none");
|
|
324
|
+
ghost === null || ghost === void 0 ? void 0 : ghost.setAttribute("stroke-width", "1");
|
|
325
|
+
if (ghost) {
|
|
326
|
+
svg.appendChild(ghost);
|
|
327
|
+
tableGhost.current = ghost;
|
|
328
|
+
}
|
|
326
329
|
const startBox = getTranslate(targetGroup);
|
|
327
|
-
const groupCTM = targetGroup.getCTM();
|
|
328
|
-
if (!groupCTM) {
|
|
330
|
+
const groupCTM = targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getCTM();
|
|
331
|
+
if (!groupCTM && targetGroup) {
|
|
329
332
|
setTooltip((prev) => (Object.assign(Object.assign({}, prev), { visible: false })));
|
|
330
333
|
return;
|
|
331
334
|
}
|