From 68e5feb8cef74904b0a20af6ab1455c7ce586c04 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 12 Jan 2015 10:18:32 +0100 Subject: Update history --- history.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'history.txt') diff --git a/history.txt b/history.txt index 6d6f0ff..c3c4068 100755 --- a/history.txt +++ b/history.txt @@ -2404,3 +2404,11 @@ ______ * Objects, Store: Experimental “processes” count watcher (hidden in dev mode) * Threads: Remove terminated processes from expired clones * Threads: Let “zombifying” scripts access receivers’ local vars + +150112 +------ +* Cloud, GUI: Backend load balancing support, eliminate now obsolete authentication roundtrip, Cloud error message tweaks +* Store: notify users of potential incompatibilities when opening projects created in other forks (e.g. BeetleBlocks) +* Threads: Don’t highlight scripts running inside clones (boosts performance), Thanks, @aranlunzer, for the hint! +* Objects: Disable clones from being edited via their context menus or double-click +* Italian translation update, thanks, Alberto Firpo! -- cgit v1.3.1 From 667193b9f02331b3372fefbb9fd4a424d5b86d7e Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 12 Jan 2015 13:05:14 +0100 Subject: Force Chrome to show GUI messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add additional yields to nextSteps() to work around a bug recently introduced to Chrome (other browsers don’t need this kludge). Remember to take those yields out again when and if Chrome (ever) fixes this (which, for all I know, may be never) --- gui.js | 6 ++++++ history.txt | 1 + 2 files changed, 7 insertions(+) (limited to 'history.txt') diff --git a/gui.js b/gui.js index d862463..521f27e 100644 --- a/gui.js +++ b/gui.js @@ -352,6 +352,7 @@ IDE_Morph.prototype.openIn = function (world) { function () { msg = myself.showMessage('Opening project...'); }, + function () {nop(); }, // yield (bug in Chrome) function () { if (projectData.indexOf(' Date: Tue, 13 Jan 2015 08:37:33 +0100 Subject: fixed #680 --- gui.js | 11 ++++++++++- history.txt | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'history.txt') diff --git a/gui.js b/gui.js index 521f27e..46d47e5 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2015-January-12'; +modules.gui = '2015-January-13'; // Declarations @@ -3343,6 +3343,15 @@ IDE_Morph.prototype.toggleAppMode = function (appMode) { }).forEach(function (s) { s.adjustScrollBars(); }); + // prevent rotation and draggability controls from + // showing for the stage + if (this.currentSprite === this.stage) { + this.spriteBar.children.forEach(function (child) { + if (child instanceof PushButtonMorph) { + child.hide(); + } + }); + } } this.setExtent(this.world().extent()); // resume trackChanges }; diff --git a/history.txt b/history.txt index 3ca41f8..b621772 100755 --- a/history.txt +++ b/history.txt @@ -2413,3 +2413,8 @@ ______ * Objects: Disable clones from being edited via their context menus or double-click * Italian translation update, thanks, Alberto Firpo! * GUI: add additional yields to nextSteps() (work around a bug in Chrome) + +150113 +------ +* BYOB: fixed #702 +* GUI: fixed #680 -- cgit v1.3.1 From f1fbb38b8715639e6025c130de70ef269cb0c0cd Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 21 Jan 2015 10:23:02 +0100 Subject: Keep layering of nested sprites thru drag & drop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it used to be that dragging an anchor always brought it to the front, altering the nested sprite’s internal layering order --- history.txt | 4 ++++ objects.js | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'history.txt') diff --git a/history.txt b/history.txt index b621772..1880e45 100755 --- a/history.txt +++ b/history.txt @@ -2418,3 +2418,7 @@ ______ ------ * BYOB: fixed #702 * GUI: fixed #680 + +150121 +------ +* Objects: Keep layering of nested sprites thru drag & drop diff --git a/objects.js b/objects.js index 78545a5..e59726f 100644 --- a/objects.js +++ b/objects.js @@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2015-January-12'; +modules.objects = '2015-January-21'; var SpriteMorph; var StageMorph; @@ -1315,6 +1315,7 @@ SpriteMorph.prototype.init = function (globals) { this.anchor = null; this.nestingScale = 1; this.rotatesWithAnchor = true; + this.layers = null; // cache for dragging nested sprites, don't serialize this.blocksCache = {}; // not to be serialized (!) this.paletteCache = {}; // not to be serialized (!) @@ -3158,6 +3159,7 @@ SpriteMorph.prototype.positionTalkBubble = function () { SpriteMorph.prototype.prepareToBeGrabbed = function (hand) { var bubble = this.talkBubble(); + this.recordLayers(); if (!bubble) {return null; } this.removeShadow(); bubble.hide(); @@ -3168,6 +3170,7 @@ SpriteMorph.prototype.prepareToBeGrabbed = function (hand) { }; SpriteMorph.prototype.justDropped = function () { + this.restoreLayers(); this.positionTalkBubble(); }; @@ -4045,6 +4048,28 @@ SpriteMorph.prototype.allAnchors = function () { return result; }; +SpriteMorph.prototype.recordLayers = function () { + var stage = this.parentThatIsA(StageMorph); + if (!stage) { + this.layerCache = null; + return; + } + this.layers = this.allParts(); + this.layers.sort(function (x, y) { + return stage.children.indexOf(x) < stage.children.indexOf(y) ? + -1 : 1; + }); +}; + +SpriteMorph.prototype.restoreLayers = function () { + if (this.layers && this.layers.length > 1) { + this.layers.forEach(function (sprite) { + sprite.comeToFront(); + }); + } + this.layers = null; +}; + // SpriteMorph highlighting SpriteMorph.prototype.addHighlight = function (oldHighlight) { -- cgit v1.3.1 From fee92b65f292ee46b83cc499bf623eb269dc6565 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 21 Jan 2015 12:18:46 +0100 Subject: Generate ScriptsPaneTexture programmatically --- byob.js | 4 ++-- gui.js | 24 ++++++++++++++++++++---- history.txt | 1 + manifest.mf | 3 +-- scriptsPaneTexture.gif | Bin 155 -> 0 bytes store.js | 4 ++-- 6 files changed, 26 insertions(+), 10 deletions(-) delete mode 100755 scriptsPaneTexture.gif (limited to 'history.txt') diff --git a/byob.js b/byob.js index 9e7dfc8..ec714f1 100644 --- a/byob.js +++ b/byob.js @@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2015-January-13'; +modules.byob = '2015-January-21'; // Declarations @@ -1651,7 +1651,7 @@ BlockEditorMorph.prototype.init = function (definition, target) { scripts = new ScriptsMorph(target); scripts.isDraggable = false; scripts.color = IDE_Morph.prototype.groupColor; - scripts.texture = IDE_Morph.prototype.scriptsPaneTexture; + scripts.cachedTexture = IDE_Morph.prototype.scriptsPaneTexture; scripts.cleanUpMargin = 10; proto = new PrototypeHatBlockMorph(this.definition); diff --git a/gui.js b/gui.js index 46d47e5..9b8b51a 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2015-January-13'; +modules.gui = '2015-January-21'; // Declarations @@ -119,7 +119,7 @@ IDE_Morph.prototype.setDefaultDesign = function () { ]; IDE_Morph.prototype.rotationStyleColors = IDE_Morph.prototype.tabColors; IDE_Morph.prototype.appModeColor = new Color(); - IDE_Morph.prototype.scriptsPaneTexture = 'scriptsPaneTexture.gif'; + IDE_Morph.prototype.scriptsPaneTexture = this.scriptsTexture(); IDE_Morph.prototype.padding = 5; SpriteIconMorph.prototype.labelColor @@ -172,6 +172,22 @@ IDE_Morph.prototype.setFlatDesign = function () { = IDE_Morph.prototype.buttonLabelColor; }; +IDE_Morph.prototype.scriptsTexture = function () { + var pic = newCanvas(new Point(100, 100)), // bigger scales faster + ctx = pic.getContext('2d'), + i; + for (i = 0; i < 100; i += 4) { + ctx.fillStyle = this.frameColor.toString(); + ctx.fillRect(i, 0, 1, 100); + ctx.fillStyle = this.groupColor.lighter(6).toString(); + ctx.fillRect(i + 1, 0, 1, 100); + ctx.fillRect(i + 3, 0, 1, 100); + ctx.fillStyle = this.groupColor.toString(); + ctx.fillRect(i + 2, 0, 1, 100); + } + return pic; +}; + IDE_Morph.prototype.setDefaultDesign(); // IDE_Morph instance creation: @@ -1152,7 +1168,7 @@ IDE_Morph.prototype.createSpriteEditor = function () { if (this.currentTab === 'scripts') { scripts.isDraggable = false; scripts.color = this.groupColor; - scripts.texture = this.scriptsPaneTexture; + scripts.cachedTexture = this.scriptsPaneTexture; this.spriteEditor = new ScrollFrameMorph( scripts, @@ -3527,7 +3543,7 @@ IDE_Morph.prototype.userSetBlocksScale = function () { sample = new FrameMorph(); sample.acceptsDrops = false; - sample.texture = this.scriptsPaneTexture; + sample.cachedTexture = this.scriptsPaneTexture; sample.setExtent(new Point(250, 180)); scrpt.setPosition(sample.position().add(10)); sample.add(scrpt); diff --git a/history.txt b/history.txt index 1880e45..ff472c7 100755 --- a/history.txt +++ b/history.txt @@ -2422,3 +2422,4 @@ ______ 150121 ------ * Objects: Keep layering of nested sprites thru drag & drop +* GUI, Store, BYOB: Generate ScriptsPaneTexture programmatically diff --git a/manifest.mf b/manifest.mf index 353d47f..d040961 100644 --- a/manifest.mf +++ b/manifest.mf @@ -10,5 +10,4 @@ threads.js widgets.js store.js xml.js -scriptsPaneTexture.gif -snap_logo_sm.gif +snap_logo_sm.png diff --git a/scriptsPaneTexture.gif b/scriptsPaneTexture.gif deleted file mode 100755 index 846c77f..0000000 Binary files a/scriptsPaneTexture.gif and /dev/null differ diff --git a/store.js b/store.js index 9dd851d..056767f 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2015-January-12'; +modules.store = '2015-January-21'; // XML_Serializer /////////////////////////////////////////////////////// @@ -861,7 +861,7 @@ SnapSerializer.prototype.loadScripts = function (scripts, model) { // private var myself = this, scale = SyntaxElementMorph.prototype.scale; - scripts.texture = 'scriptsPaneTexture.gif'; + scripts.cachedTexture = IDE_Morph.prototype.scriptsPaneTexture; model.children.forEach(function (child) { var element; if (child.tag === 'script') { -- cgit v1.3.1 From 386ff338951135bed9d8b7bd33c973b46e63e89f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 21 Jan 2015 12:26:54 +0100 Subject: Fix Zoom Dialog’s sample background in “flat” design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui.js | 1 + history.txt | 1 + 2 files changed, 2 insertions(+) (limited to 'history.txt') diff --git a/gui.js b/gui.js index 9b8b51a..73fffe9 100644 --- a/gui.js +++ b/gui.js @@ -3543,6 +3543,7 @@ IDE_Morph.prototype.userSetBlocksScale = function () { sample = new FrameMorph(); sample.acceptsDrops = false; + sample.color = IDE_Morph.prototype.groupColor; sample.cachedTexture = this.scriptsPaneTexture; sample.setExtent(new Point(250, 180)); scrpt.setPosition(sample.position().add(10)); diff --git a/history.txt b/history.txt index ff472c7..4de8ee1 100755 --- a/history.txt +++ b/history.txt @@ -2423,3 +2423,4 @@ ______ ------ * Objects: Keep layering of nested sprites thru drag & drop * GUI, Store, BYOB: Generate ScriptsPaneTexture programmatically +* GUI: Fix Zoom Dialog’s sample background in “flat” design -- cgit v1.3.1 From 669704a90adf772f534c89fb4c3732236fef2b51 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 21 Jan 2015 12:51:08 +0100 Subject: Integrated Korean and Catalan translation updates --- history.txt | 1 + lang-ca.js | 2 +- lang-ko.js | 2 +- locale.js | 10 +++++----- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'history.txt') diff --git a/history.txt b/history.txt index 4de8ee1..ad0f53d 100755 --- a/history.txt +++ b/history.txt @@ -2424,3 +2424,4 @@ ______ * Objects: Keep layering of nested sprites thru drag & drop * GUI, Store, BYOB: Generate ScriptsPaneTexture programmatically * GUI: Fix Zoom Dialog’s sample background in “flat” design +* Updated Korean and Catalan translations, thanks, Yunjae Jang and Bernat Romagosa! diff --git a/lang-ca.js b/lang-ca.js index b555b15..c57d0d2 100644 --- a/lang-ca.js +++ b/lang-ca.js @@ -185,7 +185,7 @@ SnapTranslator.dict.ca = { 'translator_e-mail': 'bromagosa@citilab.eu', // optional 'last_changed': - '2014-01-16', // this, too, will appear in the Translators tab + '2015-01-21', // this, too, will appear in the Translators tab // GUI // control bar: diff --git a/lang-ko.js b/lang-ko.js index 3241c7f..8cedf44 100755 --- a/lang-ko.js +++ b/lang-ko.js @@ -185,7 +185,7 @@ SnapTranslator.dict.ko = { 'translator_e-mail': 'janggoons@gmail.com', // optional 'last_changed': - '2014-11-07', // this, too, will appear in the Translators tab + '2015-01-21', // this, too, will appear in the Translators tab // GUI // control bar: diff --git a/locale.js b/locale.js index 613ead9..5ec6013 100644 --- a/locale.js +++ b/locale.js @@ -42,7 +42,7 @@ /*global modules, contains*/ -modules.locale = '2015-January-12'; +modules.locale = '2015-January-21'; // Global stuff @@ -195,9 +195,9 @@ SnapTranslator.dict.ko = { 'language_translator': 'Yunjae Jang', 'translator_e-mail': - 'yunjae.jang@inc.korea.ac.kr', + 'janggoons@gmail.com', 'last_changed': - '2012-11-18' + '2015-01-21' }; SnapTranslator.dict.pt = { @@ -375,9 +375,9 @@ SnapTranslator.dict.ca = { 'language_translator': 'Bernat Romagosa Carrasquer', 'translator_e-mail': - 'tibabenfortlapalanca@gmail.com', + 'bromagosa@citilab.eu', 'last_changed': - '2013-11-26' + '2015-01-21' }; SnapTranslator.dict.fi = { -- cgit v1.3.1 From 82552d0b294092a009a40a9761eadf0b5d3e753f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 21 Jan 2015 17:15:58 +0100 Subject: Fix speech bubbles of dragged nested sprites --- history.txt | 1 + objects.js | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'history.txt') diff --git a/history.txt b/history.txt index ad0f53d..deb76a6 100755 --- a/history.txt +++ b/history.txt @@ -2425,3 +2425,4 @@ ______ * GUI, Store, BYOB: Generate ScriptsPaneTexture programmatically * GUI: Fix Zoom Dialog’s sample background in “flat” design * Updated Korean and Catalan translations, thanks, Yunjae Jang and Bernat Romagosa! +* Objects: Fix speech bubbles of dragged nested sprites diff --git a/objects.js b/objects.js index e59726f..981fb20 100644 --- a/objects.js +++ b/objects.js @@ -3155,14 +3155,11 @@ SpriteMorph.prototype.positionTalkBubble = function () { bubble.changed(); }; -// dragging and dropping adjustments b/c of talk bubbles +// dragging and dropping adjustments b/c of talk bubbles and parts SpriteMorph.prototype.prepareToBeGrabbed = function (hand) { - var bubble = this.talkBubble(); - this.recordLayers(); - if (!bubble) {return null; } this.removeShadow(); - bubble.hide(); + this.recordLayers(); if (!this.bounds.containsPoint(hand.position())) { this.setCenter(hand.position()); } @@ -4055,6 +4052,10 @@ SpriteMorph.prototype.recordLayers = function () { return; } this.layers = this.allParts(); + this.layers.forEach(function (part) { + var bubble = part.talkBubble(); + if (bubble) {bubble.hide(); } + }); this.layers.sort(function (x, y) { return stage.children.indexOf(x) < stage.children.indexOf(y) ? -1 : 1; @@ -4065,6 +4066,7 @@ SpriteMorph.prototype.restoreLayers = function () { if (this.layers && this.layers.length > 1) { this.layers.forEach(function (sprite) { sprite.comeToFront(); + sprite.positionTalkBubble(); }); } this.layers = null; -- cgit v1.3.1