kopia lustrzana https://github.com/backface/turtlestitch
restore embedded inputs when relabelling variadic primitives
rodzic
268fe6e33d
commit
971ef5b4a0
|
@ -13,7 +13,8 @@
|
|||
### 2022-02-22
|
||||
* new dev version
|
||||
* new "List Comprehension" library adding a HOF version of ZIP
|
||||
* added "crossproduct" as relabel option for "append"
|
||||
* threads: added "crossproduct" as relabel option for "append"
|
||||
* blocks: restore embedded inputs when relabelling variadic primitives
|
||||
|
||||
## 7.2.0:
|
||||
* **New Features:**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<script src="src/morphic.js?version=2022-01-28"></script>
|
||||
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||
<script src="src/widgets.js?version=2021-17-09"></script>
|
||||
<script src="src/blocks.js?version=2022-02-09"></script>
|
||||
<script src="src/blocks.js?version=2022-02-21"></script>
|
||||
<script src="src/threads.js?version=2022-02-21"></script>
|
||||
<script src="src/objects.js?version=2022-02-22"></script>
|
||||
<script src="src/scenes.js?version=2021-11-24"></script>
|
||||
|
|
|
@ -161,7 +161,7 @@ CostumeIconMorph, SoundIconMorph, SVG_Costume*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2022-February-09';
|
||||
modules.blocks = '2022-February-22';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -3748,6 +3748,9 @@ BlockMorph.prototype.restoreInputs = function (oldInputs, offset = 0) {
|
|||
// restore matching inputs in their original order
|
||||
this.inputs().forEach(inp => {
|
||||
old = oldInputs[offset];
|
||||
if (old instanceof ArgLabelMorph) {
|
||||
old = old.argMorph();
|
||||
}
|
||||
if (old instanceof RingMorph) {
|
||||
if (old.contents()) {
|
||||
this.replaceInput(inp, old.fullCopy());
|
||||
|
@ -3774,6 +3777,10 @@ BlockMorph.prototype.restoreInputs = function (oldInputs, offset = 0) {
|
|||
if (nb) {
|
||||
inp.nestedBlock(nb.fullCopy());
|
||||
}
|
||||
} else if (old instanceof MultiArgMorph &&
|
||||
inp instanceof MultiArgMorph &&
|
||||
(old.slotSpec === inp.slotSpec)) {
|
||||
this.replaceInput(inp, old.fullCopy());
|
||||
}
|
||||
offset += 1;
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue