Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/class/source/DataTableSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class DataTableSource {

isExist(index) {
const isExist = this.getValue(index);
return !!(isExist === 0 || isExist === null || isExist);
return !!(isExist === null || isExist);
}

appendRow(data) {
Expand Down
18 changes: 11 additions & 7 deletions src/css/components/popup.less
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,21 @@
.ai_learning {
overflow: hidden;
.learningInputPopup {
height: 435px;
width: 245px;
background-color: white;
border: none;
height: 248px;
width: 294px;
background-color: #fff;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
.learningInputPopup.text {
height: 200px;
width: 269px;
height: 165px;
}
.learningInputPopup.image {
height: 245px;
}
.learningInputPopup.speech {
width: 274px;
height: 310px;
height: 250px;
}
}
}
Expand Down
15 changes: 11 additions & 4 deletions src/extensions/dmet.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ class dmetTable {
return this.#array[key - 1].value;
} else if (Array.isArray(key)) {
const [rowKey, ...keys] = key;
const { value: row } = this.#array[rowKey - 1] || {};
let { value: row } = this.#array[rowKey - 1] || {};
if (rowKey === 0) {
row = this.#fields;
}
if (keys.length && row) {
return _get(row, `[${keys.map((x) => x - 1).join('][')}]`);
} else {
Expand Down Expand Up @@ -333,10 +336,14 @@ class dmetTable {
key = index;
}
const { value: row, key: objKey, x, y } = this.getRow(key);
if (!row) {
throw { message: 'not found row' };
if (x === -1) {
this.#fields[y] = value;
} else {
if (!row) {
throw { message: `not found row ${y}` };
}
row[y] = value;
}
row[y] = value;
return this.getOperation({ type: 'replace', key, index, data: value, newKey });
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/playground/blocks/block_analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ module.exports = {
null,
{
type: 'text',
params: ['1'],
params: ['2'],
},
{
type: 'get_table_fields',
Expand Down Expand Up @@ -390,7 +390,7 @@ module.exports = {
isNotFor: ['analysis'],
func(sprite, script) {
const tableId = script.getField('MATRIX', script);
const row = script.getNumberValue('NUMBER', script);
const row = script.getNumberValue('NUMBER', script) - 1;
const col = DataTable.getColumnIndex(script.getValue('FIELD', script));
const value = script.getValue('VALUE', script);
const table = DataTable.getSource(tableId, sprite);
Expand Down Expand Up @@ -557,7 +557,7 @@ module.exports = {
null,
{
type: 'text',
params: ['1'],
params: ['2'],
},
{
type: 'get_table_fields',
Expand All @@ -574,7 +574,7 @@ module.exports = {
isNotFor: ['analysis'],
func(sprite, script) {
const tableId = script.getField('MATRIX', script);
const row = script.getNumberValue('ROW', script);
const row = script.getNumberValue('ROW', script) - 1;
const col = DataTable.getColumnIndex(script.getValue('COL', script));
const table = DataTable.getSource(tableId, sprite);

Expand Down