angular-fabric
angular-fabric copied to clipboard
Cannot init canvas with defined height and width
$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);
});
+1 I also had the same issue!
+2 I also had the same issue!
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.