Fabric.js changes my canvas size to 300×150 after initialization

in the latest version, you will have to do something like:

var canvas = new fabric.Canvas('myCanvas');
canvas.setHeight(500);
canvas.setWidth(800);

…. Your code ….

canvas.renderAll();

Works fine for me..

For dynamically changing size, this works too

Leave a Comment