[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fenfire-dev] Re: back tomorrow

From: Benja Fallenstein
Subject: [Fenfire-dev] Re: back tomorrow
Date: Tue, 22 Feb 2005 17:01:52 +0100

On Tue, 22 Feb 2005 16:08:12 +0100, Benja Fallenstein
<address@hidden> wrote:
>     Model cursor;
>     final class Cursor {
>         final Object spatialContext;
>         final Model spatialPosition; // type of object depends on the
> spatial view
>         final Map rotations;
>         final Model nodeCursor; // contains a NodeCursor
>     }
>     final class NodeCursor {
>         final Object node;
>         final Model contentCursor; // type of object depends on content view
>     }
> - When you move in StructureView, it creates a new Cursor and does
> 'cursor.set(newCursor).'

So the Cursor object stays the same until you move (not rotate) in the
*structure* view. When you do that, a completely new Cursor object is
created and the old one is forgotten -- including all the information
it contained, like 'rotations' and the 'spatialPosition'. The
spatialPosition model is merely forgotten; it doesn't change.

Yes! This very nicely solves a problem that I had only an ugly fix for

When the canvas is the mainview, the PanZoomLob is currently wired to
StructureView's 'cursor' Model. When the cursor model changes,
PanZoomLob reads the new pan/zoom from the CanvasCursor and changes
the VobScene according to that.

Now when the user moves in the StructureView, the cursor model changes
-- to another canvas or to a non-canvas node. By default, PanZoomLob
will change the main view in the existing vob scene to the pan/zoom of
that new cursor position -- even though that cursor position is
unrelated to the canvas shown in the existing mainview. Then it
interpolates from the *changed* existing vobscene to the new vobscene,
which looks extremely wrong. :-) So I hacked it so that it remembers
the canvas (or perhaps it was the focused node) and doesn't change the
vobscene when the canvas changed. And that's kind of an ugly way to
solve this.

The proposed model is much nicer -- the PanZoomLob would simply be
wired to the 'spatialPosition' model. When that model changes, the
PanZoomLob changes the existing VobScene.

When the user moves in the spatial view, the 'spatialPosition' changes
and the PanZoomLob changes, just the right way.

When the user moves in the structure view, the old Cursor object,
containing the old 'spatialPosition' model, is just discarded. The
'spatialPosition' model doesn't change. So PanZoomLob doesn't change
the existing vob scene and everything works just as it should.

Nice! :-)

- Benja

reply via email to

[Prev in Thread] Current Thread [Next in Thread]