CodeCity pan and default color

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CodeCity pan and default color

roberto.minelli@usi.ch
Hi guys,

I was playing with CodeCity. Thanks, Ricky for the effort in porting it to Pharo!

I was wondering if there is a way to pan the city? i.e., not rotating around axes, simple 2D pan.

I also have a “feature request” (that I already implemented myself): I noticed that the CCColorNormalizer lacks of a “zero” color.
In short, when you want to differentiate nodes with weight = 0.

For this I implemented a #CCColorNormalizerWithZeroColor (subclass of CCColorNormalizer) that overrides

ccValue: anObject
        | inputValue |
        inputValue := self transformation ccValue: anObject.
        inputValue isZero
                ifTrue: [ ^ self zero ]
                ifFalse: [ ^ super ccValue: anObject ]

#zero is a Color, instance variable of CCColorNormalizerWithZeroColor.

Thanks in advance,
Roby
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: CodeCity pan and default color

Richard Wettel-3
Ciao Roby

You're welcome. I'm glad I ported it, too. It's my favorite toy :)
As for the panning, you could try the arrow keys :). Too obvious?

The zero color is a good idea.

Cheers
Ricky


On Tue, Jun 10, 2014 at 2:23 PM, [hidden email] <[hidden email]> wrote:
Hi guys,

I was playing with CodeCity. Thanks, Ricky for the effort in porting it to Pharo!

I was wondering if there is a way to pan the city? i.e., not rotating around axes, simple 2D pan.

I also have a “feature request” (that I already implemented myself): I noticed that the CCColorNormalizer lacks of a “zero” color.
In short, when you want to differentiate nodes with weight = 0.

For this I implemented a #CCColorNormalizerWithZeroColor (subclass of CCColorNormalizer) that overrides

ccValue: anObject
        | inputValue |
        inputValue := self transformation ccValue: anObject.
        inputValue isZero
                ifTrue: [ ^ self zero ]
                ifFalse: [ ^ super ccValue: anObject ]

#zero is a Color, instance variable of CCColorNormalizerWithZeroColor.

Thanks in advance,
Roby
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev