Skip to content

Commit a261a79

Browse files
authored
Merge pull request #2421 from entrylabs/develop
develop-hw 최신화
2 parents 2b80b7c + c23b0d6 commit a261a79

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-16
lines changed

src/class/source/DataTableSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class DataTableSource {
145145

146146
isExist(index) {
147147
const isExist = this.getValue(index);
148-
return !!(isExist === 0 || isExist === null || isExist);
148+
return !!(isExist === null || isExist);
149149
}
150150

151151
appendRow(data) {

src/css/components/popup.less

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,21 @@
8989
.ai_learning {
9090
overflow: hidden;
9191
.learningInputPopup {
92-
height: 435px;
93-
width: 245px;
94-
background-color: white;
92+
border: none;
93+
height: 248px;
94+
width: 294px;
95+
background-color: #fff;
96+
border-bottom-right-radius: 5px;
97+
border-bottom-left-radius: 5px;
9598
}
9699
.learningInputPopup.text {
97-
height: 200px;
98-
width: 269px;
100+
height: 165px;
101+
}
102+
.learningInputPopup.image {
103+
height: 245px;
99104
}
100105
.learningInputPopup.speech {
101-
width: 274px;
102-
height: 310px;
106+
height: 250px;
103107
}
104108
}
105109
}

src/extensions/dmet.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ class dmetTable {
141141
return this.#array[key - 1].value;
142142
} else if (Array.isArray(key)) {
143143
const [rowKey, ...keys] = key;
144-
const { value: row } = this.#array[rowKey - 1] || {};
144+
let { value: row } = this.#array[rowKey - 1] || {};
145+
if (rowKey === 0) {
146+
row = this.#fields;
147+
}
145148
if (keys.length && row) {
146149
return _get(row, `[${keys.map((x) => x - 1).join('][')}]`);
147150
} else {
@@ -333,10 +336,14 @@ class dmetTable {
333336
key = index;
334337
}
335338
const { value: row, key: objKey, x, y } = this.getRow(key);
336-
if (!row) {
337-
throw { message: 'not found row' };
339+
if (x === -1) {
340+
this.#fields[y] = value;
341+
} else {
342+
if (!row) {
343+
throw { message: `not found row ${y}` };
344+
}
345+
row[y] = value;
338346
}
339-
row[y] = value;
340347
return this.getOperation({ type: 'replace', key, index, data: value, newKey });
341348
}
342349
}

src/playground/blocks/block_analysis.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ module.exports = {
345345
null,
346346
{
347347
type: 'text',
348-
params: ['1'],
348+
params: ['2'],
349349
},
350350
{
351351
type: 'get_table_fields',
@@ -390,7 +390,7 @@ module.exports = {
390390
isNotFor: ['analysis'],
391391
func(sprite, script) {
392392
const tableId = script.getField('MATRIX', script);
393-
const row = script.getNumberValue('NUMBER', script);
393+
const row = script.getNumberValue('NUMBER', script) - 1;
394394
const col = DataTable.getColumnIndex(script.getValue('FIELD', script));
395395
const value = script.getValue('VALUE', script);
396396
const table = DataTable.getSource(tableId, sprite);
@@ -557,7 +557,7 @@ module.exports = {
557557
null,
558558
{
559559
type: 'text',
560-
params: ['1'],
560+
params: ['2'],
561561
},
562562
{
563563
type: 'get_table_fields',
@@ -574,7 +574,7 @@ module.exports = {
574574
isNotFor: ['analysis'],
575575
func(sprite, script) {
576576
const tableId = script.getField('MATRIX', script);
577-
const row = script.getNumberValue('ROW', script);
577+
const row = script.getNumberValue('ROW', script) - 1;
578578
const col = DataTable.getColumnIndex(script.getValue('COL', script));
579579
const table = DataTable.getSource(tableId, sprite);
580580

0 commit comments

Comments
 (0)