kopia lustrzana https://github.com/backface/turtlestitch
Some code cleanup and variable name fix
rodzic
e1e73d8feb
commit
396be20b18
2
byob.js
2
byob.js
|
@ -769,7 +769,7 @@ CustomCommandBlockMorph.prototype.userMenu = function () {
|
||||||
var ide = this.parentThatIsA(IDE_Morph);
|
var ide = this.parentThatIsA(IDE_Morph);
|
||||||
ide.saveCanvasAs(
|
ide.saveCanvasAs(
|
||||||
this.topBlock().scriptPic(),
|
this.topBlock().scriptPic(),
|
||||||
this.projectName + ' ' + localize('script pic'),
|
ide.projectName + ' ' + localize('script pic'),
|
||||||
true // request opening a new window
|
true // request opening a new window
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
7
gui.js
7
gui.js
|
@ -3006,11 +3006,12 @@ IDE_Morph.prototype.rawSaveProject = function (name) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
|
||||||
// Export project XML, newWindow opens a new tab if true
|
// Export project XML, newWindow opens a new tab if true
|
||||||
// This is used both for "Save to Disk" and "Export project..."
|
// This is used both for "Save to Disk" and "Export project..."
|
||||||
IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
|
|
||||||
var menu, str, dataPrefix;
|
var menu, str, dataPrefix;
|
||||||
// saveXMLAs(x, x, true) tries to open a new tab.
|
|
||||||
if (name) {
|
if (name) {
|
||||||
this.setProjectName(name);
|
this.setProjectName(name);
|
||||||
dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,';
|
dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,';
|
||||||
|
@ -3029,7 +3030,7 @@ IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
|
||||||
menu = this.showMessage('Exporting');
|
menu = this.showMessage('Exporting');
|
||||||
str = this.serializer.serialize(this.stage)
|
str = this.serializer.serialize(this.stage)
|
||||||
this.setURL('#open:' + dataPrefix + encodeURIComponent(str));
|
this.setURL('#open:' + dataPrefix + encodeURIComponent(str));
|
||||||
this.saveXMLAs(str, name, true);
|
this.saveXMLAs(str, name, newWindow);
|
||||||
menu.destroy();
|
menu.destroy();
|
||||||
this.showMessage('Exported!', 1);
|
this.showMessage('Exported!', 1);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue