Animators and OpenFlux...

0 views
Skip to first unread message

viatropos

unread,
Nov 14, 2008, 11:59:58 AM11/14/08
to OpenFlux
Hi,

I have question, here's the scenario:

- user clicks button on menu component, this dispatches an event, such
as NEW_PAGE that ultimately wants to change a page-component (load
data and tween it around).
- event is handled in mate's EventMap, which uses a manager to create
a new page model/component (component-view-controller).
- once the model/component is created, the manager injects those
values into the component, such as the new page and a certain state
variable (isTwistable = true).
- the change in the state variable is bound to an update method or
something on the component, invoking the animator.
- the animator animates/tweens the page forward... simple.

Question is, how do you explicitly say "animate this object" from
OpenFlux? I was thinking about running an animation based on whether
or not a state variable was true:

<Button>
<animator1 enabled="component.isTwistable">
<animator2 enabled="component.isBounceable">
</Button>

To do something like this, I basically just need to bind "Button.update
()" to any change in those state variables, and then this would assign
the Button to whatever Animator was enabled at that time. Is there a
way to do this already in OpenFlux? Thanks so much for your help,
this framework is sick.

Best,
Lance

viatropos

unread,
Nov 14, 2008, 12:57:01 PM11/14/08
to OpenFlux
It seems like the only way the Animator is being called right now is
through the Layout:

LayoutBase -> adds ListEvent.CHANGE listener to component, and
invalidates display list when it hears it.
Container -> invalidateDisplayList() leads to commitProperties() which
calls updateLayout()
Container -> updateLayout() method in this class calls Layout.update()
ILayout -> update() method in this class sets animationToken, and
calls Animator.moveItem() for each item in the layout (CarouselLayout
for example).

If in the Container you could also have an updateAnimator() method
that called Animator.moveItem(), then you can use the Animator without
the Layout, which would be nice for single components and tweening and
whatnot.

Any ideas?
Reply all
Reply to author
Forward
0 new messages