diff --git a/_server/css/editor.css b/_server/css/editor.css index 783e27e6..b752deae 100644 --- a/_server/css/editor.css +++ b/_server/css/editor.css @@ -422,7 +422,7 @@ table.row { top: 50%; left: 50%; transform: translate(-50%, -60%); - width: 436px; + width: 540px; } #uieventHead { @@ -444,8 +444,8 @@ table.row { } #uieventBody { - width: 416px; - height: 416px; + width: 520px; + height: 520px; position: relative; margin-left: 10px; margin-bottom: 5px; diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 37937512..f8c0a850 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -163,7 +163,7 @@ editor_blockly = function () { editor_blockly.hide(); } - editor_blockly.confirm = function () { + editor_blockly.confirm = function (keep) { if (!editor_blockly.id) { editor_blockly.id = ''; return; @@ -186,10 +186,13 @@ editor_blockly = function () { } var setvalue = function (value) { var thisTr = document.getElementById(editor_blockly.id); - editor_blockly.id = ''; var input = thisTr.children[2].children[0].children[0]; input.value = value; - editor_blockly.hide(); + if (!keep) { + editor_blockly.id = ''; + editor_blockly.hide(); + } + else alert('保存成功!'); input.onchange(); } if (codeAreaHL.getValue() === '') { diff --git a/_server/editor_multi.js b/_server/editor_multi.js index 8014ef2c..17e2176a 100644 --- a/_server/editor_multi.js +++ b/_server/editor_multi.js @@ -345,7 +345,7 @@ editor_multi = function () { multiLineArgs = [null, null, null]; } - editor_multi.confirm = function () { + editor_multi.confirm = function (keep) { if (editor_multi.hasError()) { alert("当前好像存在严重的语法错误,请处理后再保存。\n严重的语法错误可能会导致整个编辑器的崩溃。"); return; @@ -359,21 +359,18 @@ editor_multi = function () { if (editor_multi.id === 'callFromBlockly') { // ----- 自动格式化 _format(); - editor_multi.id = ''; - editor_multi.multiLineDone(); + editor_multi.multiLineDone(keep); return; } if (editor_multi.id === 'importFile') { _format(); - editor_multi.id = ''; - editor_multi.writeFileDone(); + editor_multi.writeFileDone(keep); return; } var setvalue = function (value) { var thisTr = document.getElementById(editor_multi.id); - editor_multi.id = ''; var input = thisTr.children[2].children[0].children[0]; if (editor_multi.isString) { input.value = JSON.stringify(value); @@ -392,7 +389,12 @@ editor_multi = function () { } input.value = tstr; } - editor_multi.hide(); + if (!keep) { + editor_multi.id = ''; + editor_multi.hide(); + } else { + alert('写入成功!'); + } input.onchange(); } lastOffset[editor_multi.id] = (codeEditor.getScrollInfo() || {}).top; @@ -424,11 +426,16 @@ editor_multi = function () { editor_multi.lintAutocomplete = Boolean(args.lint); editor_multi.show(); } - editor_multi.multiLineDone = function () { - editor_multi.hide(); + editor_multi.multiLineDone = function (keep) { if (!multiLineArgs[0] || !multiLineArgs[1] || !multiLineArgs[2]) return; var newvalue = codeEditor.getValue() || ''; multiLineArgs[2](newvalue, multiLineArgs[0], multiLineArgs[1]) + if (!keep) { + editor_multi.id = ''; + editor_multi.hide(); + } else { + alert('写入成功!'); + } } var _fileValues = [''] @@ -453,7 +460,12 @@ editor_multi = function () { fs.writeFile(_fileValues[0], editor.util.encode64(codeEditor.getValue() || ''), 'base64', function (err, data) { if (err) printe('文件写入失败,请手动粘贴至' + _fileValues[0] + '\n' + err); else { - editor_multi.hide(); + if (!keep) { + editor_multi.id = ''; + editor_multi.hide(); + } else { + alert('写入成功!'); + } printf(_fileValues[0] + " 写入成功,F5刷新后生效"); } }); diff --git a/_server/editor_uievent.js b/_server/editor_uievent.js index 6f27691d..081ca979 100644 --- a/_server/editor_uievent.js +++ b/_server/editor_uievent.js @@ -108,7 +108,7 @@ editor_uievent_wrapper = function (editor) { uievent.selectPoint = function (floorId, x, y, bigmap, callback) { uievent.values.bigmap = bigmap; - uievent.values.size = editor.isMobile ? window.innerWidth / core.__SIZE__ : 32; + uievent.values.size = editor.isMobile ? window.innerWidth / core.__SIZE__ : 32 * 1.25; uievent.isOpen = true; uievent.elements.div.style.display = 'block'; diff --git a/editor-mobile.html b/editor-mobile.html index 9e3df4b1..315a2082 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -212,6 +212,7 @@ --> + @@ -243,6 +244,7 @@
+ console.log(obj=code) --> +
@@ -239,6 +240,7 @@
+