When using fabricjs in free draw mode, you can brush paths. Is there a way to get a reference as object to these paths, immediately after it is drawn? Example on mouse up get the object:
canvas.on('mouse:up', function(options) {
var lastfreedraw = options.getLastFreeObject();
});
Considering the info on freedraw and events I would suggest subscribing to the path:created object. Something like
canvas.on('path:created', function(e){
var your_path = e.path;
// ... do something with your path
});
should do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With