Add documentation and cleanup
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user