Hello guys,
I would like to suggest this simple change in TimeLineMax.addCallback signature:
Current
TimeLineMax.addCallback(callback, position, [args], scope)
Suggestion
TimeLineMax.addCallback(callback, position, scope, [args])
I know there is a reason to this current signature, but there is some situations where you don't want to set arguments, so the usage can be more simple and clean like this
// Example
var tmx = new TimelineMax;
tmx.add(twm1)
// current
// tmx.addCallback(onTMXComplete, tmx.totalDuration(), null, this)
// suggestion
tmx.addCallback(onTMXComplete, tmx.totalDuration(), this)
Look the last argument can be ignored.
Of course, this same sequence, can be used for any method that needs to set scope as argument (callback, scope, args).
Sorry if I made a suggestion in a wrong place.
Thanks,
UPDATE: I forgot to add position argument.