ninegrid2 6.1113.0 → 6.1115.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 -19
- package/dist/bundle.esm.js +13 -19
- package/dist/nx/nxLayout2.js +14 -19
- package/package.json +1 -1
- package/src/nx/nxLayout2.js +14 -19
package/dist/bundle.cjs.js
CHANGED
|
@@ -121962,7 +121962,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
121962
121962
|
}
|
|
121963
121963
|
|
|
121964
121964
|
connectedCallback() {
|
|
121965
|
-
this.#originalChildren = Array.from(this.children);
|
|
121965
|
+
this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
|
|
121966
121966
|
this.#render();
|
|
121967
121967
|
}
|
|
121968
121968
|
|
|
@@ -121980,6 +121980,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
121980
121980
|
const children = this.#originalChildren;
|
|
121981
121981
|
if (!children || children.length === 0) return;
|
|
121982
121982
|
|
|
121983
|
+
// 기존 자식 노드를 모두 제거하여 초기화
|
|
121983
121984
|
while (this.firstChild) {
|
|
121984
121985
|
this.removeChild(this.firstChild);
|
|
121985
121986
|
}
|
|
@@ -121987,43 +121988,36 @@ class NxLayout2 extends HTMLElement {
|
|
|
121987
121988
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121988
121989
|
const numRows = columnsLayout.length;
|
|
121989
121990
|
|
|
121991
|
+
// 메인 컨테이너를 Flexbox로 설정
|
|
121990
121992
|
this.style.display = 'flex';
|
|
121991
|
-
this.style.flexDirection = 'column';
|
|
121993
|
+
this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
|
|
121992
121994
|
this.style.width = '100%';
|
|
121993
|
-
this.style.
|
|
121994
|
-
|
|
121995
|
-
// ⭐⭐ 부모 컨테이너의 높이를 제거하여 내용물에 따라 늘어나게 함 ⭐⭐
|
|
121996
|
-
// this.style.height = '100%';
|
|
121995
|
+
//this.style.height = '100%';
|
|
121996
|
+
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
121997
121997
|
|
|
121998
121998
|
let childIndex = 0;
|
|
121999
121999
|
|
|
122000
122000
|
for (let row = 0; row < numRows; row++) {
|
|
122001
122001
|
const numColumns = columnsLayout[row];
|
|
122002
122002
|
|
|
122003
|
+
// 행 래퍼 생성
|
|
122003
122004
|
const rowWrapper = document.createElement('div');
|
|
122004
122005
|
rowWrapper.style.display = 'flex';
|
|
122005
|
-
rowWrapper.style.
|
|
122006
|
-
|
|
122007
|
-
// ⭐⭐ flex 속성을 0 0 auto로 변경하여 내용물 높이만큼만 차지하게 함 ⭐⭐
|
|
122008
|
-
rowWrapper.style.flex = "0 0 auto";
|
|
122006
|
+
rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
|
|
122009
122007
|
rowWrapper.style.width = '100%';
|
|
122010
|
-
rowWrapper.style.
|
|
122011
|
-
rowWrapper.style.
|
|
122012
|
-
rowWrapper.style.
|
|
122013
|
-
rowWrapper.style.minWidth = '0';
|
|
122014
|
-
rowWrapper.style.minHeight = '0';
|
|
122008
|
+
//rowWrapper.style.minWidth = '0';
|
|
122009
|
+
//rowWrapper.style.minHeight = '0';
|
|
122010
|
+
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
122015
122011
|
|
|
122016
122012
|
for (let col = 0; col < numColumns; col++) {
|
|
122017
122013
|
if (children[childIndex]) {
|
|
122018
122014
|
const panel = children[childIndex];
|
|
122019
|
-
|
|
122020
|
-
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
122021
|
-
panel.style.minWidth = '0';
|
|
122022
|
-
panel.style.minHeight = '0';
|
|
122015
|
+
panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
|
|
122023
122016
|
rowWrapper.appendChild(panel);
|
|
122024
122017
|
childIndex++;
|
|
122025
122018
|
}
|
|
122026
122019
|
}
|
|
122020
|
+
|
|
122027
122021
|
this.appendChild(rowWrapper);
|
|
122028
122022
|
}
|
|
122029
122023
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121958,7 +121958,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
121958
121958
|
}
|
|
121959
121959
|
|
|
121960
121960
|
connectedCallback() {
|
|
121961
|
-
this.#originalChildren = Array.from(this.children);
|
|
121961
|
+
this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
|
|
121962
121962
|
this.#render();
|
|
121963
121963
|
}
|
|
121964
121964
|
|
|
@@ -121976,6 +121976,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
121976
121976
|
const children = this.#originalChildren;
|
|
121977
121977
|
if (!children || children.length === 0) return;
|
|
121978
121978
|
|
|
121979
|
+
// 기존 자식 노드를 모두 제거하여 초기화
|
|
121979
121980
|
while (this.firstChild) {
|
|
121980
121981
|
this.removeChild(this.firstChild);
|
|
121981
121982
|
}
|
|
@@ -121983,43 +121984,36 @@ class NxLayout2 extends HTMLElement {
|
|
|
121983
121984
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121984
121985
|
const numRows = columnsLayout.length;
|
|
121985
121986
|
|
|
121987
|
+
// 메인 컨테이너를 Flexbox로 설정
|
|
121986
121988
|
this.style.display = 'flex';
|
|
121987
|
-
this.style.flexDirection = 'column';
|
|
121989
|
+
this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
|
|
121988
121990
|
this.style.width = '100%';
|
|
121989
|
-
this.style.
|
|
121990
|
-
|
|
121991
|
-
// ⭐⭐ 부모 컨테이너의 높이를 제거하여 내용물에 따라 늘어나게 함 ⭐⭐
|
|
121992
|
-
// this.style.height = '100%';
|
|
121991
|
+
//this.style.height = '100%';
|
|
121992
|
+
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
121993
121993
|
|
|
121994
121994
|
let childIndex = 0;
|
|
121995
121995
|
|
|
121996
121996
|
for (let row = 0; row < numRows; row++) {
|
|
121997
121997
|
const numColumns = columnsLayout[row];
|
|
121998
121998
|
|
|
121999
|
+
// 행 래퍼 생성
|
|
121999
122000
|
const rowWrapper = document.createElement('div');
|
|
122000
122001
|
rowWrapper.style.display = 'flex';
|
|
122001
|
-
rowWrapper.style.
|
|
122002
|
-
|
|
122003
|
-
// ⭐⭐ flex 속성을 0 0 auto로 변경하여 내용물 높이만큼만 차지하게 함 ⭐⭐
|
|
122004
|
-
rowWrapper.style.flex = "0 0 auto";
|
|
122002
|
+
rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
|
|
122005
122003
|
rowWrapper.style.width = '100%';
|
|
122006
|
-
rowWrapper.style.
|
|
122007
|
-
rowWrapper.style.
|
|
122008
|
-
rowWrapper.style.
|
|
122009
|
-
rowWrapper.style.minWidth = '0';
|
|
122010
|
-
rowWrapper.style.minHeight = '0';
|
|
122004
|
+
//rowWrapper.style.minWidth = '0';
|
|
122005
|
+
//rowWrapper.style.minHeight = '0';
|
|
122006
|
+
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
122011
122007
|
|
|
122012
122008
|
for (let col = 0; col < numColumns; col++) {
|
|
122013
122009
|
if (children[childIndex]) {
|
|
122014
122010
|
const panel = children[childIndex];
|
|
122015
|
-
|
|
122016
|
-
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
122017
|
-
panel.style.minWidth = '0';
|
|
122018
|
-
panel.style.minHeight = '0';
|
|
122011
|
+
panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
|
|
122019
122012
|
rowWrapper.appendChild(panel);
|
|
122020
122013
|
childIndex++;
|
|
122021
122014
|
}
|
|
122022
122015
|
}
|
|
122016
|
+
|
|
122023
122017
|
this.appendChild(rowWrapper);
|
|
122024
122018
|
}
|
|
122025
122019
|
}
|
package/dist/nx/nxLayout2.js
CHANGED
|
@@ -9,7 +9,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
connectedCallback() {
|
|
12
|
-
this.#originalChildren = Array.from(this.children);
|
|
12
|
+
this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
|
|
13
13
|
this.#render();
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -27,6 +27,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
27
27
|
const children = this.#originalChildren;
|
|
28
28
|
if (!children || children.length === 0) return;
|
|
29
29
|
|
|
30
|
+
// 기존 자식 노드를 모두 제거하여 초기화
|
|
30
31
|
while (this.firstChild) {
|
|
31
32
|
this.removeChild(this.firstChild);
|
|
32
33
|
}
|
|
@@ -34,43 +35,37 @@ class NxLayout2 extends HTMLElement {
|
|
|
34
35
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
35
36
|
const numRows = columnsLayout.length;
|
|
36
37
|
|
|
38
|
+
// 메인 컨테이너를 Flexbox로 설정
|
|
37
39
|
this.style.display = 'flex';
|
|
38
|
-
this.style.flexDirection = 'column';
|
|
40
|
+
this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
|
|
39
41
|
this.style.width = '100%';
|
|
40
|
-
this.style.
|
|
41
|
-
|
|
42
|
-
// ⭐⭐ 부모 컨테이너의 높이를 제거하여 내용물에 따라 늘어나게 함 ⭐⭐
|
|
43
|
-
// this.style.height = '100%';
|
|
42
|
+
//this.style.height = '100%';
|
|
43
|
+
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
44
44
|
|
|
45
45
|
let childIndex = 0;
|
|
46
|
+
const flexBasis = 100 / numRows; // 각 행의 기본 높이 비율
|
|
46
47
|
|
|
47
48
|
for (let row = 0; row < numRows; row++) {
|
|
48
49
|
const numColumns = columnsLayout[row];
|
|
49
50
|
|
|
51
|
+
// 행 래퍼 생성
|
|
50
52
|
const rowWrapper = document.createElement('div');
|
|
51
53
|
rowWrapper.style.display = 'flex';
|
|
52
|
-
rowWrapper.style.
|
|
53
|
-
|
|
54
|
-
// ⭐⭐ flex 속성을 0 0 auto로 변경하여 내용물 높이만큼만 차지하게 함 ⭐⭐
|
|
55
|
-
rowWrapper.style.flex = "0 0 auto";
|
|
54
|
+
rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
|
|
56
55
|
rowWrapper.style.width = '100%';
|
|
57
|
-
rowWrapper.style.
|
|
58
|
-
rowWrapper.style.
|
|
59
|
-
rowWrapper.style.
|
|
60
|
-
rowWrapper.style.minWidth = '0';
|
|
61
|
-
rowWrapper.style.minHeight = '0';
|
|
56
|
+
//rowWrapper.style.minWidth = '0';
|
|
57
|
+
//rowWrapper.style.minHeight = '0';
|
|
58
|
+
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
62
59
|
|
|
63
60
|
for (let col = 0; col < numColumns; col++) {
|
|
64
61
|
if (children[childIndex]) {
|
|
65
62
|
const panel = children[childIndex];
|
|
66
|
-
|
|
67
|
-
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
68
|
-
panel.style.minWidth = '0';
|
|
69
|
-
panel.style.minHeight = '0';
|
|
63
|
+
panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
|
|
70
64
|
rowWrapper.appendChild(panel);
|
|
71
65
|
childIndex++;
|
|
72
66
|
}
|
|
73
67
|
}
|
|
68
|
+
|
|
74
69
|
this.appendChild(rowWrapper);
|
|
75
70
|
}
|
|
76
71
|
}
|
package/package.json
CHANGED
package/src/nx/nxLayout2.js
CHANGED
|
@@ -9,7 +9,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
connectedCallback() {
|
|
12
|
-
this.#originalChildren = Array.from(this.children);
|
|
12
|
+
this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
|
|
13
13
|
this.#render();
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -27,6 +27,7 @@ class NxLayout2 extends HTMLElement {
|
|
|
27
27
|
const children = this.#originalChildren;
|
|
28
28
|
if (!children || children.length === 0) return;
|
|
29
29
|
|
|
30
|
+
// 기존 자식 노드를 모두 제거하여 초기화
|
|
30
31
|
while (this.firstChild) {
|
|
31
32
|
this.removeChild(this.firstChild);
|
|
32
33
|
}
|
|
@@ -34,43 +35,37 @@ class NxLayout2 extends HTMLElement {
|
|
|
34
35
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
35
36
|
const numRows = columnsLayout.length;
|
|
36
37
|
|
|
38
|
+
// 메인 컨테이너를 Flexbox로 설정
|
|
37
39
|
this.style.display = 'flex';
|
|
38
|
-
this.style.flexDirection = 'column';
|
|
40
|
+
this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
|
|
39
41
|
this.style.width = '100%';
|
|
40
|
-
this.style.
|
|
41
|
-
|
|
42
|
-
// ⭐⭐ 부모 컨테이너의 높이를 제거하여 내용물에 따라 늘어나게 함 ⭐⭐
|
|
43
|
-
// this.style.height = '100%';
|
|
42
|
+
//this.style.height = '100%';
|
|
43
|
+
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
44
44
|
|
|
45
45
|
let childIndex = 0;
|
|
46
|
+
const flexBasis = 100 / numRows; // 각 행의 기본 높이 비율
|
|
46
47
|
|
|
47
48
|
for (let row = 0; row < numRows; row++) {
|
|
48
49
|
const numColumns = columnsLayout[row];
|
|
49
50
|
|
|
51
|
+
// 행 래퍼 생성
|
|
50
52
|
const rowWrapper = document.createElement('div');
|
|
51
53
|
rowWrapper.style.display = 'flex';
|
|
52
|
-
rowWrapper.style.
|
|
53
|
-
|
|
54
|
-
// ⭐⭐ flex 속성을 0 0 auto로 변경하여 내용물 높이만큼만 차지하게 함 ⭐⭐
|
|
55
|
-
rowWrapper.style.flex = "0 0 auto";
|
|
54
|
+
rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
|
|
56
55
|
rowWrapper.style.width = '100%';
|
|
57
|
-
rowWrapper.style.
|
|
58
|
-
rowWrapper.style.
|
|
59
|
-
rowWrapper.style.
|
|
60
|
-
rowWrapper.style.minWidth = '0';
|
|
61
|
-
rowWrapper.style.minHeight = '0';
|
|
56
|
+
//rowWrapper.style.minWidth = '0';
|
|
57
|
+
//rowWrapper.style.minHeight = '0';
|
|
58
|
+
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
62
59
|
|
|
63
60
|
for (let col = 0; col < numColumns; col++) {
|
|
64
61
|
if (children[childIndex]) {
|
|
65
62
|
const panel = children[childIndex];
|
|
66
|
-
|
|
67
|
-
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
68
|
-
panel.style.minWidth = '0';
|
|
69
|
-
panel.style.minHeight = '0';
|
|
63
|
+
panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
|
|
70
64
|
rowWrapper.appendChild(panel);
|
|
71
65
|
childIndex++;
|
|
72
66
|
}
|
|
73
67
|
}
|
|
68
|
+
|
|
74
69
|
this.appendChild(rowWrapper);
|
|
75
70
|
}
|
|
76
71
|
}
|