javascript - Fabricjs - setBackgroundImage to Empty URL causes null reference error in _setWidthHeight -


I found an article explaining how to clear the background of the canvas ...

Canvas.setBackgroundImage ('', canvas.renderAll.bind (canvas));

I have created an online design tool that uses Fabric 1.4.4 and includes a lot of functionality but can not know for my life what I am doing wrong here I canvas real image Can set in the URL and it is displayed correctly, but when I used the code to remove the background picture (shown above) I would like Fabricz S gets a JavaScript error:

Unused exception line 16045, in column 7 ... / fabric.js

0x800a138f - JavaScript runtime error: undefined or empty reference property Unable to get 'width'

The line refers to the _setWidthHeight method

Am I doing something wrong? It seems that it should be quite straight forward, but I can not remove the background image ... whether it exists or not.

K-Dev

  canvas.Sizebacksize (0, post-less "itemprop =" text "> 

canvas.renderAll.bind (canvas));

It works for us, Regards, Benike

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -