ninegrid2 6.987.0 → 6.989.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 +24 -6
- package/dist/bundle.esm.js +24 -6
- package/dist/nx/nxLayout.js +24 -6
- package/package.json +1 -1
- package/src/nx/nxLayout.js +24 -6
package/dist/bundle.cjs.js
CHANGED
|
@@ -121915,20 +121915,24 @@ class NxLayout extends HTMLElement {
|
|
|
121915
121915
|
const children = Array.from(this.children);
|
|
121916
121916
|
if (children.length === 0) return;
|
|
121917
121917
|
|
|
121918
|
-
// 기존 자식 노드를 안전하게 제거
|
|
121919
121918
|
while (this.firstChild) {
|
|
121920
121919
|
this.removeChild(this.firstChild);
|
|
121921
121920
|
}
|
|
121922
121921
|
|
|
121923
|
-
console.log("
|
|
121922
|
+
console.log("11111");
|
|
121924
121923
|
|
|
121925
121924
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121926
121925
|
const numRows = columnsLayout.length;
|
|
121927
121926
|
|
|
121927
|
+
let gridTemplate = '';
|
|
121928
|
+
for (const numCols of columnsLayout) {
|
|
121929
|
+
gridTemplate += `1fr `; // 행의 높이
|
|
121930
|
+
}
|
|
121931
|
+
|
|
121928
121932
|
this.style.display = 'grid';
|
|
121929
121933
|
this.style.width = '100%';
|
|
121930
121934
|
this.style.height = '100%';
|
|
121931
|
-
this.style.gridTemplateRows =
|
|
121935
|
+
this.style.gridTemplateRows = gridTemplate.trim();
|
|
121932
121936
|
|
|
121933
121937
|
let childIndex = 0;
|
|
121934
121938
|
|
|
@@ -121936,16 +121940,29 @@ class NxLayout extends HTMLElement {
|
|
|
121936
121940
|
const numColumns = columnsLayout[row];
|
|
121937
121941
|
const rowWrapper = document.createElement('div');
|
|
121938
121942
|
rowWrapper.style.display = 'grid';
|
|
121939
|
-
|
|
121940
|
-
|
|
121943
|
+
|
|
121944
|
+
let columnTemplate = '';
|
|
121945
|
+
for (let i = 0; i < numColumns; i++) {
|
|
121946
|
+
columnTemplate += '1fr ';
|
|
121947
|
+
if (i < numColumns - 1) {
|
|
121948
|
+
columnTemplate += '8px ';
|
|
121949
|
+
}
|
|
121950
|
+
}
|
|
121951
|
+
rowWrapper.style.gridTemplateColumns = columnTemplate.trim();
|
|
121941
121952
|
rowWrapper.style.height = '100%';
|
|
121942
121953
|
|
|
121943
121954
|
for (let col = 0; col < numColumns; col++) {
|
|
121944
121955
|
if (children[childIndex]) {
|
|
121945
|
-
// 불필요한 래퍼
|
|
121956
|
+
// 불필요한 래퍼(wrapper)를 제거하고 원본 자식 요소를 직접 추가
|
|
121946
121957
|
rowWrapper.appendChild(children[childIndex]);
|
|
121947
121958
|
childIndex++;
|
|
121948
121959
|
}
|
|
121960
|
+
|
|
121961
|
+
if (col < numColumns - 1) {
|
|
121962
|
+
const splitter = document.createElement('nx-splitter');
|
|
121963
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
121964
|
+
rowWrapper.appendChild(splitter);
|
|
121965
|
+
}
|
|
121949
121966
|
}
|
|
121950
121967
|
|
|
121951
121968
|
this.appendChild(rowWrapper);
|
|
@@ -121953,6 +121970,7 @@ class NxLayout extends HTMLElement {
|
|
|
121953
121970
|
if (row < numRows - 1) {
|
|
121954
121971
|
const splitter = document.createElement('nx-splitter');
|
|
121955
121972
|
splitter.setAttribute('direction', 'vertical');
|
|
121973
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
121956
121974
|
this.appendChild(splitter);
|
|
121957
121975
|
}
|
|
121958
121976
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121911,20 +121911,24 @@ class NxLayout extends HTMLElement {
|
|
|
121911
121911
|
const children = Array.from(this.children);
|
|
121912
121912
|
if (children.length === 0) return;
|
|
121913
121913
|
|
|
121914
|
-
// 기존 자식 노드를 안전하게 제거
|
|
121915
121914
|
while (this.firstChild) {
|
|
121916
121915
|
this.removeChild(this.firstChild);
|
|
121917
121916
|
}
|
|
121918
121917
|
|
|
121919
|
-
console.log("
|
|
121918
|
+
console.log("11111");
|
|
121920
121919
|
|
|
121921
121920
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121922
121921
|
const numRows = columnsLayout.length;
|
|
121923
121922
|
|
|
121923
|
+
let gridTemplate = '';
|
|
121924
|
+
for (const numCols of columnsLayout) {
|
|
121925
|
+
gridTemplate += `1fr `; // 행의 높이
|
|
121926
|
+
}
|
|
121927
|
+
|
|
121924
121928
|
this.style.display = 'grid';
|
|
121925
121929
|
this.style.width = '100%';
|
|
121926
121930
|
this.style.height = '100%';
|
|
121927
|
-
this.style.gridTemplateRows =
|
|
121931
|
+
this.style.gridTemplateRows = gridTemplate.trim();
|
|
121928
121932
|
|
|
121929
121933
|
let childIndex = 0;
|
|
121930
121934
|
|
|
@@ -121932,16 +121936,29 @@ class NxLayout extends HTMLElement {
|
|
|
121932
121936
|
const numColumns = columnsLayout[row];
|
|
121933
121937
|
const rowWrapper = document.createElement('div');
|
|
121934
121938
|
rowWrapper.style.display = 'grid';
|
|
121935
|
-
|
|
121936
|
-
|
|
121939
|
+
|
|
121940
|
+
let columnTemplate = '';
|
|
121941
|
+
for (let i = 0; i < numColumns; i++) {
|
|
121942
|
+
columnTemplate += '1fr ';
|
|
121943
|
+
if (i < numColumns - 1) {
|
|
121944
|
+
columnTemplate += '8px ';
|
|
121945
|
+
}
|
|
121946
|
+
}
|
|
121947
|
+
rowWrapper.style.gridTemplateColumns = columnTemplate.trim();
|
|
121937
121948
|
rowWrapper.style.height = '100%';
|
|
121938
121949
|
|
|
121939
121950
|
for (let col = 0; col < numColumns; col++) {
|
|
121940
121951
|
if (children[childIndex]) {
|
|
121941
|
-
// 불필요한 래퍼
|
|
121952
|
+
// 불필요한 래퍼(wrapper)를 제거하고 원본 자식 요소를 직접 추가
|
|
121942
121953
|
rowWrapper.appendChild(children[childIndex]);
|
|
121943
121954
|
childIndex++;
|
|
121944
121955
|
}
|
|
121956
|
+
|
|
121957
|
+
if (col < numColumns - 1) {
|
|
121958
|
+
const splitter = document.createElement('nx-splitter');
|
|
121959
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
121960
|
+
rowWrapper.appendChild(splitter);
|
|
121961
|
+
}
|
|
121945
121962
|
}
|
|
121946
121963
|
|
|
121947
121964
|
this.appendChild(rowWrapper);
|
|
@@ -121949,6 +121966,7 @@ class NxLayout extends HTMLElement {
|
|
|
121949
121966
|
if (row < numRows - 1) {
|
|
121950
121967
|
const splitter = document.createElement('nx-splitter');
|
|
121951
121968
|
splitter.setAttribute('direction', 'vertical');
|
|
121969
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
121952
121970
|
this.appendChild(splitter);
|
|
121953
121971
|
}
|
|
121954
121972
|
}
|
package/dist/nx/nxLayout.js
CHANGED
|
@@ -20,20 +20,24 @@ class NxLayout extends HTMLElement {
|
|
|
20
20
|
const children = Array.from(this.children);
|
|
21
21
|
if (children.length === 0) return;
|
|
22
22
|
|
|
23
|
-
// 기존 자식 노드를 안전하게 제거
|
|
24
23
|
while (this.firstChild) {
|
|
25
24
|
this.removeChild(this.firstChild);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
console.log("
|
|
27
|
+
console.log("11111")
|
|
29
28
|
|
|
30
29
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
31
30
|
const numRows = columnsLayout.length;
|
|
32
31
|
|
|
32
|
+
let gridTemplate = '';
|
|
33
|
+
for (const numCols of columnsLayout) {
|
|
34
|
+
gridTemplate += `1fr `; // 행의 높이
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
this.style.display = 'grid';
|
|
34
38
|
this.style.width = '100%';
|
|
35
39
|
this.style.height = '100%';
|
|
36
|
-
this.style.gridTemplateRows =
|
|
40
|
+
this.style.gridTemplateRows = gridTemplate.trim();
|
|
37
41
|
|
|
38
42
|
let childIndex = 0;
|
|
39
43
|
|
|
@@ -41,16 +45,29 @@ class NxLayout extends HTMLElement {
|
|
|
41
45
|
const numColumns = columnsLayout[row];
|
|
42
46
|
const rowWrapper = document.createElement('div');
|
|
43
47
|
rowWrapper.style.display = 'grid';
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
let columnTemplate = '';
|
|
50
|
+
for (let i = 0; i < numColumns; i++) {
|
|
51
|
+
columnTemplate += '1fr ';
|
|
52
|
+
if (i < numColumns - 1) {
|
|
53
|
+
columnTemplate += '8px ';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
rowWrapper.style.gridTemplateColumns = columnTemplate.trim();
|
|
46
57
|
rowWrapper.style.height = '100%';
|
|
47
58
|
|
|
48
59
|
for (let col = 0; col < numColumns; col++) {
|
|
49
60
|
if (children[childIndex]) {
|
|
50
|
-
// 불필요한 래퍼
|
|
61
|
+
// 불필요한 래퍼(wrapper)를 제거하고 원본 자식 요소를 직접 추가
|
|
51
62
|
rowWrapper.appendChild(children[childIndex]);
|
|
52
63
|
childIndex++;
|
|
53
64
|
}
|
|
65
|
+
|
|
66
|
+
if (col < numColumns - 1) {
|
|
67
|
+
const splitter = document.createElement('nx-splitter');
|
|
68
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
69
|
+
rowWrapper.appendChild(splitter);
|
|
70
|
+
}
|
|
54
71
|
}
|
|
55
72
|
|
|
56
73
|
this.appendChild(rowWrapper);
|
|
@@ -58,6 +75,7 @@ class NxLayout extends HTMLElement {
|
|
|
58
75
|
if (row < numRows - 1) {
|
|
59
76
|
const splitter = document.createElement('nx-splitter');
|
|
60
77
|
splitter.setAttribute('direction', 'vertical');
|
|
78
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
61
79
|
this.appendChild(splitter);
|
|
62
80
|
}
|
|
63
81
|
}
|
package/package.json
CHANGED
package/src/nx/nxLayout.js
CHANGED
|
@@ -20,20 +20,24 @@ class NxLayout extends HTMLElement {
|
|
|
20
20
|
const children = Array.from(this.children);
|
|
21
21
|
if (children.length === 0) return;
|
|
22
22
|
|
|
23
|
-
// 기존 자식 노드를 안전하게 제거
|
|
24
23
|
while (this.firstChild) {
|
|
25
24
|
this.removeChild(this.firstChild);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
console.log("
|
|
27
|
+
console.log("11111")
|
|
29
28
|
|
|
30
29
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
31
30
|
const numRows = columnsLayout.length;
|
|
32
31
|
|
|
32
|
+
let gridTemplate = '';
|
|
33
|
+
for (const numCols of columnsLayout) {
|
|
34
|
+
gridTemplate += `1fr `; // 행의 높이
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
this.style.display = 'grid';
|
|
34
38
|
this.style.width = '100%';
|
|
35
39
|
this.style.height = '100%';
|
|
36
|
-
this.style.gridTemplateRows =
|
|
40
|
+
this.style.gridTemplateRows = gridTemplate.trim();
|
|
37
41
|
|
|
38
42
|
let childIndex = 0;
|
|
39
43
|
|
|
@@ -41,16 +45,29 @@ class NxLayout extends HTMLElement {
|
|
|
41
45
|
const numColumns = columnsLayout[row];
|
|
42
46
|
const rowWrapper = document.createElement('div');
|
|
43
47
|
rowWrapper.style.display = 'grid';
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
let columnTemplate = '';
|
|
50
|
+
for (let i = 0; i < numColumns; i++) {
|
|
51
|
+
columnTemplate += '1fr ';
|
|
52
|
+
if (i < numColumns - 1) {
|
|
53
|
+
columnTemplate += '8px ';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
rowWrapper.style.gridTemplateColumns = columnTemplate.trim();
|
|
46
57
|
rowWrapper.style.height = '100%';
|
|
47
58
|
|
|
48
59
|
for (let col = 0; col < numColumns; col++) {
|
|
49
60
|
if (children[childIndex]) {
|
|
50
|
-
// 불필요한 래퍼
|
|
61
|
+
// 불필요한 래퍼(wrapper)를 제거하고 원본 자식 요소를 직접 추가
|
|
51
62
|
rowWrapper.appendChild(children[childIndex]);
|
|
52
63
|
childIndex++;
|
|
53
64
|
}
|
|
65
|
+
|
|
66
|
+
if (col < numColumns - 1) {
|
|
67
|
+
const splitter = document.createElement('nx-splitter');
|
|
68
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
69
|
+
rowWrapper.appendChild(splitter);
|
|
70
|
+
}
|
|
54
71
|
}
|
|
55
72
|
|
|
56
73
|
this.appendChild(rowWrapper);
|
|
@@ -58,6 +75,7 @@ class NxLayout extends HTMLElement {
|
|
|
58
75
|
if (row < numRows - 1) {
|
|
59
76
|
const splitter = document.createElement('nx-splitter');
|
|
60
77
|
splitter.setAttribute('direction', 'vertical');
|
|
78
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
61
79
|
this.appendChild(splitter);
|
|
62
80
|
}
|
|
63
81
|
}
|