diff --git a/editor/editor.ts b/editor/editor.ts index 921444c1..3de86fc4 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -944,7 +944,7 @@ module TDev private currentStmtEditor: StmtEditor; private scriptProperties = new ScriptProperties(); - private variableProperties = new VariableProperties(); + public variableProperties = new VariableProperties(); private librefProperties = new LibraryRefProperties(); private recordProperties = new RecordDefProperties(); private recordEditor = new RecordEditor(this.recordProperties); diff --git a/editor/sideScriptNav.ts b/editor/sideScriptNav.ts index 14697dde..e2e38c4f 100644 --- a/editor/sideScriptNav.ts +++ b/editor/sideScriptNav.ts @@ -299,11 +299,12 @@ module TDev } else if (decl instanceof AST.GlobalDef) { var glob = decl; if (glob.isResource && glob.getKind() == api.core.String) { - var runbtn = HTML.mkRoundButton("svg:edit,black", lf("edit"), Ticks.sideEditLibrary, + var runbtn = HTML.mkRoundButton("svg:edit,black", lf("edit"), Ticks.sideEditString, () => { - // TODO: load variable properties and call editFullScreenAsync + TheEditor.renderDecl(glob); + TheEditor.variableProperties.editFullScreen() }); - // d = ScriptNav.addSideButton(d, runbtn); + d = ScriptNav.addSideButton(d, runbtn); } } } diff --git a/editor/variableProperties.ts b/editor/variableProperties.ts index ea726d8d..8696dcfc 100644 --- a/editor/variableProperties.ts +++ b/editor/variableProperties.ts @@ -164,6 +164,13 @@ module TDev public renderCore(a:AST.Decl) { return this.load(a); } + public editFullScreen() + { + if (this.artEditor instanceof StringEditor) { + (this.artEditor).editFullScreenAsync().done() + } + } + private load(a:AST.GlobalDef) :void { this.theVariable = null; diff --git a/rt/ticker.ts b/rt/ticker.ts index 3d71a691..15a9e3c1 100644 --- a/rt/ticker.ts +++ b/rt/ticker.ts @@ -268,6 +268,7 @@ module TDev { sideAllTests, sideTestOne, sideEditLibrary, + sideEditString, sideUpdate, sideUpdateOne, sideActionAddInput,