mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-22 20:52:58 +01:00
Improvement of list of numbers expression
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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'));
|
||||
Reference in New Issue
Block a user