On Apr 8, 2015, at 10:39 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
Here is a small animated scale I did for the datathlon team. Some may find it interesting.
-=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.
v @ RTDraggableView.
"Linear per default"
scale := [ :x | x ].
width := 200.
doLayout := [
RTHorizontalLineLayout new gapSize: 0; on: dots.
RTMetricNormalizer new
elements: dots;
fastSmoothTranslation;
normalizeY: #numberOfMethods min: 0 max: width negated using: scale.
v signalUpdate ].
v addMenu: 'linear' callback: [ scale := [ :x | x ]. doLayout value ].
v addMenu: 'log' callback: [ scale := [ :x | (x + 1) log ] . doLayout value ].
v addMenu: 'square root' callback: [ scale := [ :x | x sqrt ] . doLayout value ].
values := RTObject withAllSubclasses.
dots := (RTEllipse new color: (Color blue alpha: 0.5)) elementsOn: values.
v addAll: dots.
doLayout value.
v
-=-=-=-=-=-=-=-=-=-=-=-=
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