-
Notifications
You must be signed in to change notification settings - Fork 70
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
[Bug] A blank white space appears when erasing the canvas #103
Comments
@jaballogian Thanks for logging it with a lot of details. It's very helpful! I'll try to come up with a fix in v7. In the meantime, if you find a fix, please send a PR. |
@jaballogian @vinothpandian I'm experiencing the same bug here - any update on this issue? (or on when to expect v7?) |
Hey @dominiczy, I don't have a fix yet. I'll have time to try a fix after a couple of weeks. |
@jaballogian, @dominiczy This is fixed with react-sketch-canvas@7.0.0-next.2 You can pass |
@vinothpandian doesn't seem to work for me yet. Or is setting the |
Hey @dominiczy, You have to set |
@vinothpandian humm I previously forked the repo (https://github.com/dominiczy/traverse-sketch-canvas) because I needed to do a coordinate transformation in order to use the sketch canvas inside a component scaled down by CSS (I use it to allow drawing on mindmaps for https://traverse.link/). I already added viewBox support to my fork, and now I copied in your code from e28c63f which adds the |
Hey @dominiczy, I'm not sure why you are still facing this issue. I replicated the demo from the issue over here. Can you check by opening the link
You will see that when withViewBox is false, you'll get a blank white space and it won't appear when withViewBox is true. I just noticed an additional issue with viewbox on load paths, I'll track that over here #114 |
Describe the bug
A blank white space appears and covers the middle to the bottom section of the canvas when erasing the canvas.
Here is the video https://www.awesomescreenshot.com/video/13450607?key=caaf718794e5b4e01723f8472a025b6d
To Reproduce
Steps to reproduce the behavior https://www.awesomescreenshot.com/video/13449258?key=45a625eae8aa43585ed4d2f5a3f89d72:
Expected behavior
No blank white space appears.
Screenshots
(Attached above).
Desktop:
Smartphone (please complete the following information):
Additional context
![image](https://user-images.githubusercontent.com/24468466/208869721-14439fdd-f56e-4132-844a-b44394e23da2.png)
If we export the canvas to an image file (by clicking the "Save" button), the exported image has no blank white space inside it.
In the codesandbox above, I have copied and pasted your code from the example folder to the App component but I didn't find any issue.
![image](https://user-images.githubusercontent.com/24468466/208871650-c9085a76-97b4-4b2e-9ac6-24dfa28beeae.png)
The text was updated successfully, but these errors were encountered: