My expectation (and Kilon's as well) is that the name should be based on elements flow. So since elements in RTHorizontalFlowLayout
flow from top to bottom, RTVerticalFlowLayout
seems more correct.
For comparision:
(image generated with https://gist.github.com/peteruhnak/c1537ffcccddf86ac389 )
If I have elements organized in columns I can align them to the left by using alignTop
, and to right by alignBottom
(this is derived from RTAbstractFlowLayout
). But since it is in columns, it would make more sense to have alignLeft
and alignRight
.
Also I can limit the width of a line in horizontal flow with maxWidth:
, so shouldn't there be also limit for vertical flow column height maxHeight:
?
=> Pierre worked on this. I am forwarding the email to him.
This seems like oversight.
=> We could do that. But the makes the code with a lot of ifTrue:ifFalse:. Things that I would like to avoid.
By RTAbstractGridLayout
I meant both RTCellLayout
and RTGridLayout
; neither of them provide alignment support.
| v es |
v := RTView new.
es := (RTBox new size: 20) elementsOn: (1 to: 15).
v addAll: es.
RTCellLayout new
gapSize: 10;
on: es.
v
issues:
- first line is misaligned
gapSize:
is only applied to x-axis
=> Indeed. You’re right. I am wondering what the RTCellLayout is useful for. Juraj worked on it. I will ask him.
When I apply tree layout to the following presentation all lines are duplicated. On top of the expected ones (blue lines originating from center) there are also gray lines originating from the borders of the elements. But if I change the layout to dominance tree they disappear.
| view classes b |
view := RTView new.
view @ RTDraggableView @ RTZoomableView.
classes := RTShape withAllSubclasses, TRShape withAllSubclasses.
b := RTMondrian new.
b view:view.
b shape circle.
b nodes: classes.
b edges connectFrom: #superclass.
b shape line
color: (Color blue alpha: 0.2).
b edges notUseInLayout; connectToAll: #dependentClasses.
b normalizer
normalizeSize: #numberOfMethods using: #sqrt;
normalizeColor: #numberOfMethods using: (Array with: Color green with: Color red) using: #sqrt.
b layout tree. "<--- double lines"
"b layout dominanceTree." "<--- single lines"
b build.