TelescopeSt / Telescope

Telescope is an engine for efficiently creating meaningful visualizations
MIT License
31 stars 9 forks source link

Add demo on node label positions #129

Closed jecisc closed 5 years ago

jecisc commented 5 years ago
TLDemos class >> exampleNodeLabelPosition
    <script: 'self exampleNodeLabelPosition open'>
    <tlFilter: #style>
    | visu |
    visu := TLVisualization new.
    #(top center bottom) do: [ :vert | #(left center right) do: [ :hor | visu addNodeFromEntity: vert -> hor ] ].
    visu layout: (TLLinearLayout gap: 50 perLine: 3).
    visu styleSheet
        nodeLabel: #asString
        position: [ :each | 
            TLPosition new
                horizontal: each value;
                vertical: each key;
                yourself ].
    ^ visu