地图未保存时的刷新提示

This commit is contained in:
ckcz123 committed 2020-06-10 22:14:00 +08:00
1 parent 15e1b5ebd2
commit 58bb89c87c
1 file changed
+8
+8
View File
@@ -51,6 +51,14 @@ editor_listen_wrapper = function (editor) {
if (editor.dom.layerMod3) editor.dom.layerMod3.onchange = editor.uifunctions.layerMod3_onchange;
editor.uifunctions.viewportButtons_func()
window.onbeforeunload = function () {
var saveFloor = document.getElementById('saveFloor');
if (saveFloor && saveFloor.classList.contains('highlight')) {
return '你尚未保存地图,确定退出么?';
}
return null;
}
}
editor.constructor.prototype.mobile_listen = function () {