Add documentation and cleanup

This commit is contained in:
Rikard Bartholf
2017-05-18 18:51:03 +02:00
parent 6e605d21d7
commit eb6ff91aff
+9 -1
View File
@@ -3,7 +3,6 @@
function ThreeDHandler(canvas) {
var _overlay = new fabric.Group();
var _image;
var self = this;
function init() {
_overlay
@@ -22,16 +21,25 @@ function ThreeDHandler(canvas) {
init();
/**
* @return {ThreeDHandler}
*/
this.disable = function () {
_overlay.setVisible(false).canvas.renderAll();
return this;
};
/**
* @return {ThreeDHandler}
*/
this.enable = function () {
_overlay.setVisible(true).canvas.renderAll();
return this;
};
/**
* @return {ThreeDHandler}
*/
this.setImage = function (img) {
img.set({
originX: 'center',