optimize lastUsed

This commit is contained in:
ckcz123 2019-12-31 13:23:55 +08:00
parent d1ff3662a2
commit 90e8980adc
3 changed files with 9 additions and 3 deletions

View File

@ -150,6 +150,13 @@ body {
height: 416px;
}
#lastUsedDiv {
height: auto;
bottom: 0;
margin-top: 20px;
overflow: hidden;
}
#mid .tools {
position: absolute;
width: 425px;

View File

@ -406,7 +406,6 @@ editor.prototype.updateLastUsedMap = function () {
ctx.lineWidth = 4;
for (var i = 0; i < editor.uivalues.lastUsed.length; ++i) {
var x = i % core.__SIZE__, y = parseInt(i / core.__SIZE__);
if (y >= 5) break;
var info = editor.uivalues.lastUsed[i];
if (!info || !info.images) continue;
if (info.isTile) {

View File

@ -358,8 +358,8 @@
</div>
<div id="mid2">
<p style="margin: 10px">最近使用的图块列表:</p>
<div class="map" style="height: 160px; margin-top: 25px" id="lastUsedDiv">
<canvas class='gameCanvas' id='lastUsed' width='416' height='160'></canvas>
<div class="map" id="lastUsedDiv">
<canvas id='lastUsed' width='416' height='416' style="overflow: hidden"></canvas>
</div>
</div>
<div id="right">