From ffe5e6d33dfe534764a7507438862c51176095e7 Mon Sep 17 00:00:00 2001 From: Borys Levytskyi Date: Sat, 4 Apr 2015 19:42:44 +0300 Subject: [PATCH] Fixed error --- app/modelViews.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/modelViews.js b/app/modelViews.js index 873d5fa..94f712f 100644 --- a/app/modelViews.js +++ b/app/modelViews.js @@ -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('
'); - 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; }