Tiny request: AnimatedPosition::setPosition with optional notification


#1

Would be nice if we could set the position of an AnimatedPosition with optional nofitication to listeners.


#2

What's the use-case? I'd have expected a listener to always want to know when the position changes, or it shouldn't be registered as a listener?


#3

Generally the use case is like with the components that takes a notification type. Think of where animated positions are used to make up those components.

More specificically:  assume we have a model layer owing some state, and a UI layer visualizaing the state. We'd generally initialize the UI so that it visualize the state and thus if animated position is used in the UI (say for scrolling a selection list to show one of the values of the model) we'll need to setPosition on the animatedPosition to initialize it but without re-updating the model. 


#4

I don't think that kind of thing is the responsibility of this class - in a case like you're describing, I'd have thought that the model class itself should keep a list of listeners, and call them appropriately.


#5

Ok, fair enough.