publ-echo-test 0.0.167 → 0.0.169
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.
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
21
|
return t;
|
22
22
|
};
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
-
import React, { useEffect,
|
24
|
+
import React, { useEffect, useRef, useState, } from 'react';
|
25
25
|
import { DraggableCore } from '../Draggable';
|
26
26
|
import classNames from '../../external-lib/classnames';
|
27
27
|
import { calcGridColWidth, calcGridItemPosition, calcGridItemWHPx, calcWH, calcXY, clamp, resolveRowHeight, } from './utils/calculateUtils';
|
@@ -39,11 +39,15 @@ var GridItem = function (_a) {
|
|
39
39
|
var _r = useState(false), pointerEventsNone = _r[0], setPointerEventsNone = _r[1];
|
40
40
|
var elementRef = useRef(null);
|
41
41
|
var isSelected = (_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.classList.contains('react-grid-item-selected');
|
42
|
-
useLayoutEffect(
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
// useLayoutEffect(() => {
|
43
|
+
// if (elementRef.current && isSelected) {
|
44
|
+
// elementRef.current.scrollIntoView({
|
45
|
+
// behavior: 'smooth',
|
46
|
+
// block: 'center',
|
47
|
+
// inline: 'center',
|
48
|
+
// });
|
49
|
+
// }
|
50
|
+
// }, [isSelected]);
|
47
51
|
useEffect(function () {
|
48
52
|
var _a;
|
49
53
|
if (!isSelected || !autoResize) {
|
@@ -740,6 +740,7 @@ var ReactGridLayout = function (_a) {
|
|
740
740
|
var currentGroupBlocks = blockStructure
|
741
741
|
? findGroupBlocks(blockStructure, editingGroupBlock)
|
742
742
|
: [];
|
743
|
+
console.log('currentGroupBlocks', currentGroupBlocks);
|
743
744
|
return (_jsxs("div", { ref: innerRef, className: mergedClassName, style: mergedStyle, onDrop: isDroppable ? onDropHandler : noop, onDragLeave: isDroppable ? onDragLeaveHandler : noop, onDragEnter: isDroppable ? onDragEnterHandler : noop, onDragOver: isDroppable ? onDragOverHandler : noop, children: [currentGroupBlocks.map(function (each) { return processGroup(each); }), React.Children.map(children, function (child) { return processGridItem(child); }), placeholder(), activeDrag && _jsx("div", { className: 'grid-guide-line-center' }), activeDrag && (_jsx("div", { className: 'grid-placeholder', style: {
|
744
745
|
marginTop: margin[1] + 'px',
|
745
746
|
marginBottom: margin[1] + 'px',
|