Canvas coordinates in Fabric.js have offset

后端 未结 3 2090
长发绾君心
长发绾君心 2020-12-15 01:20

I just started with fabric.js and I have a (probably beginner) error:

I am using fabric with jquery with the following code:

$(document).ready(functi         


        
3条回答
  •  隐瞒了意图╮
    2020-12-15 02:12

    Yes, this is highly unexpected and even more undocumented.

    Workaround:

    Set

    originX: "left"
    originY: "top"
    

    for each created object.

    edit: or use kangax simpler solution in the comment below.

提交回复
热议问题