I want to enable a feature called Flip on X axis for an element (Similar to what happens in Adobe Illustrator)
I am trying this to flip the image
jQuery('#btn-flip').on('mousedown', _.bind(function (evt) {
jQuery.each(this.selection.models, function (modelCounter, model) {
var currentBbox = model.getBBox();
var x = currentBbox.x;
var y = currentBbox.y;
var width = model.attributes.size.width;
var pos = x + width;
jQuery("[model-id='" +
this.id + "']").attr("transform", "translate(" + pos + "," + y + ")scale(-1,1)");
});
}, this));
Flip is working as expected but when i try to rotate an image after flip,It is getting rotated in opposite direction of Halo rotate.
(means if I rotate Halo in clockwise ,image is rotating in anticlockwise -ref below image).

Is there s feature in JointJS that already does this..?? Dont you guys think that this is basic function that is needed,.?? (I searched in the API documentation could not find a function that could do this for me.)
I want to alter the Halo's feature to rotate in the AntiClockwise if an element has been flipped (I believe this can be done by just rotating the object with the same angle but with a negetive)