naclcaleb / Draw

An online drawing program
https://naclcaleb.github.io/Draw/
GNU General Public License v3.0
4 stars 1 forks source link

Problem undoing/redoing #14

Closed OOPS-Studio closed 5 years ago

OOPS-Studio commented 5 years ago

So, I have a weird problem... When I undo and then redo and then try to undo again, it doesn't do anything. If I try to undo enough times then the screen starts to flash, and then the whole drawing disappears... Hope we can find a fix for this! ;) (More like, you find a fix if I'm not successful in the next 5 seconds! ;3) (Sorry for all the sarcasm... If you don't like it, I'll stop! 👍 )

naclcaleb commented 5 years ago

Hm... in theory you should be able to undo a redo anyway, since the undo would be popping what the redo just pushed.

I'll have to look into this later.

In the meantime, feel free to make another PR if you want.

OOPS-Studio commented 5 years ago

Hmm... Yep. I see what you mean... o.O Yeah, I guess it is an unknown problem... I'll remove my "solution"... ;3 (Just leave it at a problem! ;P)

OOPS-Studio commented 5 years ago

Ayy! I think I fixed it! ;) It was a problem on my side! :) The problem was, I was unshifting() to the strokes array, and when you undo it pops() from the strokes array! ;) I made a new PR, you can test it and merge it if it works! :) (If so, I will close this issue! 🎉 )

naclcaleb commented 5 years ago

Yea, I realized that to!

Nice job! I'll try when I can.

OOPS-Studio commented 5 years ago
  1. Haha! XD Okay! ;)
  2. Thanks! ;3 Kewlness! :)
OOPS-Studio commented 5 years ago

Wait... YOU CLOSED MY ISSUE!? ARRGGG! >:( I wanted to do it. >:l (JK, JK, Thanks! ;))

naclcaleb commented 5 years ago

Oh, I put "fixes #14" in the merge commit message, which automatically closes the issue.

OOPS-Studio commented 5 years ago

Ahhhh! I see! :) That's pretty kewl! ;)