ninegrid2 6.1083.0 → 6.1085.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 +13 -16
- package/dist/bundle.esm.js +13 -16
- package/dist/nx/nxSplitter.js +13 -16
- package/package.json +1 -1
- package/src/nx/nxSplitter.js +13 -16
package/dist/bundle.cjs.js
CHANGED
|
@@ -121485,20 +121485,11 @@ class nxSplitter extends HTMLElement {
|
|
|
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 initialPanelSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121490
|
-
|
|
121491
|
-
// 스플리터의 초기 위치 (부모 기준)
|
|
121492
|
-
const initialSplitterPos = isHorizontal ? this.getBoundingClientRect().left - parent.getBoundingClientRect().left : this.getBoundingClientRect().top - parent.getBoundingClientRect().top;
|
|
121493
|
-
|
|
121494
|
-
// 드래그 바의 최종 위치 (부모 기준)
|
|
121495
121488
|
const finalDragBarPos = isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top);
|
|
121489
|
+
const dragOffset = finalDragBarPos - initialSplitterPosInParent;
|
|
121496
121490
|
|
|
121497
|
-
|
|
121498
|
-
const
|
|
121499
|
-
|
|
121500
|
-
const prevSize = initialPanelSizes[allPanels.indexOf(prev)];
|
|
121501
|
-
const nextSize = initialPanelSizes[allPanels.indexOf(next)];
|
|
121491
|
+
const prevSize = isHorizontal ? prev.getBoundingClientRect().width : prev.getBoundingClientRect().height;// - clickOffset;
|
|
121492
|
+
const nextSize = isHorizontal ? next.getBoundingClientRect().width : next.getBoundingClientRect().height;
|
|
121502
121493
|
|
|
121503
121494
|
let newPrevSize = prevSize + dragOffset;
|
|
121504
121495
|
let newNextSize = nextSize - dragOffset;
|
|
@@ -121513,9 +121504,15 @@ class nxSplitter extends HTMLElement {
|
|
|
121513
121504
|
newNextSize = 0;
|
|
121514
121505
|
}
|
|
121515
121506
|
|
|
121516
|
-
|
|
121517
|
-
|
|
121518
|
-
|
|
121507
|
+
console.log(prevSize, nextSize, newPrevSize, newNextSize);
|
|
121508
|
+
|
|
121509
|
+
const initialSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121510
|
+
|
|
121511
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
121512
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
121513
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
121514
|
+
}
|
|
121515
|
+
return sum;
|
|
121519
121516
|
}, 0);
|
|
121520
121517
|
|
|
121521
121518
|
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
@@ -121529,7 +121526,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121529
121526
|
} else if (panel === next) {
|
|
121530
121527
|
newSize = newNextSize;
|
|
121531
121528
|
} else {
|
|
121532
|
-
newSize =
|
|
121529
|
+
newSize = initialSizes[index];
|
|
121533
121530
|
}
|
|
121534
121531
|
|
|
121535
121532
|
const newFlexBasis = newSize / totalFlexSpace;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121481,20 +121481,11 @@ class nxSplitter extends HTMLElement {
|
|
|
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 initialPanelSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121486
|
-
|
|
121487
|
-
// 스플리터의 초기 위치 (부모 기준)
|
|
121488
|
-
const initialSplitterPos = isHorizontal ? this.getBoundingClientRect().left - parent.getBoundingClientRect().left : this.getBoundingClientRect().top - parent.getBoundingClientRect().top;
|
|
121489
|
-
|
|
121490
|
-
// 드래그 바의 최종 위치 (부모 기준)
|
|
121491
121484
|
const finalDragBarPos = isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top);
|
|
121485
|
+
const dragOffset = finalDragBarPos - initialSplitterPosInParent;
|
|
121492
121486
|
|
|
121493
|
-
|
|
121494
|
-
const
|
|
121495
|
-
|
|
121496
|
-
const prevSize = initialPanelSizes[allPanels.indexOf(prev)];
|
|
121497
|
-
const nextSize = initialPanelSizes[allPanels.indexOf(next)];
|
|
121487
|
+
const prevSize = isHorizontal ? prev.getBoundingClientRect().width : prev.getBoundingClientRect().height;// - clickOffset;
|
|
121488
|
+
const nextSize = isHorizontal ? next.getBoundingClientRect().width : next.getBoundingClientRect().height;
|
|
121498
121489
|
|
|
121499
121490
|
let newPrevSize = prevSize + dragOffset;
|
|
121500
121491
|
let newNextSize = nextSize - dragOffset;
|
|
@@ -121509,9 +121500,15 @@ class nxSplitter extends HTMLElement {
|
|
|
121509
121500
|
newNextSize = 0;
|
|
121510
121501
|
}
|
|
121511
121502
|
|
|
121512
|
-
|
|
121513
|
-
|
|
121514
|
-
|
|
121503
|
+
console.log(prevSize, nextSize, newPrevSize, newNextSize);
|
|
121504
|
+
|
|
121505
|
+
const initialSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
121506
|
+
|
|
121507
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
121508
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
121509
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
121510
|
+
}
|
|
121511
|
+
return sum;
|
|
121515
121512
|
}, 0);
|
|
121516
121513
|
|
|
121517
121514
|
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
@@ -121525,7 +121522,7 @@ class nxSplitter extends HTMLElement {
|
|
|
121525
121522
|
} else if (panel === next) {
|
|
121526
121523
|
newSize = newNextSize;
|
|
121527
121524
|
} else {
|
|
121528
|
-
newSize =
|
|
121525
|
+
newSize = initialSizes[index];
|
|
121529
121526
|
}
|
|
121530
121527
|
|
|
121531
121528
|
const newFlexBasis = newSize / totalFlexSpace;
|
package/dist/nx/nxSplitter.js
CHANGED
|
@@ -118,20 +118,11 @@ class nxSplitter extends HTMLElement {
|
|
|
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 initialPanelSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
123
|
-
|
|
124
|
-
// 스플리터의 초기 위치 (부모 기준)
|
|
125
|
-
const initialSplitterPos = isHorizontal ? this.getBoundingClientRect().left - parent.getBoundingClientRect().left : this.getBoundingClientRect().top - parent.getBoundingClientRect().top;
|
|
126
|
-
|
|
127
|
-
// 드래그 바의 최종 위치 (부모 기준)
|
|
128
121
|
const finalDragBarPos = isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top);
|
|
122
|
+
const dragOffset = finalDragBarPos - initialSplitterPosInParent;
|
|
129
123
|
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const prevSize = initialPanelSizes[allPanels.indexOf(prev)];
|
|
134
|
-
const nextSize = initialPanelSizes[allPanels.indexOf(next)];
|
|
124
|
+
const prevSize = isHorizontal ? prev.getBoundingClientRect().width : prev.getBoundingClientRect().height;// - clickOffset;
|
|
125
|
+
const nextSize = isHorizontal ? next.getBoundingClientRect().width : next.getBoundingClientRect().height;
|
|
135
126
|
|
|
136
127
|
let newPrevSize = prevSize + dragOffset;
|
|
137
128
|
let newNextSize = nextSize - dragOffset;
|
|
@@ -146,9 +137,15 @@ class nxSplitter extends HTMLElement {
|
|
|
146
137
|
newNextSize = 0;
|
|
147
138
|
}
|
|
148
139
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
140
|
+
console.log(prevSize, nextSize, newPrevSize, newNextSize);
|
|
141
|
+
|
|
142
|
+
const initialSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
143
|
+
|
|
144
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
145
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
146
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
147
|
+
}
|
|
148
|
+
return sum;
|
|
152
149
|
}, 0);
|
|
153
150
|
|
|
154
151
|
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
@@ -162,7 +159,7 @@ class nxSplitter extends HTMLElement {
|
|
|
162
159
|
} else if (panel === next) {
|
|
163
160
|
newSize = newNextSize;
|
|
164
161
|
} else {
|
|
165
|
-
newSize =
|
|
162
|
+
newSize = initialSizes[index];
|
|
166
163
|
}
|
|
167
164
|
|
|
168
165
|
const newFlexBasis = newSize / totalFlexSpace;
|
package/package.json
CHANGED
package/src/nx/nxSplitter.js
CHANGED
|
@@ -118,20 +118,11 @@ class nxSplitter extends HTMLElement {
|
|
|
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 initialPanelSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
123
|
-
|
|
124
|
-
// 스플리터의 초기 위치 (부모 기준)
|
|
125
|
-
const initialSplitterPos = isHorizontal ? this.getBoundingClientRect().left - parent.getBoundingClientRect().left : this.getBoundingClientRect().top - parent.getBoundingClientRect().top;
|
|
126
|
-
|
|
127
|
-
// 드래그 바의 최종 위치 (부모 기준)
|
|
128
121
|
const finalDragBarPos = isHorizontal ? parseFloat(dragBar.style.left) : parseFloat(dragBar.style.top);
|
|
122
|
+
const dragOffset = finalDragBarPos - initialSplitterPosInParent;
|
|
129
123
|
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const prevSize = initialPanelSizes[allPanels.indexOf(prev)];
|
|
134
|
-
const nextSize = initialPanelSizes[allPanels.indexOf(next)];
|
|
124
|
+
const prevSize = isHorizontal ? prev.getBoundingClientRect().width : prev.getBoundingClientRect().height;// - clickOffset;
|
|
125
|
+
const nextSize = isHorizontal ? next.getBoundingClientRect().width : next.getBoundingClientRect().height;
|
|
135
126
|
|
|
136
127
|
let newPrevSize = prevSize + dragOffset;
|
|
137
128
|
let newNextSize = nextSize - dragOffset;
|
|
@@ -146,9 +137,15 @@ class nxSplitter extends HTMLElement {
|
|
|
146
137
|
newNextSize = 0;
|
|
147
138
|
}
|
|
148
139
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
140
|
+
console.log(prevSize, nextSize, newPrevSize, newNextSize);
|
|
141
|
+
|
|
142
|
+
const initialSizes = allPanels.map(panel => isHorizontal ? panel.getBoundingClientRect().width : panel.getBoundingClientRect().height);
|
|
143
|
+
|
|
144
|
+
const totalSplitterSize = allChildren.reduce((sum, child) => {
|
|
145
|
+
if (child.tagName.toLowerCase() === 'nx-splitter') {
|
|
146
|
+
return sum + (isHorizontal ? child.getBoundingClientRect().width : child.getBoundingClientRect().height);
|
|
147
|
+
}
|
|
148
|
+
return sum;
|
|
152
149
|
}, 0);
|
|
153
150
|
|
|
154
151
|
const totalContainerSize = (isHorizontal ? parent.getBoundingClientRect().width : parent.getBoundingClientRect().height);
|
|
@@ -162,7 +159,7 @@ class nxSplitter extends HTMLElement {
|
|
|
162
159
|
} else if (panel === next) {
|
|
163
160
|
newSize = newNextSize;
|
|
164
161
|
} else {
|
|
165
|
-
newSize =
|
|
162
|
+
newSize = initialSizes[index];
|
|
166
163
|
}
|
|
167
164
|
|
|
168
165
|
const newFlexBasis = newSize / totalFlexSpace;
|