ninegrid2 6.1054.0 → 6.1056.0
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.
- package/dist/bundle.cjs.js +23 -17
- package/dist/bundle.esm.js +23 -17
- package/dist/nx/nxSplitter.js +23 -17
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +23 -17
package/dist/bundle.cjs.js
CHANGED
|
@@ -121484,7 +121484,26 @@ class nxSplitter extends HTMLElement {
|
|
|
121484
121484
|
|
|
121485
121485
|
const allChildren = Array.from(parent.children);
|
|
121486
121486
|
const allPanels = allChildren.filter(el => el.tagName.toLowerCase() !== 'nx-splitter');
|
|
121487
|
-
|
|
121487
|
+
|
|
121488
|
+
// ⭐⭐ 부모의 총 픽셀 크기 ⭐⭐
|
|
121489
|
+
const totalContainerSize = isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height;
|
|
121490
|
+
|
|
121491
|
+
// ⭐⭐ 모든 스플리터의 총 픽셀 크기 ⭐⭐
|
|
121492
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
121493
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
121494
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
121495
|
+
}
|
|
121496
|
+
return sum;
|
|
121497
|
+
}, 0);
|
|
121498
|
+
|
|
121499
|
+
// ⭐⭐ Flexbox의 'gap' 크기 계산 (하드코딩된 8px 사용) ⭐⭐
|
|
121500
|
+
const gapCount = allChildren.length - 1;
|
|
121501
|
+
const totalGapSize = gapCount * 8;
|
|
121502
|
+
|
|
121503
|
+
// ⭐⭐ Flexbox 컨테이너의 '총 유효 공간' (패널들이 차지할 수 있는 공간) 계산 ⭐⭐
|
|
121504
|
+
const totalFlexSpace = totalContainerSize - totalSplitterSize - totalGapSize;
|
|
121505
|
+
|
|
121506
|
+
console.log(totalContainerSize, totalSplitterSize, totalGapSize, totalFlexSpace);
|
|
121488
121507
|
|
|
121489
121508
|
// 드래그로 인한 픽셀 변화량 계산
|
|
121490
121509
|
const dragOffset = (isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top)) -
|
|
@@ -121496,22 +121515,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121496
121515
|
const newPrevSize = prevSize + dragOffset;
|
|
121497
121516
|
const newNextSize = nextSize - dragOffset;
|
|
121498
121517
|
|
|
121499
|
-
// 모든 패널의 총 픽셀 크기 합계 계산
|
|
121500
|
-
allPanels.reduce((sum, panel) => {
|
|
121501
|
-
return sum + (isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121502
|
-
}, 0);
|
|
121503
|
-
|
|
121504
|
-
// 전체 스플리터의 총 픽셀 크기 합계 계산
|
|
121505
|
-
const totalSplitterSize = allSplitters.reduce((sum, splitter) => {
|
|
121506
|
-
return sum + (isHorizontal ? splitter.getBoundingClientRect().width : splitter.getBoundingClientRect().height);
|
|
121507
|
-
}, 0);
|
|
121508
|
-
|
|
121509
|
-
// Flexbox 컨테이너의 전체 유효 공간 계산
|
|
121510
|
-
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
121511
|
-
const totalFlexSpace = totalContainerSize - totalSplitterSize;
|
|
121512
|
-
|
|
121513
121518
|
let flexSum = 0;
|
|
121514
|
-
allPanels.forEach(
|
|
121519
|
+
allPanels.forEach(panel => {
|
|
121515
121520
|
let newSize;
|
|
121516
121521
|
if (panel === prev) {
|
|
121517
121522
|
newSize = newPrevSize;
|
|
@@ -121521,12 +121526,13 @@ class nxSplitter extends HTMLElement {
|
|
|
121521
121526
|
newSize = isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height;
|
|
121522
121527
|
}
|
|
121523
121528
|
|
|
121524
|
-
// 새로운 FlexBasis 계산
|
|
121529
|
+
// ⭐⭐ 새로운 FlexBasis 계산 ⭐⭐
|
|
121525
121530
|
const newFlexBasis = newSize / totalFlexSpace;
|
|
121526
121531
|
panel.style.flex = `${newFlexBasis} ${newFlexBasis} 0`;
|
|
121527
121532
|
flexSum += newFlexBasis;
|
|
121528
121533
|
});
|
|
121529
121534
|
|
|
121535
|
+
// ⭐⭐ 계산된 합계를 로그로 출력하여 확인 ⭐⭐
|
|
121530
121536
|
console.log(`newTotalFlexSpace: ${totalFlexSpace}`);
|
|
121531
121537
|
console.log(`Calculated FlexSum: ${flexSum}`);
|
|
121532
121538
|
};
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121480,7 +121480,26 @@ class nxSplitter extends HTMLElement {
|
|
|
121480
121480
|
|
|
121481
121481
|
const allChildren = Array.from(parent.children);
|
|
121482
121482
|
const allPanels = allChildren.filter(el => el.tagName.toLowerCase() !== 'nx-splitter');
|
|
121483
|
-
|
|
121483
|
+
|
|
121484
|
+
// ⭐⭐ 부모의 총 픽셀 크기 ⭐⭐
|
|
121485
|
+
const totalContainerSize = isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height;
|
|
121486
|
+
|
|
121487
|
+
// ⭐⭐ 모든 스플리터의 총 픽셀 크기 ⭐⭐
|
|
121488
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
121489
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
121490
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
121491
|
+
}
|
|
121492
|
+
return sum;
|
|
121493
|
+
}, 0);
|
|
121494
|
+
|
|
121495
|
+
// ⭐⭐ Flexbox의 'gap' 크기 계산 (하드코딩된 8px 사용) ⭐⭐
|
|
121496
|
+
const gapCount = allChildren.length - 1;
|
|
121497
|
+
const totalGapSize = gapCount * 8;
|
|
121498
|
+
|
|
121499
|
+
// ⭐⭐ Flexbox 컨테이너의 '총 유효 공간' (패널들이 차지할 수 있는 공간) 계산 ⭐⭐
|
|
121500
|
+
const totalFlexSpace = totalContainerSize - totalSplitterSize - totalGapSize;
|
|
121501
|
+
|
|
121502
|
+
console.log(totalContainerSize, totalSplitterSize, totalGapSize, totalFlexSpace);
|
|
121484
121503
|
|
|
121485
121504
|
// 드래그로 인한 픽셀 변화량 계산
|
|
121486
121505
|
const dragOffset = (isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top)) -
|
|
@@ -121492,22 +121511,8 @@ class nxSplitter extends HTMLElement {
|
|
|
121492
121511
|
const newPrevSize = prevSize + dragOffset;
|
|
121493
121512
|
const newNextSize = nextSize - dragOffset;
|
|
121494
121513
|
|
|
121495
|
-
// 모든 패널의 총 픽셀 크기 합계 계산
|
|
121496
|
-
allPanels.reduce((sum, panel) => {
|
|
121497
|
-
return sum + (isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121498
|
-
}, 0);
|
|
121499
|
-
|
|
121500
|
-
// 전체 스플리터의 총 픽셀 크기 합계 계산
|
|
121501
|
-
const totalSplitterSize = allSplitters.reduce((sum, splitter) => {
|
|
121502
|
-
return sum + (isHorizontal ? splitter.getBoundingClientRect().width : splitter.getBoundingClientRect().height);
|
|
121503
|
-
}, 0);
|
|
121504
|
-
|
|
121505
|
-
// Flexbox 컨테이너의 전체 유효 공간 계산
|
|
121506
|
-
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
121507
|
-
const totalFlexSpace = totalContainerSize - totalSplitterSize;
|
|
121508
|
-
|
|
121509
121514
|
let flexSum = 0;
|
|
121510
|
-
allPanels.forEach(
|
|
121515
|
+
allPanels.forEach(panel => {
|
|
121511
121516
|
let newSize;
|
|
121512
121517
|
if (panel === prev) {
|
|
121513
121518
|
newSize = newPrevSize;
|
|
@@ -121517,12 +121522,13 @@ class nxSplitter extends HTMLElement {
|
|
|
121517
121522
|
newSize = isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height;
|
|
121518
121523
|
}
|
|
121519
121524
|
|
|
121520
|
-
// 새로운 FlexBasis 계산
|
|
121525
|
+
// ⭐⭐ 새로운 FlexBasis 계산 ⭐⭐
|
|
121521
121526
|
const newFlexBasis = newSize / totalFlexSpace;
|
|
121522
121527
|
panel.style.flex = `${newFlexBasis} ${newFlexBasis} 0`;
|
|
121523
121528
|
flexSum += newFlexBasis;
|
|
121524
121529
|
});
|
|
121525
121530
|
|
|
121531
|
+
// ⭐⭐ 계산된 합계를 로그로 출력하여 확인 ⭐⭐
|
|
121526
121532
|
console.log(`newTotalFlexSpace: ${totalFlexSpace}`);
|
|
121527
121533
|
console.log(`Calculated FlexSum: ${flexSum}`);
|
|
121528
121534
|
};
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -117,7 +117,26 @@ class nxSplitter extends HTMLElement {
|
|
|
117
117
|
|
|
118
118
|
const allChildren = Array.from(parent.children);
|
|
119
119
|
const allPanels = allChildren.filter(el => el.tagName.toLowerCase() !== 'nx-splitter');
|
|
120
|
-
|
|
120
|
+
|
|
121
|
+
// ⭐⭐ 부모의 총 픽셀 크기 ⭐⭐
|
|
122
|
+
const totalContainerSize = isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height;
|
|
123
|
+
|
|
124
|
+
// ⭐⭐ 모든 스플리터의 총 픽셀 크기 ⭐⭐
|
|
125
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
126
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
127
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
128
|
+
}
|
|
129
|
+
return sum;
|
|
130
|
+
}, 0);
|
|
131
|
+
|
|
132
|
+
// ⭐⭐ Flexbox의 'gap' 크기 계산 (하드코딩된 8px 사용) ⭐⭐
|
|
133
|
+
const gapCount = allChildren.length - 1;
|
|
134
|
+
const totalGapSize = gapCount * 8;
|
|
135
|
+
|
|
136
|
+
// ⭐⭐ Flexbox 컨테이너의 '총 유효 공간' (패널들이 차지할 수 있는 공간) 계산 ⭐⭐
|
|
137
|
+
const totalFlexSpace = totalContainerSize - totalSplitterSize - totalGapSize;
|
|
138
|
+
|
|
139
|
+
console.log(totalContainerSize, totalSplitterSize, totalGapSize, totalFlexSpace);
|
|
121
140
|
|
|
122
141
|
// 드래그로 인한 픽셀 변화량 계산
|
|
123
142
|
const dragOffset = (isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top)) -
|
|
@@ -129,22 +148,8 @@ class nxSplitter extends HTMLElement {
|
|
|
129
148
|
const newPrevSize = prevSize + dragOffset;
|
|
130
149
|
const newNextSize = nextSize - dragOffset;
|
|
131
150
|
|
|
132
|
-
// 모든 패널의 총 픽셀 크기 합계 계산
|
|
133
|
-
const totalPanelSize = allPanels.reduce((sum, panel) => {
|
|
134
|
-
return sum + (isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
135
|
-
}, 0);
|
|
136
|
-
|
|
137
|
-
// 전체 스플리터의 총 픽셀 크기 합계 계산
|
|
138
|
-
const totalSplitterSize = allSplitters.reduce((sum, splitter) => {
|
|
139
|
-
return sum + (isHorizontal ? splitter.getBoundingClientRect().width : splitter.getBoundingClientRect().height);
|
|
140
|
-
}, 0);
|
|
141
|
-
|
|
142
|
-
// Flexbox 컨테이너의 전체 유효 공간 계산
|
|
143
|
-
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
144
|
-
const totalFlexSpace = totalContainerSize - totalSplitterSize;
|
|
145
|
-
|
|
146
151
|
let flexSum = 0;
|
|
147
|
-
allPanels.forEach(
|
|
152
|
+
allPanels.forEach(panel => {
|
|
148
153
|
let newSize;
|
|
149
154
|
if (panel === prev) {
|
|
150
155
|
newSize = newPrevSize;
|
|
@@ -154,12 +159,13 @@ class nxSplitter extends HTMLElement {
|
|
|
154
159
|
newSize = isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
|
-
// 새로운 FlexBasis 계산
|
|
162
|
+
// ⭐⭐ 새로운 FlexBasis 계산 ⭐⭐
|
|
158
163
|
const newFlexBasis = newSize / totalFlexSpace;
|
|
159
164
|
panel.style.flex = `${newFlexBasis} ${newFlexBasis} 0`;
|
|
160
165
|
flexSum += newFlexBasis;
|
|
161
166
|
});
|
|
162
167
|
|
|
168
|
+
// ⭐⭐ 계산된 합계를 로그로 출력하여 확인 ⭐⭐
|
|
163
169
|
console.log(`newTotalFlexSpace: ${totalFlexSpace}`);
|
|
164
170
|
console.log(`Calculated FlexSum: ${flexSum}`);
|
|
165
171
|
};
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -117,7 +117,26 @@ class nxSplitter extends HTMLElement {
|
|
|
117
117
|
|
|
118
118
|
const allChildren = Array.from(parent.children);
|
|
119
119
|
const allPanels = allChildren.filter(el => el.tagName.toLowerCase() !== 'nx-splitter');
|
|
120
|
-
|
|
120
|
+
|
|
121
|
+
// ⭐⭐ 부모의 총 픽셀 크기 ⭐⭐
|
|
122
|
+
const totalContainerSize = isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height;
|
|
123
|
+
|
|
124
|
+
// ⭐⭐ 모든 스플리터의 총 픽셀 크기 ⭐⭐
|
|
125
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
126
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
127
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
128
|
+
}
|
|
129
|
+
return sum;
|
|
130
|
+
}, 0);
|
|
131
|
+
|
|
132
|
+
// ⭐⭐ Flexbox의 'gap' 크기 계산 (하드코딩된 8px 사용) ⭐⭐
|
|
133
|
+
const gapCount = allChildren.length - 1;
|
|
134
|
+
const totalGapSize = gapCount * 8;
|
|
135
|
+
|
|
136
|
+
// ⭐⭐ Flexbox 컨테이너의 '총 유효 공간' (패널들이 차지할 수 있는 공간) 계산 ⭐⭐
|
|
137
|
+
const totalFlexSpace = totalContainerSize - totalSplitterSize - totalGapSize;
|
|
138
|
+
|
|
139
|
+
console.log(totalContainerSize, totalSplitterSize, totalGapSize, totalFlexSpace);
|
|
121
140
|
|
|
122
141
|
// 드래그로 인한 픽셀 변화량 계산
|
|
123
142
|
const dragOffset = (isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top)) -
|
|
@@ -129,22 +148,8 @@ class nxSplitter extends HTMLElement {
|
|
|
129
148
|
const newPrevSize = prevSize + dragOffset;
|
|
130
149
|
const newNextSize = nextSize - dragOffset;
|
|
131
150
|
|
|
132
|
-
// 모든 패널의 총 픽셀 크기 합계 계산
|
|
133
|
-
const totalPanelSize = allPanels.reduce((sum, panel) => {
|
|
134
|
-
return sum + (isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
135
|
-
}, 0);
|
|
136
|
-
|
|
137
|
-
// 전체 스플리터의 총 픽셀 크기 합계 계산
|
|
138
|
-
const totalSplitterSize = allSplitters.reduce((sum, splitter) => {
|
|
139
|
-
return sum + (isHorizontal ? splitter.getBoundingClientRect().width : splitter.getBoundingClientRect().height);
|
|
140
|
-
}, 0);
|
|
141
|
-
|
|
142
|
-
// Flexbox 컨테이너의 전체 유효 공간 계산
|
|
143
|
-
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
144
|
-
const totalFlexSpace = totalContainerSize - totalSplitterSize;
|
|
145
|
-
|
|
146
151
|
let flexSum = 0;
|
|
147
|
-
allPanels.forEach(
|
|
152
|
+
allPanels.forEach(panel => {
|
|
148
153
|
let newSize;
|
|
149
154
|
if (panel === prev) {
|
|
150
155
|
newSize = newPrevSize;
|
|
@@ -154,12 +159,13 @@ class nxSplitter extends HTMLElement {
|
|
|
154
159
|
newSize = isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
|
-
// 새로운 FlexBasis 계산
|
|
162
|
+
// ⭐⭐ 새로운 FlexBasis 계산 ⭐⭐
|
|
158
163
|
const newFlexBasis = newSize / totalFlexSpace;
|
|
159
164
|
panel.style.flex = `${newFlexBasis} ${newFlexBasis} 0`;
|
|
160
165
|
flexSum += newFlexBasis;
|
|
161
166
|
});
|
|
162
167
|
|
|
168
|
+
// ⭐⭐ 계산된 합계를 로그로 출력하여 확인 ⭐⭐
|
|
163
169
|
console.log(`newTotalFlexSpace: ${totalFlexSpace}`);
|
|
164
170
|
console.log(`Calculated FlexSum: ${flexSum}`);
|
|
165
171
|
};
|