-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AB-12 Added strokeprop event to fix replay stroke style bug #17
Conversation
I think this isn't completely right for some reasons I will try to explain. Just to define some things first that can be a little confusing for anyone who hasn't worked on this code before: IEvent: Events do not by itself have any inherit meaning and so IEvent always have to be translated to an IAction based on the state of the Dispatcher. A general rule is that most events will come from Javascript event listeners. Hope that wasn't too confusing... |
So basically:
Or if you have any good ideas on how to do it in an even better way, feel free to share your suggestions :) |
I will take your reviews and comments into account and update the PR, I had a feeling I had made a significant structural misunderstanding, and I think your comments should go a long way to helping correct it. I'm sure I'll also have some more detailed questions as I go about realizing the change. Thanks for the feedback 👍 will fix when I find the time |
The recent commit is not yet ready for merge. I pushed it to fish for some feedback. I'm having issues with replaying seemingly overwriting the strokeProps assigned to Actions, and can't exactly see where or why this should occur. But I am beginning to understand the structure a lot better, so there's that :D |
This looks good! You're definitely on the right track now :) It looks like the example application is modifying values directly in the strokeProps object rather than creating a new copy on change. This results in all actions pointing to the same strokeProps object, which I'm guessing is the cause of the issue you're having. |
And if you can add a couple of tests, that would great (might be harder than I think it is...) |
Your recommended adjustments worked perfectly, nice! Manually testing shows decent behaviour. Next I'll try writing some tests, although I expect this to be relatively hard. |
Looks good :) |
It seemed to me that some of the neccessary preparation for having strokeprops handled as an event was already done, and it appears no work well.
First time touching Drawify, so its likely great room for improvement 🐤