delete legacy comment

This commit is contained in:
YouWei Zhao 2019-01-31 17:15:53 -05:00
parent 08315af63d
commit 4ae8c2e863
2 changed files with 3 additions and 70 deletions

View File

@ -1,5 +1,7 @@
# editor # editor
>! 以下均是v2.0时的说明, 未及时改动
本目录下所有文件,以及`../editor.html`和`../启动服务.exe`([源码](http://github.com/ckcz123/mota-js-server/))是地图编辑器的所有组件. 本目录下所有文件,以及`../editor.html`和`../启动服务.exe`([源码](http://github.com/ckcz123/mota-js-server/))是地图编辑器的所有组件.
`editor.js`,`editor_file.js`和`editor_mode.js`耦合较强,`editor_blockly.js`和`editor_multi.js`和`fs.js`基本可以独立使用. `editor.js`,`editor_file.js`和`editor_mode.js`耦合较强,`editor_blockly.js`和`editor_multi.js`和`fs.js`基本可以独立使用.
@ -103,23 +105,6 @@ editor_mode.onmode(editor_mode._ids[node.getAttribute('id')]);
`editor.mode.listen`中提供了追加素材的支持. `editor.mode.listen`中提供了追加素材的支持.
处理注释的特殊指令
```
$range(evalstr:thiseval)$end
限制取值范围,要求修改后的eval(evalstr)为true
$leaf(evalstr:thiseval)$end
强制指定为叶节点,如果eval(evalstr)为true
//以下几个中选一个 [
$select(evalstr)$end
渲染成<select>,选项为数组eval(evalstr)['values']
$input(evalstr)$end
渲染成<input>
$textarea(evalstr)$end
渲染成<textarea>
默认选项为$textarea()$end
// ]
```
### editor_blockly.js ### editor_blockly.js
@ -177,9 +162,3 @@ fs.readdir(path, callback)
//所有参数不允许缺省 //所有参数不允许缺省
``` ```
## z-index
目前主体部分使用了 0-15,75,100
blockly使用 200,201
多行文本编辑器使用 300

View File

@ -50,25 +50,7 @@ editor_file = function (editor, callback) {
throw('未设置callback') throw('未设置callback')
} }
; ;
/* var fs = editor.fs;
fs.readFile('project/floors/'+filename+'.js','utf-8',function(err, data){
if (err!=null){callback(err);return;}
data=data.split('=');
data=[data[0],data.slice(1).join('=')];
var varnameId = data[0].split('.').slice(-1)[0].trim();
var filenameId = filename.split('/').slice(-1)[0].split('\\').slice(-1)[0];
eval('b3917d1d_71c2_41f2_a8aa_481b215ffb99='+data[1]);
var floorData = b3917d1d_71c2_41f2_a8aa_481b215ffb99;
delete(b3917d1d_71c2_41f2_a8aa_481b215ffb99);
var floorId = floorData.floorId;
if (varnameId!=filenameId || filenameId!=floorId){
callback('文件名,第一行的变量名以及floorId不一致');
return;
}
editor.currentFloorId = floorId;
editor.currentFloorData = floorData;
callback(null)
}); */
editor.currentFloorId = editor.core.status.floorId; editor.currentFloorId = editor.core.status.floorId;
editor.currentFloorData = editor.core.floors[editor.currentFloorId]; editor.currentFloorData = editor.core.floors[editor.currentFloorId];
} }
@ -1000,34 +982,6 @@ editor_file = function (editor, callback) {
callback('出错了,要设置的文件名不识别'); callback('出错了,要设置的文件名不识别');
} }
/*
$select({\"values\":[\"keys\",\"items\",\"constants\",\"tools\"]})$end
$range(thiseval==~~thiseval &&thiseval>0)$end
$leaf(true)$end
$select({\"values\":[true]})$end
$select({\"values\":[false]})$end
$select({\"values\":[true,false]})$end
*/
/*
所有注释中的特殊指令
$range(evalstr:thiseval)$end
限制取值范围,要求修改后的eval(evalstr)为true
$leaf(evalstr:thiseval)$end
强制指定为叶节点,如果eval(evalstr)为true
//以下几个中选一个 [
$select(evalstr)$end
渲染成<select>,选项为数组eval(evalstr)['values']
$input(evalstr)$end
渲染成<input>
$textarea(evalstr)$end
渲染成<textarea>
默认选项为$textarea()$end
// ]
*/
return editor_file; return editor_file;
} }
//editor_file = editor_file(editor); //editor_file = editor_file(editor);