diff --git a/_server/css/editor.css b/_server/css/editor.css index 13e74df7..b878cc2f 100644 --- a/_server/css/editor.css +++ b/_server/css/editor.css @@ -190,7 +190,7 @@ body{ .gameCanvas { position: absolute; } -#dataSelection{ +#dataSelection , .appendSelection{ position: absolute; /* top:0; left:320px; */ diff --git a/_server/css/editor_mode.css b/_server/css/editor_mode.css index f5ffcdab..a3c232c9 100644 --- a/_server/css/editor_mode.css +++ b/_server/css/editor_mode.css @@ -13,7 +13,7 @@ .leftTab > :first-child{margin-top:5px;} .leftTab > :last-child{margin-bottom:5px;} -#left99 { +#left1 { left: 5px; top: 650px; width: 435px; diff --git a/_server/editor_mode.js b/_server/editor_mode.js index 4bbe60af..017937b1 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -3,14 +3,14 @@ function editor_mode(){ 'loc':'left2', 'emenyitem':'left3', 'floor':'left4', - 'tower':'left5', - 'test':'left99' + 'tower':'left5' } this._ids={} this.dom={} this.actionList=[]; this.mode=''; this.info={}; + this.appendPic={}; } editor_mode.prototype.init = function(callback){ @@ -23,6 +23,8 @@ editor_mode.prototype.init = function(callback){ if (Boolean(callback))callback(); } +///////////////////////////////////////////////////////////////////////////// + editor_mode.prototype.objToTable = function(obj,commentObj){ var outstr=["\n
| 条目 | 注释aaa | 值 |
| 变量名字符串 | 可能显示不全但是hover时通过span title='xxx'来显示 | 高度以此为准 |
| 此处是利用slice实现 | ||
| 条目 | 注释 | 值 |
+ + + +
+0,0
diff --git a/libs/core.js b/libs/core.js index 0a1b1560..62235906 100644 --- a/libs/core.js +++ b/libs/core.js @@ -216,6 +216,11 @@ core.prototype.init = function (coreData) { core.platform.fileReader.onload = function () { var content=core.platform.fileReader.result; var obj=null; + if(content.slice(0,4)==='data'){ + if (core.isset(core.platform.successCallback)) + core.platform.successCallback(content); + return; + } try { obj=JSON.parse(content); if (core.isset(obj)) { @@ -4952,7 +4957,7 @@ core.prototype.isset = function (val) { } ////// 读取一个本地文件内容 ////// -core.prototype.readFile = function (success, error) { +core.prototype.readFile = function (success, error, readType) { // step 0: 不为http/https,直接不支持 if (!core.platform.isOnline) { @@ -4979,7 +4984,8 @@ core.prototype.readFile = function (success, error) { core.platform.errorCallback(); return; } - core.platform.fileReader.readAsText(core.platform.fileInput.files[0]); + if(!readType)core.platform.fileReader.readAsText(core.platform.fileInput.files[0]); + else core.platform.fileReader.readAsDataURL(core.platform.fileInput.files[0]); core.platform.fileInput.value = ''; } }