kopia lustrzana https://github.com/backface/turtlestitch
arrange variadic ring inputs vertically
(e.g. the reporter rings in PIPE)pull/95/head
rodzic
b5e65e8f8e
commit
0be5a58ae1
|
@ -2,8 +2,12 @@
|
|||
|
||||
## in development:
|
||||
|
||||
* **Notable Changes:**
|
||||
* variadic ring inputs are now arranged vertically (e.g. the reporter rings in PIPE)
|
||||
|
||||
### 2021-02-27
|
||||
* new dev version
|
||||
* blocks: arrange variadic ring inputs vertically (e.g. the reporter rings in PIPE)
|
||||
|
||||
## 6.6.0
|
||||
* **New Features:**
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script src="src/morphic.js?version=2021-02-10"></script>
|
||||
<script src="src/symbols.js?version=2020-10-07"></script>
|
||||
<script src="src/widgets.js?version=2021-01-05"></script>
|
||||
<script src="src/blocks.js?version=2021-02-15"></script>
|
||||
<script src="src/blocks.js?version=2021-02-27"></script>
|
||||
<script src="src/threads.js?version=2021-02-23"></script>
|
||||
<script src="src/objects.js?version=2021-02-23"></script>
|
||||
<script src="src/gui.js?version=2021-02-27"></script>
|
||||
|
|
|
@ -158,7 +158,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2021-February-15';
|
||||
modules.blocks = '2021-February-27';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -1824,6 +1824,14 @@ SyntaxElementMorph.prototype.fixLayout = function () {
|
|||
} else {
|
||||
lines.push([part]);
|
||||
}
|
||||
} else if (this.isVertical() && !(part instanceof FrameMorph)) {
|
||||
// variadic ring-inputs are arranged vertically
|
||||
// except the arrows for expanding and collapsing them
|
||||
if (l.length > 0) {
|
||||
lines.push(l);
|
||||
}
|
||||
l = [part];
|
||||
x = part.fullBounds().width() + space;
|
||||
} else if (part instanceof BlockHighlightMorph) {
|
||||
nop(); // should be redundant now
|
||||
// this.fullChanged();
|
||||
|
@ -2061,6 +2069,11 @@ SyntaxElementMorph.prototype.methodIconExtent = function () {
|
|||
: new Point(0, 0);
|
||||
};
|
||||
|
||||
SyntaxElementMorph.prototype.isVertical = function () {
|
||||
// control layout rule of variadic inputs, default is false
|
||||
return false;
|
||||
};
|
||||
|
||||
// SyntaxElementMorph evaluating:
|
||||
|
||||
SyntaxElementMorph.prototype.evaluate = function () {
|
||||
|
@ -11776,6 +11789,10 @@ MultiArgMorph.prototype.removeInput = function () {
|
|||
this.fixLayout();
|
||||
};
|
||||
|
||||
MultiArgMorph.prototype.isVertical = function () {
|
||||
return contains(['%repRing', '%predRing', '%cmdRing'], this.slotSpec);
|
||||
};
|
||||
|
||||
MultiArgMorph.prototype.is3ArgRingInHOF = function () {
|
||||
// answer true if I am embedded into a ring inside a HOF block
|
||||
// that supports 3 parameters ("item, idx, data")
|
||||
|
|
Ładowanie…
Reference in New Issue