Closed 0xkarambit closed 4 years ago
Thank you for reporting, Harshit! Yes it has that 100px space from top.
This is happening because inside canvas, pointer changes to an image of the hand with a pen. To match the line with the pen point, I had to add some additional y-axis top value so that the line will match the point of the pen.
https://github.com/saurabhdaware/text-to-handwriting/blob/master/js/utils/draw.mjs#L34
Not really sure how we can solve this... Keeping this open if anyone has any idea.
I am interested to work on this bug but where is this drawing canvas I can't find out that
Hi Jobin, the canvas is in "Draw (beta)" button.
In Code, the canvas is here: https://github.com/saurabhdaware/text-to-handwriting/blob/master/index.html#L504
Let me know if you need any help :D
yes, can you provide some help or some outline of the error or something else from your idea?
yes, can you please provide some help about how the drawing is doing to the canvas I search the file with the canvas id but I can't find where the drawing enables to it
So this is the line that adds dots to canvas https://github.com/saurabhdaware/text-to-handwriting/blob/master/js/utils/draw.mjs#L133
In the drawPoint function,This file has that +32
value which adds extra height to the output line.
https://github.com/saurabhdaware/text-to-handwriting/blob/master/js/utils/draw.mjs#L34
That +32
value allows us to have an output line properly aligned with the pen in the icon. But because of that, the top 32pixels cannot be used. I am not sure what all ways are available to solve this.
ok
Description of the bug the canvas is not fully usable. the space on top is not usable but instead the downwards part of the canvas is being drawn on but not being displayed.
To Reproduce Steps to reproduce the behavior:
Expected behavior we should be able to draw over that part of the canvas and not be able to draw over the bottom part of the canvas (the part that is not being displayed)
Desktop (please complete the following information):