Merge pull request #661 from cycomachead/cloud-default

Fix to set SnapCloud variable before the IDE morph is built.
pull/3/merge
Jens Mönig 2014-12-01 11:45:02 +01:00
commit f2762c2329
1 zmienionych plików z 4 dodań i 4 usunięć

8
gui.js
Wyświetl plik

@ -233,10 +233,6 @@ IDE_Morph.prototype.init = function (isAutoFill) {
IDE_Morph.prototype.openIn = function (world) {
var hash, usr, myself = this, urlLanguage = null;
this.buildPanes();
world.add(this);
world.userMenu = this.userMenu;
// get persistent user data, if any
if (localStorage) {
usr = localStorage['-snap-user'];
@ -249,6 +245,10 @@ IDE_Morph.prototype.openIn = function (world) {
}
}
this.buildPanes();
world.add(this);
world.userMenu = this.userMenu;
// override SnapCloud's user message with Morphic
SnapCloud.message = function (string) {
var m = new MenuMorph(null, string),