Closed lajlev closed 9 years ago
This is actually unsupported right now, but I have plans to add it in the future.
Is there anyway I can achive to use Caman on multiple files with the same caman settings?
Thanks for the quick response BTW :+1:
Yeah, you could initialize each image separately with its own Caman object and then store them in an array. This would be pretty simple to do with promises.
// This is all totally untested FYI
var caman_objs = [];
function initImage(image) {
new RSVP.Promise(function (resolve, reject) {
caman_objs.push(Caman(image, resolve));
}
}
RSVP.Promise.all(
$(".caman-sketch").map(function(i, e) { initImage(e); })
).then(function () {
// ready to use caman_objs
}
);
``
Can't figure out how to make it work with multiple images, by using class name. Tried following without luck.
But only worked on the first image with that classname.