I want to set opacity of object to 0.5 when it is being moved/resized/scaled/drag.
We do have event handlers for all of them but they will be fired only once when any of these will start. I want to make object opacity=1 when activity is done.
I think that you can use mouse:up event for that. And when mouse:up event fires you set the opacity to 1.
canvas.on('mouse:up', function(){
var obj = canvas.getActiveObject();
obj.set({
opacity: 1
});
canvas.renderAll();
});
Here is a jsFiddle with an example with scaling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With