-
Notifications
You must be signed in to change notification settings - Fork 0
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
canvas work part II #43
Comments
@anschelburk I found a plugin 💡 - works now: #44 - it even has ctrl+z and ctrl+y keyboard shortcuts 🎉 |
Confirmed that it works! One question - I merged the pull request and pulled it to my local repo, but noticed that part of the new code for the |
Was able to get most of these things done. Started work on the eraser, but it turns out that an eraser is not included as part of Fabric.js's standard package, so will need to be created. (I took a first stab at implementing this code, but it doesn't yet work. Fabric.js does have a page about this, which I took a look at today, and will continue exploring tomorrow.) In the time, I've opened a pull request with my work so far - eraser needs to be debugged, and the extra curve still needs to be eliminated when a user drags their mouse while typing. Otherwise, everything seems to work as it should! Will revisit these things tomorrow. |
Reviewed before seeing this, that explains why the EraserBrush is not working, because "You will need to create a custom build." Going to that page http://fabricjs.com/build/ it pre-selects eraser, then you can download a minimized js file, which you can include in your django static files and then link it in your template. I will try that later ... |
@anschelburk great find regarding the custom fabric js rolling option, I did that and included it in static/js, then with a few tweaks it works now, beautiful! #46 (also did a bit of general cleanup) HTH |
We've now implemented all features, but there are some bugs. Let's talk about these tomorrow - I've fixed one, and left some comments on a few more of the bugs. I've also submitted a pull request for where my code is right now. Bugs to fix:
|
Fixed this: learned I could change how the background image was being set, so that I could explicitly define its |
Tried to fix this by defining a new variable toward the beginning of the code,
toggling that variable's value in the
and then changing the
Not working yet though. (I suspect part of this has to do with the scope of the variable - I'm using the same variable na me inside and outside of a function, which may not be the right approach, though I'm unsure what to do at that point. Will revisit tomorrow. |
Let's talk tomorrow about how the new js file for the eraser works - I merged the pull request you sent, and saw that the new |
Fixed - added an extra line to |
Found a workaround for now - the curve is still traced out, but it immediately disappears as soon as the user releases the mouse. Did this by adding in a new
and then adding a second
I also moved the initial I think that these 'null strokes' may still be registering on the undoStack, because after tracing out one of these 'null strokes', I need to click the |
Also, I think your suspicion was correct that Copilot and GPT are different experiences. I want to play around with the
|
Great work! And that's interesting regarding the AI tools.
So only issue left is undo/redo with eraser at this point? |
Agreed, and that is 3.5! So the tool/interface matters a lot here actually. |
Seems it's a known issue that fabric-history (undo/redo) does not work well with eraser: alimozdemir/fabric-history#53 There seems a workaround at the end which I translated through gpt, but not sure if it's worth spending too much time on given that the assignment part will be quite some work to do yet. |
Got it, that's interesting. I'm going to open a new issue to debug the undo/redo button. I want to keep working on it and talking about questions with it together, but I think that can be done in the background as we shift the focus of our meetings to the multiple widgets feature. So, I'm going to close this issue as done, and...
|
Checklist as per meeting:
The text was updated successfully, but these errors were encountered: