Fabricjs cloning canvas removes decimals from rectangle

前端 未结 1 1141
陌清茗
陌清茗 2021-01-24 05:35

I\'ve got the following code which clones a canvas in fabricjs:

 var canvas = new fabric.Canvas(\'c\');    
 canvas.width = 644.51234567;
 canvas.height = 644.51         


        
相关标签:
1条回答
  • 2021-01-24 06:02

    Use NUM_FRACTION_DIGITS

    fabric.Object.NUM_FRACTION_DIGITS = 10;

    value = number of digit you want after decimal.

    The default value is 2.

    0 讨论(0)
提交回复
热议问题