From 7c96c5d76ae0db8ab9e3d639c7fa556c0300bc4c Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 25 Oct 2019 15:01:28 +0200 Subject: [PATCH] added sprite dimension selectors to the OF reporter's dropdown menu which is what I was about to work on when disaster struck with Chrome v78 forcing me to optimize collision detection instead ;-) --- HISTORY.md | 8 ++++++++ snap.html | 6 +++--- src/blocks.js | 12 ++++++++++-- src/threads.js | 10 +++++++++- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 92e0a8da..f4bd8cb3 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,14 @@ * **Notable Fixes:** * **Translation Updates:** +## v5.2.3: +* **Notable Changes:* + * added sprite dimension selectors to the OF reporter's dropdown menu + +### 2019-10-25 +* blocks, threads: added sprite dimension selectors to the OF reporter's dropdown menu +* prepared patch + ## v5.2.2: * **Notable Fix:** * more optimizations for collision detection diff --git a/snap.html b/snap.html index 419b88c0..ff94b6d7 100755 --- a/snap.html +++ b/snap.html @@ -2,12 +2,12 @@ - Snap! Build Your Own Blocks 5.2.2 + Snap! Build Your Own Blocks 5.2.3 - - + + diff --git a/src/blocks.js b/src/blocks.js index c12f27a4..9e2deeff 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2019-October-21'; +modules.blocks = '2019-October-25'; var SyntaxElementMorph; var BlockMorph; @@ -9041,6 +9041,10 @@ InputSlotMorph.prototype.attributesMenu = function () { 'size' : ['size'], 'width': ['width'], 'height': ['height'], + 'left' : ['left'], + 'right' : ['right'], + 'top' : ['top'], + 'bottom' : ['bottom'], 'volume' : ['volume'], 'balance' : ['balance'] }; @@ -9051,7 +9055,11 @@ InputSlotMorph.prototype.attributesMenu = function () { 'volume' : ['volume'], 'balance' : ['balance'], 'width': ['width'], - 'height': ['height'] + 'height': ['height'], + 'left' : ['left'], + 'right' : ['right'], + 'top' : ['top'], + 'bottom' : ['bottom'] }; } varNames = obj.variables.names(); diff --git a/src/threads.js b/src/threads.js index ba5b6d58..63672e91 100644 --- a/src/threads.js +++ b/src/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color, TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/ -modules.threads = '2019-October-21'; +modules.threads = '2019-October-25'; var ThreadManager; var Process; @@ -4399,6 +4399,14 @@ Process.prototype.reportAttributeOf = function (attribute, name) { } this.assertType(thatObj, 'sprite'); return thatObj.height() / stage.scale; + case 'left': + return thatObj.xLeft(); + case 'right': + return thatObj.xRight(); + case 'top': + return thatObj.yTop(); + case 'bottom': + return thatObj.yBottom(); } } }