mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
new scalingFactor signal parameter is editable in signal mapping dialog window #130
This commit is contained in:
parent
b317cc095a
commit
453ed4b154
1 changed files with 8 additions and 1 deletions
|
@ -73,6 +73,11 @@ class EditSignalMapping extends React.Component {
|
|||
sig = this.state.signals[row];
|
||||
sig.unit = event.target.value;
|
||||
}
|
||||
} else if (column === 3) { // scaling factor change
|
||||
if (parseFloat(event.target.value) !== 0.0) {
|
||||
sig = this.state.signals[row];
|
||||
sig.scalingFactor = parseFloat(event.target.value);
|
||||
}
|
||||
} else if (column === 0) { //index change
|
||||
sig = this.state.signals[row];
|
||||
sig.index = parseInt(event.target.value, 10);
|
||||
|
@ -108,7 +113,8 @@ class EditSignalMapping extends React.Component {
|
|||
direction: this.state.dir,
|
||||
name: "PlaceholderName",
|
||||
unit: "PlaceholderUnit",
|
||||
index: 999
|
||||
index: 999,
|
||||
scalingFactor: 1.0
|
||||
};
|
||||
|
||||
AppDispatcher.dispatch({
|
||||
|
@ -152,6 +158,7 @@ class EditSignalMapping extends React.Component {
|
|||
<TableColumn title='Index' dataKey='index' inlineEditable onInlineChange={(e, row, column) => this.handleMappingChange(e, row, column)} />
|
||||
<TableColumn title='Name' dataKey='name' inlineEditable onInlineChange={(e, row, column) => this.handleMappingChange(e, row, column)} />
|
||||
<TableColumn title='Unit' dataKey='unit' inlineEditable onInlineChange={(e, row, column) => this.handleMappingChange(e, row, column)} />
|
||||
<TableColumn title='Scaling Factor' dataKey='scalingFactor' inlineEditable onInlineChange={(e, row, column) => this.handleMappingChange(e, row, column)} />
|
||||
<TableColumn title='Remove' deleteButton onDelete={(index) => this.handleDelete(index)} />
|
||||
</Table>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue