Auto fill new floor title
This commit is contained in:
parent
2b43aaf5cd
commit
b8c6a4fdf7
@ -131,10 +131,18 @@ editor_file = function (editor, callback) {
|
||||
};
|
||||
var currData=editor.currentFloorData;
|
||||
var saveStatus = document.getElementById('newMapStatus').checked;
|
||||
|
||||
var floorId = saveFilename;
|
||||
var title = saveStatus?currData.title:"新建楼层";
|
||||
var name = saveStatus?currData.name:"0";
|
||||
if (/^mt\d+$/i.test(floorId)) {
|
||||
name = floorId.substring(2);
|
||||
title = "主塔 "+name+" 层";
|
||||
}
|
||||
editor.currentFloorData = {
|
||||
floorId: saveFilename,
|
||||
title: saveStatus?currData.title:"新建楼层",
|
||||
name: saveStatus?currData.name:"0",
|
||||
title: title,
|
||||
name: name,
|
||||
width: parseInt(document.getElementById('newMapWidth').value),
|
||||
height: parseInt(document.getElementById('newMapHeight').value),
|
||||
canFlyTo: saveStatus?currData.canFlyTo:true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user