make the 'edit' button work for full screen

This commit is contained in:
Michal Moskal 2015-04-23 11:08:37 -07:00
Родитель fbe2c0cbc8
Коммит d16be3f866
4 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -299,11 +299,12 @@ module TDev
} else if (decl instanceof AST.GlobalDef) {
var glob = <AST.GlobalDef>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);
}
}
}

Просмотреть файл

@ -164,6 +164,13 @@ module TDev
public renderCore(a:AST.Decl) { return this.load(<AST.GlobalDef>a); }
public editFullScreen()
{
if (this.artEditor instanceof StringEditor) {
(<StringEditor>this.artEditor).editFullScreenAsync().done()
}
}
private load(a:AST.GlobalDef) :void
{
this.theVariable = null;

Просмотреть файл

@ -268,6 +268,7 @@ module TDev {
sideAllTests,
sideTestOne,
sideEditLibrary,
sideEditString,
sideUpdate,
sideUpdateOne,
sideActionAddInput,