@flozy/editor 4.4.2 → 4.4.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -299,7 +299,7 @@ const RnD = props => {
|
|
299
299
|
width,
|
300
300
|
height
|
301
301
|
},
|
302
|
-
isDragging:
|
302
|
+
isDragging: 1,
|
303
303
|
parentPath: getParentSectionPath({
|
304
304
|
ref
|
305
305
|
}, ".freegrid-container-parent")
|
@@ -311,6 +311,7 @@ const RnD = props => {
|
|
311
311
|
};
|
312
312
|
const onDrag = (e, d) => {
|
313
313
|
e.preventDefault();
|
314
|
+
e.stopPropagation();
|
314
315
|
const lines = getClosestDraggable(e.clientX, e.clientY, `.freegrid-section_${parentSectionPath} .freegrid-container .freegrid-item.inactive-drag`.replace(/\|/g, "\\|"), ".freegrid-item.active-drag:not(.exclude-virtual)");
|
315
316
|
console.log(lines);
|
316
317
|
setAbsPosition({
|
@@ -318,7 +319,7 @@ const RnD = props => {
|
|
318
319
|
"--zIndex": 2000
|
319
320
|
});
|
320
321
|
updateDragging({
|
321
|
-
isDragging:
|
322
|
+
isDragging: 2,
|
322
323
|
position: {
|
323
324
|
...dragging.position,
|
324
325
|
x: e.clientX,
|
@@ -336,7 +337,7 @@ const RnD = props => {
|
|
336
337
|
const onDragStop = (e, d) => {
|
337
338
|
e.preventDefault();
|
338
339
|
e.stopPropagation();
|
339
|
-
if (dragging?.isDragging && dragging?.position?.strXY) {
|
340
|
+
if (dragging?.isDragging === 2 && dragging?.position?.strXY) {
|
340
341
|
d.x = e.x;
|
341
342
|
d.y = e.y;
|
342
343
|
d.offsetX = e.offsetX;
|
@@ -369,6 +370,17 @@ const RnD = props => {
|
|
369
370
|
setAbsPosition({
|
370
371
|
...ud
|
371
372
|
});
|
373
|
+
} else {
|
374
|
+
// invalid drags
|
375
|
+
// found in dev mode and in safari browser
|
376
|
+
updateDragging({
|
377
|
+
isDragging: 0,
|
378
|
+
position: {},
|
379
|
+
lines: [],
|
380
|
+
active: false,
|
381
|
+
id: null
|
382
|
+
});
|
383
|
+
setPosition({});
|
372
384
|
}
|
373
385
|
};
|
374
386
|
const onResizeStop = (e, direction, ref, d, position) => {
|