From 5cef1fe4a29dadd8a5b3e126d73fc6e90af6552e Mon Sep 17 00:00:00 2001 From: oc Date: Mon, 3 Jun 2019 01:37:04 +0800 Subject: [PATCH] expand / fold materials --- _server/editor.js | 4 ++-- _server/editor_unsorted_1.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_server/editor.js b/_server/editor.js index 24401e84..855688db 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -280,7 +280,7 @@ editor.prototype.drawInitData = function (icons) { editor.widthsX = {}; editor.folded = core.getLocalStorage('folded', false); // editor.folded = true; - editor.foldPerCol = 30; + editor.foldPerCol = 50; // var imgNames = Object.keys(images); //还是固定顺序吧; var imgNames = ["terrains", "animates", "enemys", "enemy48", "items", "npcs", "npc48", "autotile"]; @@ -465,7 +465,7 @@ editor.prototype.setSelectBoxFromInfo=function(thisevent){ pos.y=thisevent.y; if(thisevent.x)pos.x+=thisevent.x; ysize = thisevent.images.endsWith('48') ? 48 : 32; - if (editor.folded) { + if (editor.folded && core.tilesets.indexOf(thisevent.images)==-1) { pos.x += Math.floor(pos.y / editor.foldPerCol); pos.y %= editor.foldPerCol; } diff --git a/_server/editor_unsorted_1.js b/_server/editor_unsorted_1.js index b31510d6..a8aaf3c9 100644 --- a/_server/editor_unsorted_1.js +++ b/_server/editor_unsorted_1.js @@ -492,7 +492,7 @@ editor.constructor.prototype.listen=function () { } else { var height = editor.widthsX[spriter][3], col = height / ysize; - if (editor.folded) { + if (editor.folded && core.tilesets.indexOf(pos.images)==-1) { col = (pos.x == editor.widthsX[spriter][2] - 1) ? ((col - 1) % editor.foldPerCol + 1) : editor.foldPerCol; } if (spriter == 'terrains' && pos.x == editor.widthsX[spriter][1]) col += 2;