Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在自由绘制模式下使用fabricjs时,可以刷路径。有没有办法在绘制后立即将引用作为这些路径的对象?鼠标向上获取对象的示例:
canvas.on('mouse:up', function(options) { var lastfreedraw = options.getLastFreeObject(); });
考虑到有关freedraw和事件的信息,我建议订阅 path:created 对象。就像是
canvas.on('path:created', function(e){ var your_path = e.path; // ... do something with your path });
应该做。