On Thu, Mar 10, 2016 at 12:36 AM, Martin Bähr <mar...@realss.com> wrote:
> hi, > > i just remembered two things: > > i'd like to see rounded corners on nodes. > We've added this quite some time ago, unless you have something else in mind. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |v e| v := RTView new. e := RTRoundedBox new size: 100; borderRadius: 20; borderColor: Color black; borderWidth: 1; element. v add: e. v ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Excerpts from stepharo's message of 2016-02-24 12:42:49 +0100: > > - having a better output (arrows, edge) > > and related to edges: > > i'd like edges to connect to a node on the border of the box, not to the > center > of the node. this means the connecting point would always be at the middle > of > the side of one edge: > We have about 10 different attach points already. See the 'attach point' protocol of RTAbstractLine. Some of them also automatically add extra space if there are multiple lines between the same elements. As for bezier and multiline edges, their curvature isn't currently handled properly, but it's in my todo list (I'll work on this probably during the weekend). I'm sure it can be presented in more revealing way, but it's too late for me today (or is it too early?). You can play with it (drag the elements to see how it behaves). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |v attachOptions es e offset| v := RTView new. attachOptions := RTAbstractLine selectors select: [ :each | each beginsWith: #with ]. offset := 0 @ 0. attachOptions do: [ :each | es := RTBox new borderColor: Color black; size: 50; elementsOn: #(a b). each = #withContinuousCircleAttachPoint ifTrue: [ es := RTEllipse new borderColor: Color black; size: 50; elementsOn: #(a b). ]. es translateBy: offset. es @ RTDraggable. offset := offset + (0 @ 100). v addAll: es. es second translateBy: 300 @ 25. e := RTArrowedLine new color: Color black; perform: each; edgeFrom: es first to: es second. e model: each. v add: e. e @ (RTLabelled new color: Color black). ]. v ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ___\|/___ > | | > \| |/ > --| |-- > /| |\ > |_________| > /|\ > > bezier edges should always leave at a 90deg angle: > ____|____ > | | > | | > --| |-- > | | > |_________| > | > > optionally, starting at the corners could also be nice: > > \_________/ > | | > | | > | | > | | > |_________| > / \ > > and in such a case bezier edges should leave at 135deg to each side. > > by default the edge should find the nearest connection point, but i'd like > to > configure a list of allowed points. > > finally, multiple edges in the same general direction should either leave > at > the same point, pick the nearest side that doesn't have an edge already. > or spaced evenly along the same side if all available sides have edges > already. > > the list of allowed connection points would have 12 options: > the middle of 4 sides, 4 corners, and 4 sides as a whole when multiple > edges > should be spaced evenly. > > greetings, martin. > > -- > eKita - the online platform for your entire academic > life > -- > chief engineer > eKita.co > pike programmer pike.lysator.liu.se caudium.net > societyserver.org > secretary > beijinglug.org > mentor > fossasia.org > foresight developer foresightlinux.org > realss.com > unix sysadmin > Martin Bähr working in china > http://societyserver.org/mbaehr/ > >