问题
I can't flip a rectangle to save my life in Fabric.js, even using the code straight from the tutorials here - http://fabricjs.com/fabric-intro-part-1/#objects. If someone could please take a look at this fiddle and let me know what I'm doing wrong, I'd greatly appreciate it.
http://jsfiddle.net/thardy/E4Vcr/
rect.set('angle', 15).set('flipY', true); // doesn't work
canvas.renderAll(); // this wasn't in the tutorial, but I'm pretty sure it's needed
Is this a bug in v1.4.0?
回答1:
This appears to be a misunderstanding of how flipX and flipY are supposed to work. I think they are actually working in fabricjs. I've updated my fiddle above to more clearly display why I didn't think they were working. Perhaps this will be helpful to someone in the future
来源:https://stackoverflow.com/questions/20670771/fabric-js-flipx-and-flipy-dont-seem-to-work