修复额外素材的区域不消失的问题

This commit is contained in:
ckcz123 2020-06-09 12:27:24 +08:00
parent 3828308cd8
commit fda4949403
2 changed files with 6 additions and 0 deletions

View File

@ -845,6 +845,7 @@ editor_mappanel_wrapper = function (editor) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.stopPropagation(); e.stopPropagation();
if (editor.isMobile) return false; if (editor.isMobile) return false;
editor.uivalues.tileSize = [1,1];
var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop var scrollTop = document.documentElement.scrollTop || document.body.scrollTop
@ -888,6 +889,7 @@ editor_mappanel_wrapper = function (editor) {
editor.constructor.prototype.copyFromPos = function (pos) { editor.constructor.prototype.copyFromPos = function (pos) {
editor.uivalues.tileSize = [1,1];
var fields = Object.keys(editor.file.comment._data.floors._data.loc._data); var fields = Object.keys(editor.file.comment._data.floors._data.loc._data);
pos = pos || editor.pos; pos = pos || editor.pos;
var x0 = pos.x, y0 = pos.y, x1 = pos.x1, y1 = pos.y1; var x0 = pos.x, y0 = pos.y, x1 = pos.x1, y1 = pos.y1;
@ -910,6 +912,7 @@ editor_mappanel_wrapper = function (editor) {
} }
editor.constructor.prototype.pasteToPos = function (info, pos) { editor.constructor.prototype.pasteToPos = function (info, pos) {
editor.uivalues.tileSize = [1,1];
if (info == null) return; if (info == null) return;
var fields = Object.keys(editor.file.comment._data.floors._data.loc._data); var fields = Object.keys(editor.file.comment._data.floors._data.loc._data);
pos = pos || editor.pos; pos = pos || editor.pos;
@ -931,6 +934,7 @@ editor_mappanel_wrapper = function (editor) {
} }
editor.constructor.prototype.movePos = function (startPos, endPos, callback) { editor.constructor.prototype.movePos = function (startPos, endPos, callback) {
editor.uivalues.tileSize = [1,1];
if (!startPos || !endPos) return; if (!startPos || !endPos) return;
if (startPos.x == endPos.x && startPos.y == endPos.y) return; if (startPos.x == endPos.x && startPos.y == endPos.y) return;
var copyed = editor.copyFromPos(startPos); var copyed = editor.copyFromPos(startPos);
@ -949,6 +953,7 @@ editor_mappanel_wrapper = function (editor) {
} }
editor.constructor.prototype.exchangePos = function (startPos, endPos, callback) { editor.constructor.prototype.exchangePos = function (startPos, endPos, callback) {
editor.uivalues.tileSize = [1,1];
if (!startPos || !endPos) return; if (!startPos || !endPos) return;
if (startPos.x == endPos.x && startPos.y == endPos.y) return; if (startPos.x == endPos.x && startPos.y == endPos.y) return;
var startInfo = editor.copyFromPos(startPos); var startInfo = editor.copyFromPos(startPos);

View File

@ -134,6 +134,7 @@ editor_ui_wrapper = function (editor) {
* 绑定快捷键 * 绑定快捷键
*/ */
editor.uifunctions.body_shortcut = function (e) { editor.uifunctions.body_shortcut = function (e) {
editor.uivalues.tileSize = [1,1];
// UI预览 & 地图选点 // UI预览 & 地图选点
if (editor.uievent && editor.uievent.isOpen) { if (editor.uievent && editor.uievent.isOpen) {