Thanks, now I have more insight.
Now there is one concern:
| v |
v := RTView new.
v addAll: ((RTEllipse new size: 20) elementsOn: (1 to: 100)).
RTGridLayout on: v elements.
v canvas camera focusOnCenterScaled: 500.
v
That stuff is not centred :)
Uko
On 04 Jun 2014, at 19:00, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
It works well I think. Try this:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v |
v := RTView new.
v canvas addMenu: 'Left' callback: [ v canvas camera translateBy: -5 @ 0. v
signalUpdate ].
v canvas addMenu: 'Right' callback: [ v canvas camera translateBy: 5 @ 0. v
signalUpdate ].
v canvas addMenu: 'Up' callback: [ v canvas camera translateBy: 0 @ -5. v
signalUpdate ].
v canvas addMenu: 'Down' callback: [ v canvas camera translateBy: 0 @ 5. v
signalUpdate ].
v addAll: ((RTEllipse new size: 20) elementsOn: (1 to: 100)).
RTGridLayout on: v elements.
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
However, when you open a view, the camera is centered at the center of all the elements
(ie. focusOnCenter). So far, this has worked pretty well, however this can be changed.
Cheers,
Alexandre
On Jun 4, 2014, at 2:43 PM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
Yes, the thing is that I do:
view canvas camera translateBy: 1000@1000.
view signalUpdate.
and nothing happens. Do you have any more suggestions of what I can check?
Uko
P.S. Of course #translateBy works because it’s used during dragging. Can the issue be
related to use GTInspector? Is something not initialised before view is being displayed
for a first time?
Uko
On 04 Jun 2014, at 16:47, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
You need to send #signalUpdate to the view after
having changed the camera
Cheers,
Alexandre
On Jun 4, 2014, at 7:12 AM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
> Hi,
>
> zooming in Roassal was always a sensitive topic for me, and now it seems to get
better API in Roassal2. There are still some things that I don’t understand. Eg. when I
send #translateTo:, #translateBy: and related things like #focusOnCenter to TRCamera,
nothing happens (at least in GTInspector view). Is there a specific way to use it? Or it’s
still work in progress?
>
> Cheers!
> Uko
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch