Add documentation and cleanup
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
function ThreeDHandler(canvas) {
|
function ThreeDHandler(canvas) {
|
||||||
var _overlay = new fabric.Group();
|
var _overlay = new fabric.Group();
|
||||||
var _image;
|
var _image;
|
||||||
var self = this;
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
_overlay
|
_overlay
|
||||||
@@ -22,16 +21,25 @@ function ThreeDHandler(canvas) {
|
|||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {ThreeDHandler}
|
||||||
|
*/
|
||||||
this.disable = function () {
|
this.disable = function () {
|
||||||
_overlay.setVisible(false).canvas.renderAll();
|
_overlay.setVisible(false).canvas.renderAll();
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {ThreeDHandler}
|
||||||
|
*/
|
||||||
this.enable = function () {
|
this.enable = function () {
|
||||||
_overlay.setVisible(true).canvas.renderAll();
|
_overlay.setVisible(true).canvas.renderAll();
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {ThreeDHandler}
|
||||||
|
*/
|
||||||
this.setImage = function (img) {
|
this.setImage = function (img) {
|
||||||
img.set({
|
img.set({
|
||||||
originX: 'center',
|
originX: 'center',
|
||||||
|
|||||||
Reference in New Issue
Block a user