diff --git a/dist/image-editor.js b/dist/image-editor.js index 574776e..04b79f9 100644 --- a/dist/image-editor.js +++ b/dist/image-editor.js @@ -307,7 +307,7 @@ function ButtonMenu(canvas, settings) { disabled: true }); }); - } + }; /** * Shows all the buttons @@ -319,7 +319,7 @@ function ButtonMenu(canvas, settings) { disabled: false }); }); - } + }; /** * Recalculate boundaries and add all items to canvas if required @@ -419,7 +419,7 @@ var Canvas = fabric.util.createClass(fabric.Canvas, { if (this.get3dHandler().isEnabled()) { this.get3dHandler().refreshImage(); } else { - this.refreshImage(this.getResizedImage(this.getImage())) + this.refreshImage(this.getResizedImage(this.getImage())); this.getViewport().reset(); } this.sendToBack(this.getImage()); @@ -774,7 +774,7 @@ function DragbarHandler(canvas) { this.__handles.getHandles().forEach(function (handle) { handle.bringToFront(); }); - } + }; /** * Removes dragbars from canvas */ @@ -964,7 +964,7 @@ function FrameHandler(viewport) { viewport.canvas.renderAll(); return this; - } + }; /** * Sets passed frametype to passed viewwport @@ -1144,14 +1144,14 @@ function ImageDataHandler(img) { var cropData = { x: dragAxis === 'x' ? (viewportBounds.left - img.left) / (img.width * img.scaleX) : 0, y: dragAxis === 'y' ? (viewportBounds.top - img.top) / (img.height * img.scaleY) : 0, - } + }; sessionStorage.setItem('cropData', JSON.stringify(cropData)); - } + }; this.removeCropData = function() { sessionStorage.removeItem('cropData'); - } + }; /** * Gets an object containing applied transformations for the Image and also @@ -1362,11 +1362,11 @@ function MirrorHandler(img) { img.setCoords().canvas.renderAll(); return this; - } + }; this.getStatus = function() { return _mirrored; - } + }; } @@ -1556,7 +1556,7 @@ function TextButton(id, text, settings, isActive) { this.getId = function() { return _id; - } + }; /** * @return {Boolean} @@ -1662,7 +1662,7 @@ function Viewport(canvas) { canvas.getImage().center().setCoords(); } - canvas.getImage().drag.enable(calcMinMaxBoundsForRect(_rect.getInsideBoundingRect(), canvas.getImage())) + canvas.getImage().drag.enable(calcMinMaxBoundsForRect(_rect.getInsideBoundingRect(), canvas.getImage())); canvas.getApertures().apply(_data.axis, _rect.getBoundingRect()); if (canvas.__type !== 'canvas') { @@ -1942,7 +1942,7 @@ module.exports = { strokeWidth: 1, top: axis === 'x' ? bounds.top + bounds.height / 2 : bounds.top, left: axis === 'y' ? bounds.left + bounds.width / 2 : bounds.left - } + }; }, text: { @@ -1962,7 +1962,7 @@ module.exports = { lockMovementY: true, moveCursor: 'ew-resize', hoverCursor: 'ew-resize', - } + }; }, y: function(lines, bounds) { return { @@ -1974,7 +1974,7 @@ module.exports = { lockMovementX: true, moveCursor: 'ns-resize', hoverCursor: 'ns-resize', - } + }; } }; @@ -1994,7 +1994,7 @@ module.exports = { dynamicW: !width, height: height || 1, dynamicH: !height, - } + }; }, text: { diff --git a/src/ButtonMenu.js b/src/ButtonMenu.js index cb6463f..bb1d97f 100644 --- a/src/ButtonMenu.js +++ b/src/ButtonMenu.js @@ -101,7 +101,7 @@ function ButtonMenu(canvas, settings) { disabled: true }); }); - } + }; /** * Shows all the buttons @@ -113,7 +113,7 @@ function ButtonMenu(canvas, settings) { disabled: false }); }); - } + }; /** * Recalculate boundaries and add all items to canvas if required diff --git a/src/Canvas.js b/src/Canvas.js index 7b7ac3d..0309cc9 100644 --- a/src/Canvas.js +++ b/src/Canvas.js @@ -58,7 +58,7 @@ var Canvas = fabric.util.createClass(fabric.Canvas, { if (this.get3dHandler().isEnabled()) { this.get3dHandler().refreshImage(); } else { - this.refreshImage(this.getResizedImage(this.getImage())) + this.refreshImage(this.getResizedImage(this.getImage())); this.getViewport().reset(); } this.sendToBack(this.getImage()); diff --git a/src/DragbarHandler.js b/src/DragbarHandler.js index 6de9824..cf299fe 100644 --- a/src/DragbarHandler.js +++ b/src/DragbarHandler.js @@ -41,7 +41,7 @@ function DragbarHandler(canvas) { this.__handles.getHandles().forEach(function (handle) { handle.bringToFront(); }); - } + }; /** * Removes dragbars from canvas */ diff --git a/src/FrameHandler.js b/src/FrameHandler.js index 8233502..2da76f6 100644 --- a/src/FrameHandler.js +++ b/src/FrameHandler.js @@ -53,7 +53,7 @@ function FrameHandler(viewport) { viewport.canvas.renderAll(); return this; - } + }; /** * Sets passed frametype to passed viewwport diff --git a/src/ImageDataHandler.js b/src/ImageDataHandler.js index fe74b8a..825a71b 100644 --- a/src/ImageDataHandler.js +++ b/src/ImageDataHandler.js @@ -17,14 +17,14 @@ function ImageDataHandler(img) { var cropData = { x: dragAxis === 'x' ? (viewportBounds.left - img.left) / (img.width * img.scaleX) : 0, y: dragAxis === 'y' ? (viewportBounds.top - img.top) / (img.height * img.scaleY) : 0, - } + }; sessionStorage.setItem('cropData', JSON.stringify(cropData)); - } + }; this.removeCropData = function() { sessionStorage.removeItem('cropData'); - } + }; /** * Gets an object containing applied transformations for the Image and also diff --git a/src/MirrorHandler.js b/src/MirrorHandler.js index c0595e6..f849b73 100644 --- a/src/MirrorHandler.js +++ b/src/MirrorHandler.js @@ -13,11 +13,11 @@ function MirrorHandler(img) { img.setCoords().canvas.renderAll(); return this; - } + }; this.getStatus = function() { return _mirrored; - } + }; } diff --git a/src/TextButton.js b/src/TextButton.js index bc733b7..17ff527 100644 --- a/src/TextButton.js +++ b/src/TextButton.js @@ -56,7 +56,7 @@ function TextButton(id, text, settings, isActive) { this.getId = function() { return _id; - } + }; /** * @return {Boolean} diff --git a/src/Viewport.js b/src/Viewport.js index a636ce7..e209ebc 100644 --- a/src/Viewport.js +++ b/src/Viewport.js @@ -43,7 +43,7 @@ function Viewport(canvas) { canvas.getImage().center().setCoords(); } - canvas.getImage().drag.enable(calcMinMaxBoundsForRect(_rect.getInsideBoundingRect(), canvas.getImage())) + canvas.getImage().drag.enable(calcMinMaxBoundsForRect(_rect.getInsideBoundingRect(), canvas.getImage())); canvas.getApertures().apply(_data.axis, _rect.getBoundingRect()); if (canvas.__type !== 'canvas') { diff --git a/src/config/ruler-handle.js b/src/config/ruler-handle.js index 89cee2b..75a8fe1 100644 --- a/src/config/ruler-handle.js +++ b/src/config/ruler-handle.js @@ -10,7 +10,7 @@ module.exports = { strokeWidth: 1, top: axis === 'x' ? bounds.top + bounds.height / 2 : bounds.top, left: axis === 'y' ? bounds.left + bounds.width / 2 : bounds.left - } + }; }, text: { @@ -30,7 +30,7 @@ module.exports = { lockMovementY: true, moveCursor: 'ew-resize', hoverCursor: 'ew-resize', - } + }; }, y: function(lines, bounds) { return { @@ -42,6 +42,6 @@ module.exports = { lockMovementX: true, moveCursor: 'ns-resize', hoverCursor: 'ns-resize', - } + }; } }; diff --git a/src/config/text-button.js b/src/config/text-button.js index 25c7f5c..d95e0e7 100644 --- a/src/config/text-button.js +++ b/src/config/text-button.js @@ -13,7 +13,7 @@ module.exports = { dynamicW: !width, height: height || 1, dynamicH: !height, - } + }; }, text: {