Closed DoctorMcKay closed 4 years ago
Sounds useful.
I'm wondering if this should be a generic "extra_data" object (instead of a string) that the library passes along but doesn't make any assumption about. Then origin
could be one property of that object. And if some other information would be needed it could be added without a furthe API change.
Please also don't forget to document this change in the readme.
That sounds like a good idea to me. Will update later.
I think I'm also going to submit a separate pull request to add a hook when updating a channel so that the channel's value can be modified e.g. according to a master fader.
I've pushed some commits to change the origin
argument to extraData
as suggested, with animations setting the origin
property to the string 'animation'.
I've also updated the tests and readme.
Thank you! And apologies for the delay.
I'm currently building my own DMX controller software, and my use-case for this
origin
parameter is to be able to distinguish between what triggered anupdate
. If the update was triggered by an animation, I want to replicate that data to the UI, but if the update was triggered by the UI, then I don't want to update the UI unnecessarily.