Skip to content

Commit 22cf4dd

Browse files
committed
encapsulate patches inside a div
add the patch name float the divs
1 parent f143335 commit 22cf4dd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
margin-left: 5px;
2828
margin-right: 5px;
2929
}
30+
.texdiv {
31+
float: left;
32+
margin: 1em;
33+
text-align: center;
34+
}
3035
</style>
3136
</head>
3237
<body>

texture.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,12 @@ function renderAllTextures(element, game) {
220220
for (i = 0; i < textures.length; ++i) {
221221
var tx = textures[i];
222222
var canvas = tx.drawTexture(ps);
223-
//element.appendChild(document.createTextNode(tx.name));
224-
element.appendChild(canvas);
225-
//element.appendChild(document.createElement("br"));
223+
var div = document.createElement("div");
224+
div.className = "texdiv";
225+
div.appendChild(canvas);
226+
div.appendChild(document.createElement("br"));
227+
div.appendChild(document.createTextNode(tx.name));
228+
element.appendChild(div);
226229
}
227230
});
228231
});

0 commit comments

Comments
 (0)