On Mar 9, 2016, at 18:51, Peter Uhnák i.uhnak@gmail.com wrote:
On Wed, Mar 9, 2016 at 10:02 PM, Johan Fabry <jfabry@dcc.uchile.cl mailto:jfabry@dcc.uchile.cl> wrote: Heh, also a funny feature of your anchor constraints: they do not play well with layouts and animations. Try the code below (adapted from the example to use the layout and animation of LRP ) and you will see that the circles keep spinning around, they never stop. I think it would be better for them to stop ;-)
can't help myself :)
https://youtu.be/PGNiXGX2nLU?t=1m https://youtu.be/PGNiXGX2nLU?t=1m
Hehe, good one :-) https://youtu.be/uo0o8eQWfcI ! :-P
stepping := RTSpringLayoutStepping new view: v; layout: layout; afterBlock: [ v canvas camera focusOnCenter].
The problem is that RTSpringLayoutStepping>>view sets in effect the layout on all elements in the view, which obviously won't work since they'll start competing.
I'm not sure right now how to address it, but try this
stepping := RTSpringLayoutStepping new view: RTView new; layout: layout; nodes: es; afterBlock: [ v canvas camera focusOnCenter].
Sorry, I don’t know enough of the internals to understand what’s going on. The solution is not a solution for me, because it effectively removes the animation, we only see the the resulting layout. There is no other solution? Alex, do you have any idea?
Ah right, thanks. I've extracted the class from my code and I have different removal mechanism... Please try the latest version, it should be fixed there.
Fixed, thanks!
But now there is a new bug RTAnchorConstraint>>computeExtraDistance that I cannot reliably reproduce, I only have a stack trace, sorry:
Array(Object)>>errorSubscriptBounds: Array(Object)>>at: Array(SequenceableCollection)>>first Array(SequenceableCollection)>>anyOne Array(Collection)>>max RTAnchorConstraint>>computeExtraDistance [ :crossings | element translateBy: aSegment vector normal * (minDistance + self computeExtraDistance) negated ] in RTAnchorConstraint>>moveAwayFromSegment: BlockClosure>>cull: Set(Collection)>>ifNotEmpty: RTAnchorConstraint>>moveAwayFromSegment: RTAnchorConstraint>>moveElement RTAnchorConstraint>>update [ self update ] in RTAnchorConstraint>>build BlockClosure>>cull: BlockClosure>>cull:cull: TRTranslationCallback>>shape:step: [ :c | c isTranslationCallback ifTrue: [ c shape: self step: aStep ] ] in TREllipseShape(TRCallableObject)>>triggerCallbacksForStep: OrderedCollection>>do: TREllipseShape(TRCallableObject)>>triggerCallbacksForStep: TREllipseShape(TRAbstractBoxShape)>>fromRectangle: TREllipseShape(TRAbstractBoxShape)>>fromRectangle:color: RTEllipse>>updateFor:trachelShape: RTEllipse(RTShape)>>updateFor: RTElement(RTShapedObject)>>update
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile