angular-fabric icon indicating copy to clipboard operation
angular-fabric copied to clipboard

Cannot init canvas with defined height and width

Open dziamid opened this issue 9 years ago • 3 comments

 $scope.$on('canvas:created', function () {
    $scope.fabric = new Fabric({
      canvasWidth: 800,
      canvasOriginalWidth: 800
    });
  });

Creates canvas with 300 width and 300 height.

The following works, nevertheless:

  $scope.$on('canvas:created', function () {
    $scope.fabric = new Fabric();
    $scope.fabric.setCanvasSize(800, 400);
  });

dziamid avatar Mar 14 '15 11:03 dziamid

+1 I also had the same issue!

Ross-Rawlins avatar Dec 23 '15 13:12 Ross-Rawlins

+2 I also had the same issue!

jacksoncoutinho avatar Mar 14 '16 12:03 jacksoncoutinho

I wonder what is the way for you guys to implement Fabric.js into your Angular project. So far I am just inserting all the hrefs into the index page and directly use Fabric.js like this, var canvas = new fabric.Canvas(...);

This way I could use Fabric but I cannot integrate any Angular Material stuff into the canvas element. Really hope this repo can get updated.

shurui91 avatar Aug 15 '16 15:08 shurui91