optimize lastUsed
This commit is contained in:
parent
d1ff3662a2
commit
90e8980adc
@ -150,6 +150,13 @@ body {
|
|||||||
height: 416px;
|
height: 416px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#lastUsedDiv {
|
||||||
|
height: auto;
|
||||||
|
bottom: 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
#mid .tools {
|
#mid .tools {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 425px;
|
width: 425px;
|
||||||
|
|||||||
@ -406,7 +406,6 @@ editor.prototype.updateLastUsedMap = function () {
|
|||||||
ctx.lineWidth = 4;
|
ctx.lineWidth = 4;
|
||||||
for (var i = 0; i < editor.uivalues.lastUsed.length; ++i) {
|
for (var i = 0; i < editor.uivalues.lastUsed.length; ++i) {
|
||||||
var x = i % core.__SIZE__, y = parseInt(i / core.__SIZE__);
|
var x = i % core.__SIZE__, y = parseInt(i / core.__SIZE__);
|
||||||
if (y >= 5) break;
|
|
||||||
var info = editor.uivalues.lastUsed[i];
|
var info = editor.uivalues.lastUsed[i];
|
||||||
if (!info || !info.images) continue;
|
if (!info || !info.images) continue;
|
||||||
if (info.isTile) {
|
if (info.isTile) {
|
||||||
|
|||||||
@ -358,8 +358,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="mid2">
|
<div id="mid2">
|
||||||
<p style="margin: 10px">最近使用的图块列表:</p>
|
<p style="margin: 10px">最近使用的图块列表:</p>
|
||||||
<div class="map" style="height: 160px; margin-top: 25px" id="lastUsedDiv">
|
<div class="map" id="lastUsedDiv">
|
||||||
<canvas class='gameCanvas' id='lastUsed' width='416' height='160'></canvas>
|
<canvas id='lastUsed' width='416' height='416' style="overflow: hidden"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="right">
|
<div id="right">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user