-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Freedrawn lines sometimes rendered wrong #3590
Comments
you could try disable objectCaching. |
Thanks! I'll try en let you know if this helped |
unfortunately, it is not working. Some code we use (it is inside an extension of our application) `var defaults = {
var myCanvas = new fabric.Canvas(target + '_canvas', { var brushWidth = config.freeDrawingBrush.width;
$j('.colors button').click(function() {
|
Sorry, the code is not entirely copied right here. |
Also when drawing a straight line, it is making it much smaller |
feels like complete custom code. |
The code is just setting options of fabric, nothing more. Only thing is, we have some different background images so we load it dynamically. |
from @ingridmarleen You asked me to come up with a fiddle instead of code in our own application. Well, I didn't need to. In my previous issue I posted a screenshot of the freedraw demo where I have the same problem and now I also have one in the kitchensink. (see picture, the greyish lines had to be thicker black ones, almost straight) |
In the above, I meant to say I'm NOT posting this issue to mock at you, I'm sorry for the typo. I have a fiddle here. But there, you also have t try to draw lines, because it will not save the lines I drew. It seems the interpolation isn't totally right. We also tried in Chrome, unfortunately ending up the same. |
Looks like i cannot get it because i m on a retina screen. It could be a problem of clipping because of small dimension and pixels. Like a path is meant to be 3.5 pixels width, cache will be 3 or 4 not 3.5 and this may cause the issue. i guess adding a Math.ceil to cache dimension and adding 1 or 2 pixels at extra safe margin could fix the issue. |
@asturur in which function(s) do I have to change something to try if this works? |
In the makeBoundingBoxFromPoints function? |
fixed with #3596 |
Wow great, I was gonna try today but you are a step ahead. Thanks! |
I have a problem which sometimes also occurs on the demo page.
When drawing a freehand, the line is flattened at some point (see blue one in image). This line supposed to be like the other two, with a little curve.
Is this something of the canvas element itself or something in fabric?
I am using firefox.
The text was updated successfully, but these errors were encountered: