FabricJS canvas is “stuck” after adding elements

前端 未结 2 1170
太阳男子
太阳男子 2021-01-03 00:19

I\'m creating an application using fabric.js, and experiencing really strange behavior. I\'m adding both images and text instances, using the regular fabr

2条回答
  •  甜味超标
    2021-01-03 01:09

    I had the same problem, in adition to kangax solution, in a VERY extreme environment, you can force it to recalculate the offset anytime the render occurs, with an event.

    canvas.on('after:render', function(){ this.calcOffset(); });

提交回复
热议问题