浏览代码

fixed script

Nicolas Cannasse 4 年之前
父节点
当前提交
279c98bc4d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 0 1
      hide/comp/ScriptEditor.hx
  2. 2 1
      hrt/prefab/rfx/Configurator.hx

+ 0 - 1
hide/comp/ScriptEditor.hx

@@ -318,7 +318,6 @@ class ScriptEditor extends CodeEditor {
 				}
 			});
 		}
-		if( root == null ) root = parent;
 		super(script, lang, parent,root);
 		if( checker == null ) {
 			checker = new ScriptChecker(new hide.Config(),"");

+ 2 - 1
hrt/prefab/rfx/Configurator.hx

@@ -228,7 +228,8 @@ class Configurator extends RendererFX {
 			});
 		}
 
-		var editor = new hide.comp.ScriptEditor(this.script, props.find("#script"));
+		var selt = props.find("#script");
+		var editor = new hide.comp.ScriptEditor(this.script, selt, selt);
 		editor.onSave = function() {
 			script = editor.code;
 			parsedExpr = null;