Here is the right version of the script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v es anim edges |
v := RTView new.
v @ RTDraggableView.
es := RTEllipse new elementsOn: RTObject withAllSubclasses.
v addAll: es.
RTMetricNormalizer new
elements: es;
normalizeSize: #numberOfLinesOfCode min: 5 max: 30 using: [:vv | vv sqrt * 5 ];
normalizeColor: #numberOfMethods using: { Color green . Color red };
alphaColor: 0.3.
anim := RTSpringLayoutStepping new view: v.
v addAnimation: anim.
v addMenu: 'add edges' callback: [
edges := RTEdgeBuilder new
view: v;
objects: RTObject withAllSubclasses from: #superclass.
anim addEdges: edges ].
v addMenu: 'remove edges' callback: [
v edges do: #remove.
anim removeAllEdges.
v signalUpdate ].
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Oct 14, 2014, at 10:49 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
> Hi All,
>
> In the last version of Roassal, you can enjoy a nice animation:
>
> https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout2.mov
>
> Here is the script
> -=-=-=-=-=-=-=-=-=-=-=-=
> | v es anim edges |
> v := RTView new.
> v @ RTDraggableView.
>
> es := RTEllipse new elementsOn: RTObject withAllSubclasses.
> v addAll: es.
> RTMetricNormalizer new
> elements: es;
> normalizeSize: #numberOfLinesOfCode min: 5 max: 30 using: [:vv | vv sqrt * 5 ];
> normalizeColor: #numberOfMethods using: { Color green . Color red };
> alphaColor: 0.3.
>
> anim := RTSpringLayoutStepping new view: v.
> v addAnimation: anim.
>
> v addMenu: ''add edges'' callback: [
> edges := RTEdgeBuilder new
> view: v;
> objects: RTObject withAllSubclasses from: #superclass.
> anim addEdges: edges ].
>
> v addMenu: ''remove edges'' callback: [
> v edges do: #remove.
> anim removeAllEdges.
> v signalUpdate ].
> v open.
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev