publ-echo-test 0.0.185 → 0.0.187
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.
@@ -36,7 +36,6 @@ var GridItem = function (_a) {
|
|
36
36
|
var _o = useState(), dragStart = _o[0], setDragStart = _o[1];
|
37
37
|
var _p = useState(false), isDragging = _p[0], setIsDragging = _p[1];
|
38
38
|
var _q = useState(false), isResizing = _q[0], setIsResizing = _q[1];
|
39
|
-
var _r = useState(false), pointerEventsNone = _r[0], setPointerEventsNone = _r[1];
|
40
39
|
var elementRef = useRef(null);
|
41
40
|
var isSelected = (_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.classList.contains('react-grid-item-selected');
|
42
41
|
useEffect(function () {
|
@@ -95,6 +94,7 @@ var GridItem = function (_a) {
|
|
95
94
|
h_1 = prevH;
|
96
95
|
}
|
97
96
|
var _b = getResizableXYPosition('e', w_1, h_1, prevW, prevH), newX = _b.newX, newY = _b.newY;
|
97
|
+
console.log('character-changed', isCharacterChanged);
|
98
98
|
if (prevH === h_1 && prevW === w_1 && newX === x && newY === y) {
|
99
99
|
return;
|
100
100
|
}
|
@@ -34,7 +34,7 @@ import * as React from 'react';
|
|
34
34
|
import { useState, useRef, useLayoutEffect } from 'react';
|
35
35
|
import classNames from '../../external-lib/classnames';
|
36
36
|
import { bottom, cloneLayoutItem, compact, getAllCollisions, getBoundingArea, getLayoutItem, moveElement, noop, synchronizeLayoutWithChildren, withLayoutItem, } from './utils/renderHelpers';
|
37
|
-
import { calcGridColWidth,
|
37
|
+
import { calcGridColWidth, calcXY, resolveRowHeight, } from '../GridItem/utils/calculateUtils';
|
38
38
|
import GridItem from '../GridItem/GridItem';
|
39
39
|
import isEqual from '../../external-lib/lodash.isEqual';
|
40
40
|
import { findAllChildrenCbIds, findBlockByBlockId, findDirectChildrenBlockIds, findDirectChildrenCbIds, findGroupBlocks, findParentGroupBlock, formatCbIdToBlockId, getBlockSpecificType, zIndexMap, } from './group';
|
@@ -739,31 +739,7 @@ var ReactGridLayout = function (_a) {
|
|
739
739
|
var currentGroupBlocks = blockStructure
|
740
740
|
? findGroupBlocks(blockStructure, editingGroupBlock)
|
741
741
|
: [];
|
742
|
-
|
743
|
-
var visibleItems = React.useMemo(function () {
|
744
|
-
if (!containerHeight)
|
745
|
-
return layout;
|
746
|
-
// 화면에 보이는 영역 계산
|
747
|
-
var visibleTop = window.scrollY;
|
748
|
-
var visibleBottom = visibleTop + window.innerHeight;
|
749
|
-
// 여유 공간 추가 (스크롤 시 부드러운 전환을 위해)
|
750
|
-
var buffer = resolveRowHeight(rowHeight, colWidth) * 2;
|
751
|
-
return layout.filter(function (item) {
|
752
|
-
var _a;
|
753
|
-
var itemPos = calcGridItemPosition(getPositionParams(), item.x, item.y, (_a = item.z) !== null && _a !== void 0 ? _a : 0, item.w, item.h);
|
754
|
-
return (itemPos.top < visibleBottom + buffer) && (itemPos.top + itemPos.height > visibleTop - buffer);
|
755
|
-
});
|
756
|
-
}, [layout, window.scrollY, window.innerHeight, rowHeight, colWidth]);
|
757
|
-
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) {
|
758
|
-
var _a;
|
759
|
-
var key = (_a = child.key) === null || _a === void 0 ? void 0 : _a.toString();
|
760
|
-
if (!key)
|
761
|
-
return null;
|
762
|
-
var item = visibleItems.find(function (item) { return item.i === key; });
|
763
|
-
if (!item)
|
764
|
-
return null;
|
765
|
-
return processGridItem(child);
|
766
|
-
}), placeholder(), activeDrag && _jsx("div", { className: 'grid-guide-line-center' }), activeDrag && (_jsx("div", { className: 'grid-placeholder', style: {
|
742
|
+
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: {
|
767
743
|
marginTop: margin[1] + 'px',
|
768
744
|
marginBottom: margin[1] + 'px',
|
769
745
|
marginLeft: margin[0] + 'px',
|