Skip to content
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

Dynamic Color goes to default on undo #302

Closed
RahibAly opened this issue Sep 15, 2017 · 3 comments
Closed

Dynamic Color goes to default on undo #302

RahibAly opened this issue Sep 15, 2017 · 3 comments
Labels

Comments

@RahibAly
Copy link

I'm creating a page where I have added 4-5 dynamic color boxes to choose from, and it works very well..
But the problem is when I use undo functionality, if I select color red and draw a line, then I change color to green and draw 2nd line, then I choose color Red and draw 3rd line, then when I click undo it works but all lines color changes back to the current selected color..

@szimek szimek added the bug label Sep 15, 2017
@szimek
Copy link
Owner

szimek commented Sep 15, 2017

Unfortunately, it's a bug :/ I created a demo to replicate it: https://jsfiddle.net/szimek/js6u2L27/.

Fortunately, it's easy to fix ;) I'll try to find some time during the weekend to release a new version, but in the meantime, you can just add:

this.penColor = color;

right before this line: https://github.com/szimek/signature_pad/blob/master/example/js/signature_pad.js#L496 to fix it.

@RahibAly
Copy link
Author

Great! it fixed the issue, Thanks a lot

@szimek
Copy link
Owner

szimek commented Sep 18, 2017

Fixed in 2.3.2!

@szimek szimek closed this as completed Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants