Skip to content

Commit

Permalink
Updated Preview Grid to show Boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrnelson90 committed Jun 22, 2016
1 parent 49e3f2a commit 722937f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
36 changes: 20 additions & 16 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions JQuerySudoku/jQSudoku.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,23 @@ function SudokuView() {
$("#previewGrid").append('<div id=\"prevRow' + i + '\" class=\"prevRow\">');
for (var j = 0; j < _columns; j++) {
$(".prevRow:last").append('<div id=\"prev' + i + 'x' + j + '\" class=\"gridCell prevCell\">');

var $currentCell = $(".prevCell:last");

if (i == 0) {
$currentCell.css({"border-top": "solid black"});
}
else if ((i + 1) % Math.sqrt(_rows) == 0) {
$currentCell.css({"border-bottom": "solid black"});
}
else {
$currentCell.css({"border-color": "black"});
}

if (j == 0)
$currentCell.css({"border-left": "solid black"});
else if ((j + 1) % Math.sqrt(_columns) == 0)
$currentCell.css({"border-right": "solid black"});
}
}
var prevCellSize;
Expand Down Expand Up @@ -263,11 +280,7 @@ function SudokuView() {
var $gameGrid = $("#gameGrid");
for (var i = 0; i < _rows; i++) {
$gameGrid.append('<div id=\"row' + i + '\" class=\"gridRow\">');

var $currentRow = $(".gridRow:last");



for (var j = 0; j < _columns; j++) {
$currentRow.append('<div id=\"' + i + 'x' + j + '\" class=\"gridCell gameCell\">');

Expand Down

0 comments on commit 722937f

Please sign in to comment.