publ-echo-test 0.0.165 → 0.0.167
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, useRef, useState } from 'react';
|
24
|
+
import React, { useEffect, useLayoutEffect, 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,6 +39,11 @@ 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(function () {
|
43
|
+
if (elementRef.current && isSelected) {
|
44
|
+
elementRef.current.scrollIntoView();
|
45
|
+
}
|
46
|
+
}, [isSelected]);
|
42
47
|
useEffect(function () {
|
43
48
|
var _a;
|
44
49
|
if (!isSelected || !autoResize) {
|
@@ -586,7 +586,6 @@ var ReactGridLayout = function (_a) {
|
|
586
586
|
})();
|
587
587
|
var outsideOfEditingGroup = !editingGroupAllChildren.includes(l.i);
|
588
588
|
var zIndex = editorMode === 'EDIT' ? editorZIndex : z;
|
589
|
-
console.log('blockStructure from echo', blockStructure);
|
590
589
|
return (_jsx(GridItem, { className: classNames({
|
591
590
|
'editable-grid-item': !isRoot && editable,
|
592
591
|
'not-editable-grid-item': !isRoot && !editable,
|