summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-09 15:12:29 +0200
committerjmoenig <jens@moenig.org>2013-04-09 15:12:29 +0200
commite23a6944095008dd4ed811267d05a68d58c46548 (patch)
tree5a88dbfb2bd3c64223431c8f079469cffae6e0c4
parentd4d537c186e68790faf22d3eda46e0d154e230fe (diff)
downloadsnap-yow-e23a6944095008dd4ed811267d05a68d58c46548.tar.gz
snap-yow-e23a6944095008dd4ed811267d05a68d58c46548.zip
Hide IDE while opening a shared project for presentation
-rw-r--r--gui.js12
-rwxr-xr-xhistory.txt1
2 files changed, 13 insertions, 0 deletions
diff --git a/gui.js b/gui.js
index ab7ba56..675c51a 100644
--- a/gui.js
+++ b/gui.js
@@ -143,6 +143,7 @@ IDE_Morph.prototype.init = function (isAutoFill) {
this.stageRatio = 1; // for IDE animations, e.g. when zooming
this.loadNewProject = false; // flag when starting up translated
+ this.shield = null;
// initialize inherited properties:
IDE_Morph.uber.init.call(this);
@@ -248,6 +249,11 @@ IDE_Morph.prototype.openIn = function (world) {
this.toggleAppMode(true);
this.runScripts();
} else if (location.hash.substr(0, 9) === '#present:') {
+ this.shield = new Morph();
+ this.shield.color = this.color;
+ this.shield.setExtent(this.parent.extent());
+ this.parent.add(this.shield);
+
myself.showMessage('Fetching project\nfrom the cloud...');
SnapCloud.getPublicProject(
location.hash.substr(9),
@@ -261,6 +267,8 @@ IDE_Morph.prototype.openIn = function (world) {
myself.rawOpenCloudDataString(projectData);
},
function () {
+ this.shield.destroy();
+ this.shield = null;
msg.destroy();
myself.toggleAppMode(true);
myself.runScripts();
@@ -3235,6 +3243,10 @@ IDE_Morph.prototype.cloudError = function () {
// if none is found, show an error dialog box
var response = responseText,
explanation = getURL('http://snap.berkeley.edu/cloudmsg.txt');
+ if (myself.shield) {
+ myself.shield.destroy();
+ myself.shield = null;
+ }
if (explanation) {
myself.showMessage(explanation);
return;
diff --git a/history.txt b/history.txt
index bdc3b26..370ec15 100755
--- a/history.txt
+++ b/history.txt
@@ -1605,3 +1605,4 @@ ______
* Morphic: ListMorph (items) manipulation capabilites
* GUI: display shared project names bold typed in the project dialog
* GUI: Feedback msg when sharing / unsharing projects
+* GUI: Shield (hide) IDE while opening a shared project for presentation