22
rated 0 times
[
26]
[
4]
/ answers: 1 / hits: 5242
/ 9 Years ago, wed, january 6, 2016, 12:00:00
Using latest Fabric.js, I have the code:
var imageAdded = new Image();
imageAdded.onload = function (img) {
var imgAdded = new fabric.Image(imageAdded, {
clipName: picID,
clipTo: function (ctx) {
return _.bind(clipByName, imgAdded)(ctx)
}
});
canvas.add(imgAdded);
imgAdded.on(object:selected, function (e) { // It doesn't pass this function
alert(e.target.clipName + is selected);
e.target.clipTo = null;
canvas.renderAll();
});
};
- I want to alert when I select an object but no alert is showed because the function where I made a comment in the code doesn't work.
- I tried this link but still can't make it possible.
I appreciate every suggestion. Thank you!
More From » fabricjs