Fabric.js flipX and flipY don't seem to work

感情迁移 提交于 2019-12-23 05:32:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!