问题描述
我的问题的很好的演示: http://fabricjs.com/hovering 如果选择任何项目,它将显示在顶部.在早期版本(1.5.0-1.6.2)中,此问题不存在.对不起,英语不好.
good demo of my problem: http://fabricjs.com/hoveringIf you select any item, it is displayed on top.In earlier versions (1.5.0 - 1.6.2) this problem does not exist.Sorry for bad English.
推荐答案
如果您不希望这种行为,可以将 preserveObjectStacking 设置为true.在此处检查文档: http://fabricjs.com/docs/fabric.Canvas.html
If you dont want thie behaviour, you can set the preserveObjectStacking to true. Check the docs here: http://fabricjs.com/docs/fabric.Canvas.html
但是,背景对象存在一个问题,因此请注意 https://github .com/kangax/fabric.js/issues/3095
However, there is this one issue with background objects, so beware https://github.com/kangax/fabric.js/issues/3095
希望他们会尽快修复此问题,否则您的最后选择将回到1.6.2.
Hopefully, they'll push a fix soon otherwise your last resort would be going back to 1.6.2.
这篇关于fabricjs 1.6.3:为什么总是在顶部显示活动对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!