Fix midMenu

This commit is contained in:
ckcz123 2020-10-30 20:47:25 +08:00
parent be2e55aea2
commit f48e8dcf17
3 changed files with 4 additions and 5 deletions

View File

@ -324,6 +324,7 @@ editor.prototype.mapInit = function () {
editor.currentFloorData.firstArrive = [];
editor.currentFloorData.eachArrive = [];
editor.currentFloorData.events = {};
editor.currentFloorData.autoEvent = {};
editor.currentFloorData.changeFloor = {};
editor.currentFloorData.afterBattle = {};
editor.currentFloorData.afterGetItem = {};

View File

@ -501,9 +501,7 @@ editor_mappanel_wrapper = function (editor) {
*/
editor.uifunctions.hideMidMenu = function () {
editor.uivalues.lastMoveE={buttons:0,clientX:0,clientY:0};
setTimeout(function () {
editor.dom.midMenu.style = 'display:none';
}, 100)
editor.dom.midMenu.style = 'display:none';
}
/**

View File

@ -120,10 +120,10 @@ editor_ui_wrapper = function (editor) {
}
}
//editor.mode.onmode('');
if (e.button != 2 && !editor.isMobile) {
if (e.button != 2 && !editor.isMobile && clickpath.indexOf('midMenu') === -1) {
editor.uifunctions.hideMidMenu();
}
if (clickpath.indexOf('down') !== -1 && clickpath.indexOf('midMenu') === -1 && editor.isMobile && clickpath.indexOf('midMenu') === -1) {
if (clickpath.indexOf('down') !== -1 && clickpath.indexOf('midMenu') === -1 && editor.isMobile) {
editor.uifunctions.hideMidMenu();
}
if (clickpath.length >= 2 && clickpath[0].indexOf('id_') === 0) { editor.lastClickId = clickpath[0] }