|
|
@ -3,6 +3,18 @@ var totalRenders = 0; |
|
|
|
function updateDimensions( dimension ){ |
|
|
|
less.modifyVars({"@sizeWidth":dimension+"px"}); |
|
|
|
} |
|
|
|
function prePopulate(honeyCells){ |
|
|
|
var honeyCells = JSON.parse(honeyCells); |
|
|
|
|
|
|
|
if( honeyCells.constructor === Array){ |
|
|
|
for (var i = 0; i < honeyCells.length; i++) { |
|
|
|
populateHoneycomb( honeyCells[i], i ); |
|
|
|
|
|
|
|
}; |
|
|
|
}else{ |
|
|
|
populateHoneycomb( honeyCells , 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function populateHoneycomb( honeyCells , index){ |
|
|
|
|
|
|
@ -256,7 +268,7 @@ document.onkeydown = checkKey; |
|
|
|
function sendJson(){ |
|
|
|
// console.log("sending mama some json.")
|
|
|
|
// socket.emit("jsonToParse", document.getElementById("sendHCJson").value);
|
|
|
|
populateHoneycomb( JSON.parse(document.getElementById("sendHCJson").value) , 0); |
|
|
|
prePopulate( document.getElementById("sendHCJson").value); |
|
|
|
} |
|
|
|
|
|
|
|
function checkKey(e) { |
|
|
|