initialize
takes an "options" object according to the documentation here
However, it seems that the options object is not defined. I briefly searched the source code, but that didn't reveal anything.
Where can I get the definition of options object?
You can pass options
object as the second parameter of constructor as here:
new fabric.Canvas('c', {
width: 600,
height: 600
})
Then when will invoke the initialize
method all props in options
object, in the end, will set to fabric canvas object. You can see it here in source code.
So, the definition of options object is all props and methods of fabric.Canvas. You can see them in source code below the initialize
method, uniScaleTransform
, uniScaleKey
, centeredScaling
etc. You can pass all of them to options
object