Files
image-editor/src/js/components/ImageEditor/ImageTransformationHandler.js
T
2017-05-09 12:18:29 +02:00

23 lines
486 B
JavaScript

'use strict';
function ImageTransformationHandler(img) {
var _transformations = {};
/**
* @param {String} name
* @param {*} args
* @return {ImageTransformationHandler}
*/
this.set = function (name, args) {
switch (name) {
case 'mirror':
_transformations.mirror = (img.flipX = args);
}
img.setCoords().canvas.renderAll();
return this;
};
}
module.exports = ImageTransformationHandler;