publ-echo-test 0.0.211 → 0.0.213

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.
@@ -79,19 +79,32 @@ var Resizable = function (_a) {
79
79
  if (target.clientHeight) {
80
80
  minHeight.current = target.clientHeight;
81
81
  }
82
- // NOTE: composition을 위한 작업중..
83
- console.log('target', target);
84
82
  var oneComposition = target.querySelector('.composition-container');
85
- console.log('oneComposition', oneComposition);
86
- if (oneComposition) {
87
- var compositionCols = oneComposition.getAttribute('data-cols');
88
- var compositionRows = oneComposition.getAttribute('data-rows');
89
- var compositionRowHeight = oneComposition.getAttribute('data-row-height');
90
- var compositionColWidth = oneComposition.getAttribute('data-col-width');
91
- console.log('compositionCols', compositionCols);
92
- console.log('compositionRows', compositionRows);
93
- console.log('compositionRowHeight', compositionRowHeight);
94
- console.log('compositionColWidth', compositionColWidth);
83
+ var isContentsList = target.id === 'contentslist-box';
84
+ if (oneComposition && isContentsList) {
85
+ // NOTE: 이건 좀 확인 필요. 근데 지금스팩엔 이게 맞아보임 (gap때문)
86
+ var minCellWidth = 10;
87
+ var minCollHeight = 11;
88
+ var numberOfItems = Number(target.getAttribute('data-number-of-items'));
89
+ var numberOfColumns = Number(target.getAttribute('data-number-of-columns'));
90
+ var rowGap = Number(target.getAttribute('data-row-gap'));
91
+ var columnGap = Number(target.getAttribute('data-column-gap'));
92
+ var compositionCols = Number(oneComposition.getAttribute('data-cols'));
93
+ var compositionRows = Number(oneComposition.getAttribute('data-rows'));
94
+ // const compositionRowHeight = Number(oneComposition.getAttribute('data-row-height')!);
95
+ // const compositionColWidth = Number(oneComposition.getAttribute('data-col-width')!);
96
+ var oneCompositionMinWidth = minCellWidth * compositionCols;
97
+ var oneCompositionMinHeight = minCollHeight * compositionRows;
98
+ var listMinWidth = Math.max(oneCompositionMinWidth * numberOfColumns + (numberOfColumns - 1) * columnGap, 0);
99
+ var numberOfRows = Math.ceil(numberOfItems / numberOfColumns);
100
+ var listMinHeight = Math.max(oneCompositionMinHeight * numberOfRows + (numberOfRows - 1) * rowGap, 0);
101
+ minWidth.current = listMinWidth;
102
+ minHeight.current = listMinHeight;
103
+ console.log('compositionMinWidth', oneCompositionMinWidth);
104
+ console.log('compositionMinHeight', oneCompositionMinHeight);
105
+ console.log('minWidth.current', minWidth.current);
106
+ console.log('minHeight.current', minHeight.current);
107
+ return;
95
108
  }
96
109
  // target.clientHeight -> 실제 "노드"의 height. (gridItem아닌)
97
110
  if (target.clientHeight > elementRef.current.clientHeight) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.211",
3
+ "version": "0.0.213",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",