publ-echo-test 0.0.173 → 0.0.175
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.
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { GridItemProps } from './types';
|
3
3
|
import { PropsWithChildren } from '../types';
|
4
|
-
declare const
|
5
|
-
export default
|
4
|
+
declare const GridItem: ({ children, ...props }: PropsWithChildren<GridItemProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
5
|
+
export default GridItem;
|
@@ -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,
|
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';
|
@@ -154,7 +154,7 @@ var GridItem = function (_a) {
|
|
154
154
|
};
|
155
155
|
};
|
156
156
|
var colWidth = customColWidth !== null && customColWidth !== void 0 ? customColWidth : calcGridColWidth(getPositionParams());
|
157
|
-
var createStyle =
|
157
|
+
var createStyle = function (pos) {
|
158
158
|
var usePercentages = props.usePercentages, containerWidth = props.containerWidth, useCSSTransforms = props.useCSSTransforms;
|
159
159
|
var style;
|
160
160
|
if (useCSSTransforms) {
|
@@ -170,12 +170,8 @@ var GridItem = function (_a) {
|
|
170
170
|
style.width = perc(pos.width / containerWidth);
|
171
171
|
}
|
172
172
|
}
|
173
|
-
// 드래그나 리사이즈 중일 때만 will-change 추가
|
174
|
-
if (isDragging || isResizing) {
|
175
|
-
style.willChange = 'transform';
|
176
|
-
}
|
177
173
|
return style;
|
178
|
-
}
|
174
|
+
};
|
179
175
|
/**
|
180
176
|
* Mix a Draggable instance into a child.
|
181
177
|
* @param {Element} child Child element.
|
@@ -419,12 +415,4 @@ var GridItem = function (_a) {
|
|
419
415
|
newChild = mixinDraggable(newChild, isDraggable);
|
420
416
|
return newChild;
|
421
417
|
};
|
422
|
-
export default
|
423
|
-
// 필요한 속성만 비교하여 불필요한 리렌더링 방지
|
424
|
-
return (prevProps.x === nextProps.x &&
|
425
|
-
prevProps.y === nextProps.y &&
|
426
|
-
prevProps.w === nextProps.w &&
|
427
|
-
prevProps.h === nextProps.h &&
|
428
|
-
prevProps.isDraggable === nextProps.isDraggable &&
|
429
|
-
prevProps.isResizable === nextProps.isResizable);
|
430
|
-
});
|
418
|
+
export default GridItem;
|