Added simple resize function to canvas. Needs to be fixed with positioning of other elements

This commit is contained in:
Erik Tiekstra
2017-05-19 07:41:20 +02:00
parent eb6ff91aff
commit 7817b35a50
3 changed files with 18 additions and 10 deletions
+6
View File
@@ -31,6 +31,12 @@ var Canvas = fabric.util.createClass(fabric.Canvas, {
});
},
resize: function (args) {
this.setHeight(args.height);
this.setWidth(args.width);
this.renderAll();
},
get3dHandler: function () {
return this.__3dHandler ||
(this.__3dHandler = new ThreeDHandler(this));