mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-15 08:22:37 +01:00
Fixed error
This commit is contained in:
@@ -5,6 +5,7 @@ app.compose(function () {
|
||||
var formatter = app.get('formatter');
|
||||
var calc = app.get('calc');
|
||||
var html = app.get('html');
|
||||
var cmdConfig = app.get('cmdConfig');
|
||||
|
||||
app.modelView(app.models.BitwiseOperation, {
|
||||
renderView: function(expr) {
|
||||
@@ -28,12 +29,6 @@ app.compose(function () {
|
||||
var maxLen = getBinaryLength(model.numbers);
|
||||
var table = html.element('<table class="expression"></table>');
|
||||
|
||||
if(app.emphasizeBytes) {
|
||||
if(maxLen % 8 != 0) {
|
||||
maxLen += Math.floor(maxLen / 8) + 8;
|
||||
}
|
||||
}
|
||||
|
||||
model.numbers.forEach(function(o){
|
||||
|
||||
var row = table.insertRow();
|
||||
@@ -77,7 +72,7 @@ app.compose(function () {
|
||||
|
||||
function getBinaryLength(arr) {
|
||||
var bits = calc.maxNumberOfBits(arr);
|
||||
if(app.emphasizeBytes && bits % 8 != 0) {
|
||||
if(cmdConfig.emphasizeBytes && bits % 8 != 0) {
|
||||
if(bits < 8) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user