kopia lustrzana https://github.com/backface/turtlestitch
enabled "result pic" for command scripts containing a "report" block
rodzic
bccc09a3b6
commit
4a69c650ff
|
@ -12,6 +12,7 @@
|
|||
* new "48 kHz" option in the "sampling rate" dropdown
|
||||
* made (hidden) "Blurred shadows" setting persistent, use to get rid of "red bar" artifacts on old laptops using Chrome
|
||||
* increased area / sensitivity for collapsing variadic input slots
|
||||
* enabled "result pic" for command scripts containing a "report" block
|
||||
* **Notable Fixes:**
|
||||
* "append" block now shows up when searching for it
|
||||
* disable blurred shadows inside input slots if the hidden "blurred shadows" setting is turned off, use this setting on old laptops displaying "red bars" in Chrome
|
||||
|
@ -19,6 +20,9 @@
|
|||
* Greek, thanks, HM100!
|
||||
* German
|
||||
|
||||
### 2020-10-08
|
||||
* blocks: enabled "result pic" for command scripts containing a "report" block
|
||||
|
||||
### 2020-10-07
|
||||
* byob: added "settings" button to input slot dialog
|
||||
* symbols: added "gearPartial" icon
|
||||
|
@ -26,7 +30,7 @@
|
|||
* blocks: increased area / sensitivity for collapsing variadic input slots
|
||||
* blocks: tweaked expanding variadic inputs
|
||||
* blocks: reverted sensitivity tweaks for variadic inputs
|
||||
* blocks: reintroduced a different approach for making it easier to collapse variadic inputs
|
||||
* blocks, threads: reintroduced a different approach for making it easier to collapse variadic inputs
|
||||
|
||||
### 2020-10-06
|
||||
* blocks: disable blurred shadows inside input slots if the hidden "blurred shadows" setting is turned off
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<script src="src/morphic.js?version=2020-09-12"></script>
|
||||
<script src="src/symbols.js?version=2020-10-07"></script>
|
||||
<script src="src/widgets.js?version=2020-10-06"></script>
|
||||
<script src="src/blocks.js?version=2020-10-07"></script>
|
||||
<script src="src/threads.js?version=2020-10-05"></script>
|
||||
<script src="src/blocks.js?version=2020-10-08"></script>
|
||||
<script src="src/threads.js?version=2020-10-08"></script>
|
||||
<script src="src/objects.js?version=2020-10-06"></script>
|
||||
<script src="src/gui.js?version=2020-10-06"></script>
|
||||
<script src="src/paint.js?version=2020-05-17"></script>
|
||||
|
|
|
@ -158,7 +158,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2020-October-07';
|
||||
modules.blocks = '2020-October-08';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -3072,7 +3072,8 @@ BlockMorph.prototype.userMenu = function () {
|
|||
},
|
||||
'save a picture\nof this script'
|
||||
);
|
||||
if (top instanceof ReporterBlockMorph) {
|
||||
if (top instanceof ReporterBlockMorph ||
|
||||
top.allChildren().some((any) => any.selector === 'doReport')) { // +++
|
||||
menu.addItem(
|
||||
"result pic...",
|
||||
() => top.exportResultPic(),
|
||||
|
@ -3636,6 +3637,22 @@ BlockMorph.prototype.showHelp = function () {
|
|||
pic.src = ide.resourceURL('help', spec + '.png');
|
||||
};
|
||||
|
||||
// BlockMorph exporting picture with result bubble
|
||||
|
||||
BlockMorph.prototype.exportResultPic = function () {
|
||||
var top = this.topBlock(),
|
||||
receiver = top.scriptTarget(),
|
||||
stage;
|
||||
if (top !== this) {return; }
|
||||
if (receiver) {
|
||||
stage = receiver.parentThatIsA(StageMorph);
|
||||
if (stage) {
|
||||
stage.threads.stopProcess(top);
|
||||
stage.threads.startProcess(top, receiver, false, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// BlockMorph code mapping
|
||||
|
||||
/*
|
||||
|
@ -6024,22 +6041,6 @@ ReporterBlockMorph.prototype.mouseClickLeft = function (pos) {
|
|||
}
|
||||
};
|
||||
|
||||
// ReporterBlock exporting picture with result bubble
|
||||
|
||||
ReporterBlockMorph.prototype.exportResultPic = function () {
|
||||
var top = this.topBlock(),
|
||||
receiver = top.scriptTarget(),
|
||||
stage;
|
||||
if (top !== this) {return; }
|
||||
if (receiver) {
|
||||
stage = receiver.parentThatIsA(StageMorph);
|
||||
if (stage) {
|
||||
stage.threads.stopProcess(top);
|
||||
stage.threads.startProcess(top, receiver, false, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// ReporterBlockMorph deleting
|
||||
|
||||
ReporterBlockMorph.prototype.userDestroy = function () {
|
||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
||||
|
||||
modules.threads = '2020-October-05';
|
||||
modules.threads = '2020-October-08';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -375,7 +375,7 @@ ThreadManager.prototype.removeTerminatedProcesses = function () {
|
|||
}
|
||||
}
|
||||
if (proc.topBlock instanceof ReporterBlockMorph ||
|
||||
proc.isShowingResult) {
|
||||
proc.isShowingResult || proc.exportResult) {
|
||||
result = proc.homeContext.inputs[0];
|
||||
if (proc.onComplete instanceof Function) {
|
||||
proc.onComplete(result);
|
||||
|
|
Ładowanie…
Reference in New Issue