fabric.js to show mirror image of canvas text
css, fabricjs, html, jquery
Solution
Try this piece of code...I have edited it..
document.getElementById('btn').addEventListener('click', function (e) {
canvas.getActiveObject().set("angle", "-180").set('flipY', true);
canvas.renderAll();
});
Problem
i am using `fabric.js` to write text on canva .later on click of button i want to show mirror image of text . is there any property in `fabric.js` which i can use to rotate text on canvas. Please check , http://jsfiddle.net/BTh6A/9/ ``` document.getElementById( 'btn' ).addEventListener( 'click', function (e) { var obj = canvas.getActiveObject(); if ( !obj ) return; //here comes code to show mirror image obj.set( 'fill', '#FF0000' ); canvas.renderAll(); }); ```