Reputation: 105
I want to add Filters in Fabric js, my images are very heavy to apply the filters
How can is get the call back function for filter ?
As i want to show the loader till process is going on, i didn't get any property to set the loader till applying the image filters
Please help me out for the same.
Upvotes: 2
Views: 1164
Reputation: 3811
The fabric method applyFilters
accepts one argument and it is a callback (obj
is just a fabric object):
function applyFilter(index, filter) {;
obj.filters[index] = filter;
obj.applyFilters(function () {
console.log('this is the callback!');
canvas.renderAll();
});
}
edit: this post has instructions for a loading screen using jQuery
Upvotes: 1