Improvement of list of numbers expression

This commit is contained in:
BorysLevytskyi
2016-11-24 18:43:37 +02:00
parent 90b26032c7
commit ca9590fc12
3 changed files with 4 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ class OperandView extends React.Component {
const binaryString = formatter.padLeft(op.bin, this.props.maxBitsLegnth, '0');
var arr = binaryString.split('');
arr[index] = arr[index] == '0' ? '1' : '0';
op.update(arr.join());
op.update(arr.join(''));
this.setState(op);
}
}

View File

@@ -150,7 +150,6 @@ export class Operand {
this.bin = binary;
this.dec = Operand.toKindString(this.value, 'dec');
this.hex = Operand.toKindString(this.value, 'hex');
}
static getBitLength(num) {

View File

@@ -8,8 +8,9 @@ import AppRoot from './components/AppRoot';
commands.initialize(cmd);
cmd.execute('help');
cmd.execute('1 2 3');
cmd.execute('1');
cmd.execute('2');
cmd.execute('3');
var root = <AppRoot appState={appState} />;
ReactDOM.render(root, document.getElementById('root'));