From 94c44902e1307d9477d43fe78e5b7df4430741f9 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 22 Sep 2014 15:32:36 +0200 Subject: fixed #585 Thanks, Michael, for reporting this! --- gui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 6af9137..7f4d7db 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-July-30'; +modules.gui = '2014-September-22'; // Declarations @@ -1859,7 +1859,7 @@ IDE_Morph.prototype.newSpriteName = function (name, ignoredSprite) { stem = (ix < 0) ? name : name.substring(0, ix), count = 1, newName = stem, - all = this.sprites.asArray().filter( + all = this.sprites.asArray().concat(this.stage).filter( function (each) {return each !== ignoredSprite; } ).map( function (each) {return each.name; } -- cgit v1.3.1 From 106cd56128343c922eefaf4f9f63a816ca446a1c Mon Sep 17 00:00:00 2001 From: Manuel Menezes de Sequeira Date: Wed, 1 Oct 2014 09:25:01 +0100 Subject: add localization to default costume name --- gui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 7f4d7db..465b138 100644 --- a/gui.js +++ b/gui.js @@ -5947,7 +5947,7 @@ WardrobeMorph.prototype.removeCostumeAt = function (idx) { WardrobeMorph.prototype.paintNew = function () { var cos = new Costume( newCanvas(), - this.sprite.newCostumeName('Untitled') + this.sprite.newCostumeName(localize('Untitled')) ), ide = this.parentThatIsA(IDE_Morph), myself = this; -- cgit v1.3.1 From ba58b0e5b61ffe3dc62a8bead3d5346c0c037cac Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 1 Oct 2014 13:52:17 +0200 Subject: updated history --- gui.js | 2 +- history.txt | 1 + lang-pt.js | 2 +- locale.js | 2 +- store.js | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 465b138..ee9d22c 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-September-22'; +modules.gui = '2014-October-01'; // Declarations diff --git a/history.txt b/history.txt index 4f6b8a7..25e2ab0 100755 --- a/history.txt +++ b/history.txt @@ -2296,3 +2296,4 @@ ______ * Threads: workaround for some REPORT issues * Objects: fixed #599 (disable IDE keyboard shortcuts in presentation mode) * Objects: correctly display symbol for %obj type input slots in the prototype template +* Portuguese translation update, thanks, Manuel! diff --git a/lang-pt.js b/lang-pt.js index 674168e..cd3b5fe 100755 --- a/lang-pt.js +++ b/lang-pt.js @@ -185,7 +185,7 @@ SnapTranslator.dict.pt = { 'translator_e-mail': 'mmsequeira@gmail.com', 'last_changed': - '2014-09-29', + '2014-10-01', // GUI // control bar: diff --git a/locale.js b/locale.js index 5965927..2db2e1f 100644 --- a/locale.js +++ b/locale.js @@ -42,7 +42,7 @@ /*global modules, contains*/ -modules.locale = '2014-September-29'; +modules.locale = '2014-October-01'; // Global stuff diff --git a/store.js b/store.js index 801ceac..cb91139 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-September-17'; +modules.store = '2014-October-01'; // XML_Serializer /////////////////////////////////////////////////////// -- cgit v1.3.1 From 45e1f3193b6a0593f084df28ee3d8f194bcea448 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 2 Oct 2014 10:31:09 +0200 Subject: New feature - minimal stage mode (shift-click on small-stage button) --- gui.js | 38 ++++++++++++++++++++++++++------------ history.txt | 8 ++++++-- 2 files changed, 32 insertions(+), 14 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index ee9d22c..2456277 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-October-01'; +modules.gui = '2014-October-02'; // Declarations @@ -703,9 +703,11 @@ IDE_Morph.prototype.createControlBar = function () { } ); - x = myself.right() - (StageMorph.prototype.dimensions.x - * (myself.isSmallStage ? myself.stageRatio : 1)); - + x = Math.min( + startButton.left() - (3 * padding + 2 * stageSizeButton.width()), + myself.right() - StageMorph.prototype.dimensions.x * + (myself.isSmallStage ? myself.stageRatio : 1) + ); [stageSizeButton, appModeButton].forEach( function (button) { x += padding; @@ -3326,15 +3328,20 @@ IDE_Morph.prototype.toggleAppMode = function (appMode) { IDE_Morph.prototype.toggleStageSize = function (isSmall) { var myself = this, - world = this.world(); + smallRatio = 0.5, + world = this.world(), + shiftClicked = (world.currentKey === 16); + + function toggle() { + myself.isSmallStage = isNil(isSmall) ? !myself.isSmallStage : isSmall; + } function zoomIn() { - myself.stageRatio = 1; myself.step = function () { - myself.stageRatio -= (myself.stageRatio - 0.5) / 2; + myself.stageRatio -= (myself.stageRatio - smallRatio) / 2; myself.setExtent(world.extent()); - if (myself.stageRatio < 0.6) { - myself.stageRatio = 0.5; + if (myself.stageRatio < (smallRatio + 0.1)) { + myself.stageRatio = smallRatio; myself.setExtent(world.extent()); delete myself.step; } @@ -3343,7 +3350,6 @@ IDE_Morph.prototype.toggleStageSize = function (isSmall) { function zoomOut() { myself.isSmallStage = true; - myself.stageRatio = 0.5; myself.step = function () { myself.stageRatio += (1 - myself.stageRatio) / 2; myself.setExtent(world.extent()); @@ -3356,7 +3362,15 @@ IDE_Morph.prototype.toggleStageSize = function (isSmall) { }; } - this.isSmallStage = isNil(isSmall) ? !this.isSmallStage : isSmall; + if (shiftClicked) { + smallRatio = SpriteIconMorph.prototype.thumbSize.x * 3 / + this.stage.dimensions.x; + if (!this.isSmallStage || (smallRatio === this.stageRatio)) { + toggle(); + } + } else { + toggle(); + } if (this.isAnimating) { if (this.isSmallStage) { zoomIn(); @@ -3364,7 +3378,7 @@ IDE_Morph.prototype.toggleStageSize = function (isSmall) { zoomOut(); } } else { - if (this.isSmallStage) {this.stageRatio = 0.5; } + if (this.isSmallStage) {this.stageRatio = smallRatio; } this.setExtent(world.extent()); } }; diff --git a/history.txt b/history.txt index 25e2ab0..00dc07e 100755 --- a/history.txt +++ b/history.txt @@ -2291,9 +2291,13 @@ ______ * Objects: fixed #378 (disable context menus for boolean representations) * Blocks: fixed #584 -140930 +141001 ------ * Threads: workaround for some REPORT issues * Objects: fixed #599 (disable IDE keyboard shortcuts in presentation mode) -* Objects: correctly display symbol for %obj type input slots in the prototype template +* Blocks: correctly display symbol for %obj type input slots in the prototype template * Portuguese translation update, thanks, Manuel! + +141002 +------ +* GUI: New feature - minimal stage mode (shift-click on small-stage button) -- cgit v1.3.1 From 2ae675132a52b8fdb3bd52e80db858500de9f265 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 6 Oct 2014 10:34:56 +0200 Subject: fixed #604. Thanks, @Gubolin! --- gui.js | 3 ++- history.txt | 4 ++++ objects.js | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 2456277..04481cc 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-October-02'; +modules.gui = '2014-October-06'; // Declarations @@ -3354,6 +3354,7 @@ IDE_Morph.prototype.toggleStageSize = function (isSmall) { myself.stageRatio += (1 - myself.stageRatio) / 2; myself.setExtent(world.extent()); if (myself.stageRatio > 0.9) { + myself.stageRatio = 1; myself.isSmallStage = false; myself.setExtent(world.extent()); myself.controlBar.stageSizeButton.refresh(); diff --git a/history.txt b/history.txt index 00dc07e..5999536 100755 --- a/history.txt +++ b/history.txt @@ -2301,3 +2301,7 @@ ______ 141002 ------ * GUI: New feature - minimal stage mode (shift-click on small-stage button) + +141006 +------ +* GUI, Objects: fixed #604. Thanks, @Gubolin! diff --git a/objects.js b/objects.js index 905b3d1..17450dd 100644 --- a/objects.js +++ b/objects.js @@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2014-October-01'; +modules.objects = '2014-October-06'; var SpriteMorph; var StageMorph; @@ -4378,8 +4378,12 @@ StageMorph.prototype.drawOn = function (aCanvas, aRect) { ); // pen trails - ws = w / this.scale; - hs = h / this.scale; + ws = Math.floor( + Math.min(w / this.scale, this.image.width * this.scale) + ); + hs = Math.floor( + Math.min(h / this.scale, this.image.height * this.scale) + ); context.save(); context.scale(this.scale, this.scale); context.drawImage( -- cgit v1.3.1 From 0dcca0606c3ae570110614d0dd94d6a38255100f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 27 Oct 2014 18:19:29 -0700 Subject: Set Default Save location to Cloud on Snap! load When Snap! is loaded, Snap! will now check whether a user is logged in (via the presence of `SnapCloud.username`) and if so, the default save location will be the cloud. --- gui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 04481cc..bb440b1 100644 --- a/gui.js +++ b/gui.js @@ -190,7 +190,7 @@ IDE_Morph.prototype.init = function (isAutoFill) { // additional properties: this.cloudMsg = null; - this.source = 'local'; + this.source = SnapCloud.username ? 'cloud' : 'local'; this.serializer = new SnapSerializer(); this.globalVariables = new VariableFrame(); -- cgit v1.3.1 From cbe3d6fe185531758397bc44a38a2817aed885e6 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 20 Nov 2014 14:55:31 +0100 Subject: Updated the “About” Dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with a mention of support from CDG (SAP Labs) --- gui.js | 7 ++++--- history.txt | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index bb440b1..f01f19d 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-October-06'; +modules.gui = '2014-November-20'; // Declarations @@ -2511,8 +2511,9 @@ IDE_Morph.prototype.aboutSnap = function () { + 'jens@moenig.org, bh@cs.berkeley.edu\n\n' + 'Snap! is developed by the University of California, Berkeley\n' - + ' with support from the National Science Foundation ' - + 'and MioSoft. \n' + + ' with support from the National Science Foundation, ' + + 'MioSoft, \n' + + 'and the Communications Design Group at SAP Labs. \n' + 'The design of Snap! is influenced and inspired by Scratch,\n' + 'from the Lifelong Kindergarten group at the MIT Media Lab\n\n' diff --git a/history.txt b/history.txt index bb6eac8..8cf87e7 100755 --- a/history.txt +++ b/history.txt @@ -2327,3 +2327,5 @@ ______ * Lists: Fixed #642 avoid “freezing” when calling CONS on non-list/null * Threads: Fixed #364 avoid “freezing” when calling LAUNCH on empty ring * Threads: Added optional “onComplete” callback to Process, thanks, @bromagosa! +* GUI: Set Default Save location to Cloud on load, thanks, @cycomachead! +* GUI: Updated the “About” Dialog with a mention of support from CDG (SAP Labs) -- cgit v1.3.1 From 919b72e3d48a08f061e9334076b068779395199c Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sun, 30 Nov 2014 21:56:33 -0800 Subject: Fix to set SnapCloud variable before the IDE morph is built. This makes it so that #627 works as intended, correctly fixing #502 --- gui.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index f01f19d..76048c2 100644 --- a/gui.js +++ b/gui.js @@ -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), -- cgit v1.3.1 From d393d13b3746ecc9f84c5e2b7f386e1bdee740ae Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 1 Dec 2014 11:55:02 +0100 Subject: updated history --- gui.js | 2 +- history.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 76048c2..b3bb460 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-November-20'; +modules.gui = '2014-December-01'; // Declarations diff --git a/history.txt b/history.txt index 34f967c..b8f1300 100755 --- a/history.txt +++ b/history.txt @@ -2366,3 +2366,5 @@ ______ 141201 ------ * Objects: Hide hidden elements in the project thumbnail +* GUI: Point project dialog to cloud if already signed in, thanks, Michael! +* favicon: Transparent background, thanks, Michael! -- cgit v1.3.1 From 2b2ff77823d085a9bd6e4a8bca8553ba72922e06 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 4 Dec 2014 03:01:40 -0800 Subject: Really fix setting the cloud as default save location when logged in --- gui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index b3bb460..8c56e1e 100644 --- a/gui.js +++ b/gui.js @@ -190,7 +190,7 @@ IDE_Morph.prototype.init = function (isAutoFill) { // additional properties: this.cloudMsg = null; - this.source = SnapCloud.username ? 'cloud' : 'local'; + this.source = 'local'; this.serializer = new SnapSerializer(); this.globalVariables = new VariableFrame(); @@ -241,6 +241,9 @@ IDE_Morph.prototype.openIn = function (world) { if (usr) { SnapCloud.username = usr.username || null; SnapCloud.password = usr.password || null; + if (SnapCould.username) { + this.source = 'cloud'; + } } } } -- cgit v1.3.1 From 060643c1617766a0de0b7f0fc5592f118fadd89a Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 4 Dec 2014 15:54:52 +0100 Subject: fix typo & update history --- gui.js | 4 ++-- history.txt | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 8c56e1e..8cd9403 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-December-01'; +modules.gui = '2014-December-04'; // Declarations @@ -241,7 +241,7 @@ IDE_Morph.prototype.openIn = function (world) { if (usr) { SnapCloud.username = usr.username || null; SnapCloud.password = usr.password || null; - if (SnapCould.username) { + if (SnapCloud.username) { this.source = 'cloud'; } } diff --git a/history.txt b/history.txt index b8af0f0..5be35f0 100755 --- a/history.txt +++ b/history.txt @@ -2377,3 +2377,8 @@ ______ ------ * Morphic: Cache actual bounding box of the Pen arrow shape * Threads, Objects: Improve edge-collision detection of default sprite “arrow” shape + +141204 +------ +* Threads, Objects: Experimental “ForEach” primitive (hidden in dev mode) +* GUI: Another attempt at pointing the project dialog to the cloud if signed in -- cgit v1.3.1