Skip to content

Commit

Permalink
encapsulate patches inside a div
Browse files Browse the repository at this point in the history
add the patch name
float the divs
  • Loading branch information
jmtd committed Aug 31, 2017
1 parent f143335 commit 7741ea6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
margin-left: 5px;
margin-right: 5px;
}
.texdiv {
float: left;
margin: 1em;
text-align: center;
}
</style>
</head>
<body>
Expand Down
9 changes: 6 additions & 3 deletions texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ function renderAllTextures(element, game) {
for (i = 0; i < textures.length; ++i) {
var tx = textures[i];
var canvas = tx.drawTexture(ps);
//element.appendChild(document.createTextNode(tx.name));
element.appendChild(canvas);
//element.appendChild(document.createElement("br"));
var div = document.createElement("div");
div.className = "texdiv";
div.appendChild(canvas);
div.appendChild(document.createElement("br"));
div.appendChild(document.createTextNode(tx.name));
element.appendChild(div);
}
});
});
Expand Down

0 comments on commit 7741ea6

Please sign in to comment.